Skip to content

fix: separate db-init-job annotations to prevent ArgoCD deadlock#29

Open
matonb wants to merge 1 commit intokasmtech:release/1.18.1from
matonb:feature/db-init-job-annotations
Open

fix: separate db-init-job annotations to prevent ArgoCD deadlock#29
matonb wants to merge 1 commit intokasmtech:release/1.18.1from
matonb:feature/db-init-job-annotations

Conversation

@matonb
Copy link

@matonb matonb commented Jan 6, 2026

Created dedicated components.init_db.annotations configuration separate from components.api.annotations.

The db-init-job template now uses this dedicated variable instead of sharing the API annotations.

Default value includes helm.sh/hook: pre-install for Helm deployments, but ArgoCD users can override this to remove the hook and prevent deployment deadlocks.

Changes:

  • Added components.init_db.annotations and components.init_db.labels to values.yaml
  • Updated db-init-job template to use init_db instead of api variables
  • Documented ArgoCD override requirement in values comments

This prevents the deadlock where:

  1. ArgoCD adds hook-finalizer when it sees helm.sh/hook annotation
  2. ArgoCD waits for db-init-job hook before deploying wave 3
  3. db-init-job waits for PostgreSQL (wave 3)
  4. Result: infinite wait

Created dedicated components.init_db.annotations configuration separate
from components.api.annotations. The db-init-job template now uses this
dedicated variable instead of sharing the API annotations.

Default value includes helm.sh/hook: pre-install for Helm deployments,
but ArgoCD users can override this to remove the hook and prevent
deployment deadlocks.

Changes:
- Added components.init_db.annotations and components.init_db.labels to values.yaml
- Updated db-init-job template to use init_db instead of api variables
- Documented ArgoCD override requirement in values comments

This prevents the deadlock where:
1. ArgoCD adds hook-finalizer when it sees helm.sh/hook annotation
2. ArgoCD waits for db-init-job hook before deploying wave 3
3. db-init-job waits for PostgreSQL (wave 3)
4. Result: infinite wait
darkhonor added a commit to darkhonor/helm-charts that referenced this pull request Mar 5, 2026
Port of kasmtech/kasm-helm#29 (matonb). Creates dedicated
components.init_db.annotations and components.init_db.labels
configuration separate from components.api. The db-init-job template
uses this dedicated variable instead of sharing API annotations.

Default value includes helm.sh/hook: pre-install for Helm deployments,
but GitOps/ArgoCD users can override this to remove the hook and
prevent deployment deadlocks.

Upstream-PR: kasmtech/kasm-helm#29
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant