Bug: Stop kubeconfig address change from replacing k8s resources #57

Merged
claude-bot Bot merged 1 commits from bug/stop-k8s-provider-replacement into main 2026-11-23 01:05:49 +01:00
3 changed files with 21 additions and 3 deletions
Showing only changes of commit 356f5b7ad4 - Show all commits

No files matched your search

+7 -1
View File
@@ -23,7 +23,13 @@ const domain = config.requireSecret("domain");
const longhornUiUser = config.requireSecret("longhornUiUser"); const longhornUiUser = config.requireSecret("longhornUiUser");
const longhornUiPassword = config.requireSecret("longhornUiPassword"); const longhornUiPassword = config.requireSecret("longhornUiPassword");
const k8sProvider = new k8s.Provider("k3s", { kubeconfig }); // Keep the kubeconfig stored in state. A changed API address would otherwise
// make Pulumi replace the provider and every resource in this stack.
const k8sProvider = new k8s.Provider(
"k3s",
{ kubeconfig },
{ ignoreChanges: ["kubeconfig"] },
);
const opts = (extras?: pulumi.ResourceOptions): pulumi.ResourceOptions => ({ const opts = (extras?: pulumi.ResourceOptions): pulumi.ResourceOptions => ({
provider: k8sProvider, provider: k8sProvider,
...extras, ...extras,
+7 -1
View File
@@ -10,7 +10,13 @@ const bootstrapRef = new pulumi.StackReference(
const kubeconfig = bootstrapRef.requireOutput("kubeconfig"); const kubeconfig = bootstrapRef.requireOutput("kubeconfig");
export const domain = config.requireSecret("domain"); export const domain = config.requireSecret("domain");
const k8sProvider = new k8s.Provider("k3s", { kubeconfig }); // Keep the kubeconfig stored in state. A changed API address would otherwise
// make Pulumi replace the provider and every resource in this stack.
const k8sProvider = new k8s.Provider(
"k3s",
{ kubeconfig },
{ ignoreChanges: ["kubeconfig"] },
);
const opts = (extras?: pulumi.ResourceOptions): pulumi.ResourceOptions => ({ const opts = (extras?: pulumi.ResourceOptions): pulumi.ResourceOptions => ({
provider: k8sProvider, provider: k8sProvider,
...extras, ...extras,
+7 -1
View File
@@ -18,7 +18,13 @@ const grafanaDbPassword = config.requireSecret("grafanaDbPassword");
const grafanaDbHost = config.requireSecret("grafanaDbHost"); const grafanaDbHost = config.requireSecret("grafanaDbHost");
const grafanaDbName = config.require("grafanaDbName"); const grafanaDbName = config.require("grafanaDbName");
const k8sProvider = new k8s.Provider("k3s", { kubeconfig }); // Keep the kubeconfig stored in state. A changed API address would otherwise
// make Pulumi replace the provider and every resource in this stack.
const k8sProvider = new k8s.Provider(
"k3s",
{ kubeconfig },
{ ignoreChanges: ["kubeconfig"] },
);
const monitoringNs = new k8s.core.v1.Namespace( const monitoringNs = new k8s.core.v1.Namespace(
"monitoring", "monitoring",