Skip to content

fix(helm): remove build-auth-config init container - #3047

Merged
tlgimenes merged 2 commits into
mainfrom
tlgimenes/remove-auth-init
Apr 7, 2026
Merged

tlgimenes merged 2 commits into
mainfrom
tlgimenes/remove-auth-init

Conversation

@tlgimenes

@tlgimenes tlgimenes commented Apr 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Remove the build-auth-config init container from the Helm deployment. The configmap-auth.yaml template already handles secret merging via Helm's lookup function at render time, making the runtime Alpine/jq init container redundant.

Addressing SRE feedback point by point

"nao acho que precisamos disso nao" (don't think we need this)

Correct — the init container was completely redundant. The configmap-auth.yaml already uses Helm's lookup to read the Secret and inject values into the ConfigMap at helm install/upgrade time (lines 10-49 of configmap-auth.yaml). The init container was doing the same merge again at pod startup.

"o secret pode ser colocado ali via ref de secrets, nao precisamos de nada disso daí" (secrets can be placed via secret refs, we don't need any of that)

Exactly. The secret.authConfigSecretName value still works — configmap-auth.yaml uses it with lookup to pull secret values directly into the rendered ConfigMap. No runtime merging, no Alpine image, no jq.

"montar os volumes e os envs" (mount volumes and envs)

The auth config is now always mounted as a single ConfigMap volume (which already contains the merged secrets from render time). Removed the 3 extra volumes that the init container needed (auth-secrets, auth-config-base, auth-config-shared emptyDir).

"nao precisa do init pra isso" (don't need the init for this)

Removed entirely. -77 lines, no additions.

What changed

  • Removed the build-auth-config init container (Alpine + jq runtime merge)
  • Removed conditional volume mount logic (auth-config-shared vs auth-config)
  • Removed 3 volumes: auth-secrets (Secret), auth-config-base (ConfigMap), auth-config-shared (emptyDir)
  • Auth config is now always mounted from the ConfigMap, which already has secrets baked in at render time

What didn't change

  • configmap-auth.yaml — still uses lookup to merge secrets when authConfigSecretName is set
  • secret.authConfigSecretName — still works as a values.yaml config
  • The existing K8s secrets (deco-mcp-mesh-stg-auth-secrets) don't need changes

Test plan

  • Verify helm template output shows no init container
  • Deploy to staging and confirm auth config mounts correctly with secrets merged
  • Verify OAuth (Google/GitHub) and email (Resend) still work

🤖 Generated with Claude Code


Summary by cubic

Removed the build-auth-config init container and now rely on configmap-auth.yaml with Helm lookup to merge secrets at render time. Simplifies deployment by removing the Alpine/jq runtime merge and bumps the Helm chart to version 0.3.0.

  • Refactors
    • Deleted the init container and conditional mount logic; auth config now always mounts from the ConfigMap.
    • Removed volumes: auth-secrets, auth-config-base, auth-config-shared.
    • No functional change: secret.authConfigSecretName remains supported and secrets are merged into the rendered ConfigMap.

Written for commit 6cddc45. Summary will update on new commits.

tlgimenes and others added 2 commits April 7, 2026 20:23
The configmap-auth.yaml template already merges secrets via Helm's
lookup function at render time, making the Alpine/jq init container
unnecessary. Secrets are now injected directly through the ConfigMap
without runtime merging.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@tlgimenes
tlgimenes force-pushed the tlgimenes/remove-auth-init branch from 2cf9313 to 6cddc45 Compare April 7, 2026 23:24

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@tlgimenes
tlgimenes merged commit bd908df into main Apr 7, 2026
9 checks passed
@tlgimenes
tlgimenes deleted the tlgimenes/remove-auth-init branch April 7, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants