Ignore defaulted StatefulSet volumeClaimTemplates TypeMeta #350

Merged
benvin merged 1 commits from benvin/sts-vct-typemeta-ignorediff into main 2026-08-09 20:53:50 +10:00

1 Commits

Author SHA1 Message Date
Ben Vincent 15f1171ac5 Ignore defaulted StatefulSet volumeClaimTemplates TypeMeta
ci/woodpecker/pr/vector-test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful
Kubernetes defaults apiVersion=v1 and kind=PersistentVolumeClaim onto every
StatefulSet volumeClaimTemplates entry, but neither the raw manifests nor the
rendered helm charts emit those fields. Live StatefulSets therefore carry
TypeMeta that git lacks, and ArgoCD reports a diff removing it. Because
volumeClaimTemplates are immutable on an existing StatefulSet, ArgoCD can never
apply the removal, so consul-server, kanidm and nats stay perpetually OutOfSync
and can contribute to sync failures.

Add a fleet-wide resource.customizations.ignoreDifferences for apps/StatefulSet
that ignores the defaulted apiVersion/kind under every volumeClaimTemplates
entry. A single global customization covers the affected StatefulSets across
both raw manifests (kanidm) and helm renders (consul, nats), and is inert for
those whose charts already emit TypeMeta (vault, woodpecker).
2026-08-09 19:17:08 +10:00