enhancement(monitoring): replace import options with protect
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:
1 parent
c6aa571a5c
commit
b1aff90ffd
3 files changed
+6
-7
No files matched your search
@@ -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.
|
||||
@@ -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 },
|
||||
);
|
||||
Reference in new issue
Block a user