Skip to content

fix(codeapi-chart): make package PVC argo-safe#7

Merged
rschlaefli merged 1 commit into
mainfrom
fix/argocd-package-pvc-hooks
Jun 29, 2026
Merged

fix(codeapi-chart): make package PVC argo-safe#7
rschlaefli merged 1 commit into
mainfrom
fix/argocd-package-pvc-hooks

Conversation

@rschlaefli

@rschlaefli rschlaefli commented Jun 29, 2026

Copy link
Copy Markdown
Member

What this fixes

This PR fixes the CodeAPI package-cache PVC behavior under Argo CD.

  1. codeapi-packages now renders as a normal retained PVC with Argo sync wave -10.
  2. codeapi-package-init now renders as an Argo Sync hook with sync wave -5.
  3. The values comment no longer claims the package init path uses Helm pre-install/pre-upgrade hooks.

Why

Argo CD maps helm.sh/hook: pre-install,pre-upgrade to a PreSync hook. Hook resources default to BeforeHookCreation delete behavior when no Argo delete policy is present. A persistent PVC must not be a hook resource because Argo can try to delete and recreate it during sync.

This came up during the CodeAPI staging rollout: the old chart marked codeapi-packages as a Helm hook, and Argo attempted to delete it during an image-only sync.

Branch coverage

  • Base: main
  • Head: cdacbc6
  • Reviewed: 1 commit, 3 chart files
  • Changed files:
    • helm/codeapi/templates/pvc.yaml
    • helm/codeapi/templates/package-init-job.yaml
    • helm/codeapi/values.yaml

Verification

Current head:

  • git diff --check -> passed
  • helm dependency build helm/codeapi -> passed
  • helm template codeapi helm/codeapi -n codeapi -f /private/tmp/df-cloud-codeapi-stg-rollout/helm-charts/codeapi/stg/values.yaml -> passed
  • Render check -> PVC has argocd.argoproj.io/sync-wave: "-10" and no helm.sh/hook; package init Job has argocd.argoproj.io/hook: Sync, sync wave -5, and BeforeHookCreation,HookSucceeded

Security / privacy

No secrets or private values are included in this PR. The rendered staging verification checked annotations and resource shape only.

Blocking before merge

None. GitHub checks passed on PR #7.

Follow-up after merge

  • Update the df-cloud CodeAPI app target revision to the merged commit.
  • Resync CodeAPI on staging and let the package-cache PVC recreate cleanly if the old hook-marked PVC has already entered termination.

@rschlaefli rschlaefli merged commit 646ed2e into main Jun 29, 2026
2 checks passed
@rschlaefli rschlaefli deleted the fix/argocd-package-pvc-hooks branch June 29, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant