What's wrong
With the plugin backup method, the chart renders the ObjectStore with: "helm.sh/hook": pre-install,pre-upgrade,pre-rollback
(in backup-objectstore.yaml and recovery-objectstore.yaml, from #924).
Fine in plain Helm, it jsut orders the ObjectStore before the Cluster. But under ArgoCD a Helm hook becomes an ephemeral PreSync resource, so ArgoCD creates it once and then prunes it. It never comes back: WAL archiving stops and the Cluster goes Ready=False with ContinuousArchivingFailing: ObjectStore ... not found, wedging the whole app sync.
Repro
backups.method: plugin synced by ArgoCD (auto-sync + prune) -> ObjectStore applied as a PreSync hook, then pruned, and archiving breaks.
For now, I've worked around it by rendering the CNPG CRs myself instead of using this chart directly, so the ObjectStore has no helm hook and ArgoCD keeps it as a normal tracked resource, wtih an argocd.argoproj.io/sync-wave: "-1" for ordering.
Suggested fix
Make the hook optional, (default enabled, to not causea BC break of course)
backups:
objectStore:
helmHook: true # set false for ArgoCD/Flux
annotations: {} # e.g. argocd.argoproj.io/sync-wave: "-1"
When false, drop the hook annotation. The annotations map lets GitOps users add their own ordering without leaking it onto the Cluster like the existing cluster.annotations passthrough would. I'd apply it to both the backup and recovery ObjectStores.
Happy to open a PR (templates + values + schema + docs + chainsaw test) if the approach works for you. just wanted to check the approach first.
// Edit: it was kindof a small change, so I already created the PR. No hard feelings if you reject it or prefer a different approach :)
#965
What's wrong
With the plugin backup method, the chart renders the
ObjectStorewith:"helm.sh/hook": pre-install,pre-upgrade,pre-rollback(in
backup-objectstore.yamlandrecovery-objectstore.yaml, from #924).Fine in plain Helm, it jsut orders the ObjectStore before the Cluster. But under ArgoCD a Helm hook becomes an ephemeral PreSync resource, so ArgoCD creates it once and then prunes it. It never comes back: WAL archiving stops and the Cluster goes
Ready=FalsewithContinuousArchivingFailing: ObjectStore ... not found, wedging the whole app sync.Repro
backups.method: pluginsynced by ArgoCD (auto-sync + prune) -> ObjectStore applied as a PreSync hook, then pruned, and archiving breaks.For now, I've worked around it by rendering the CNPG CRs myself instead of using this chart directly, so the ObjectStore has no helm hook and ArgoCD keeps it as a normal tracked resource, wtih an
argocd.argoproj.io/sync-wave: "-1"for ordering.Suggested fix
Make the hook optional, (default enabled, to not causea BC break of course)
When
false, drop the hook annotation. Theannotationsmap lets GitOps users add their own ordering without leaking it onto the Cluster like the existingcluster.annotationspassthrough would. I'd apply it to both the backup and recovery ObjectStores.Happy to open a PR (templates + values + schema + docs + chainsaw test) if the approach works for you. just wanted to check the approach first.
// Edit: it was kindof a small change, so I already created the PR. No hard feelings if you reject it or prefer a different approach :)
#965