enhancement(monitoring): replace import options with protect
Deploy Monitoring / Pulumi Deploy (pull_request) Skipped
Deploy Monitoring / Pulumi Preview (pull_request) Successful in 46s
Secret Scan / Betterleaks (pull_request) Successful in 6s

The import options fail on a fresh cluster, where the namespace and Helm release do not exist yet. Protect both resources instead, and update the rebuild runbook because clearing protected state requires --force.
This commit is contained in:
kasun committed 2026-11-23 02:40:29 +01:00
1 parent c6aa571a5c
commit b1aff90ffd
3 files changed
+6 -7

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
# monitoring
- The `monitoring` namespace and the `kube-prometheus-stack` Helm release were adopted from existing cluster resources via the Pulumi `import` option. Be careful with renames or changes that would force a replace.
- The `monitoring` namespace and the `kube-prometheus-stack` Helm release were originally adopted from existing cluster resources and are now `protected`. Be careful with renames or changes that would force a replace.
+2 -2
View File
@@ -29,7 +29,7 @@ const k8sProvider = new k8s.Provider("k3s", {
const monitoringNs = new k8s.core.v1.Namespace(
"monitoring",
{ metadata: { name: "monitoring" } },
{ provider: k8sProvider, import: "monitoring" },
{ provider: k8sProvider, protect: true },
);
const grafanaHost = pulumi.interpolate`grafana.${domain}`;
@@ -101,5 +101,5 @@ new k8s.helm.v3.Release(
alertmanager: { enabled: false },
},
},
{ provider: k8sProvider, import: "monitoring/kube-prometheus-stack" },
{ provider: k8sProvider, protect: true },
);