Skip to content

Commit e40b157

Browse files
AlexsJonesclaude
andcommitted
fix: skip Helm CreateNamespace when sympozium-system already exists
Helm v3.20 wraps the namespace-create error in a multierror, which defeats its own IsAlreadyExists check. When a prior partial install left the sympozium-system namespace behind, 'sympozium install' would fail with "namespaces sympozium-system already exists". Probe for the namespace with kubectl before the install, and only ask Helm to create it if it's absent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9b4c741 commit e40b157

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cmd/sympozium/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,11 @@ func runInstall(imageTag string, setValues []string) error {
13461346
install := action.NewInstall(cfg)
13471347
install.ReleaseName = helmReleaseName
13481348
install.Namespace = helmNamespace
1349-
install.CreateNamespace = true
1349+
// Only ask Helm to create the namespace if it doesn't already exist.
1350+
// Helm v3.20 wraps the namespace-create error in a multierror, which
1351+
// defeats its own IsAlreadyExists check and makes the install fail
1352+
// when the namespace was created by a previous partial install.
1353+
install.CreateNamespace = kubectlQuiet("get", "namespace", helmNamespace) != nil
13501354
install.SkipCRDs = true // We applied CRDs above.
13511355
install.Wait = false // Don't block — cert-manager certificate may need time.
13521356
install.Timeout = 5 * time.Minute

0 commit comments

Comments
 (0)