Bug Description
ArgoCD continuously detects drift and attempts to sync StatefulSet resources (alertmanager, compactor, ingester, store-gateway) due to missing apiVersion and kind fields in volumeClaimTemplates.
Problem
When deploying the Cortex Helm chart, Kubernetes automatically populates the apiVersion: v1 and kind: PersistentVolumeClaim fields in the StatefulSet's volumeClaimTemplates during resource creation. However, the Helm templates don't include these fields, causing ArgoCD to detect a constant difference between:
- Desired state (from Helm):
volumeClaimTemplates without apiVersion/kind
- Actual state (in cluster):
volumeClaimTemplates with apiVersion/kind
This results in ArgoCD sync flapping, constantly trying to "fix" a difference that reappears immediately.
Expected Behavior
StatefulSet templates should explicitly include apiVersion and kind fields in volumeClaimTemplates to match the actual cluster state and prevent ArgoCD drift detection.
Affected Components
templates/alertmanager/alertmanager-statefulset.yaml
templates/compactor/compactor-statefulset.yaml
templates/ingester/ingester-statefulset.yaml
templates/store-gateway/store-gateway-statefulset.yaml
Reference
The Grafana Loki Helm chart uses this pattern successfully: https://github.com/grafana/loki/blob/main/production/helm/loki/templates/ingester/statefulset-ingester.yaml#L83-L85
Bug Description
ArgoCD continuously detects drift and attempts to sync StatefulSet resources (alertmanager, compactor, ingester, store-gateway) due to missing
apiVersionandkindfields involumeClaimTemplates.Problem
When deploying the Cortex Helm chart, Kubernetes automatically populates the
apiVersion: v1andkind: PersistentVolumeClaimfields in the StatefulSet'svolumeClaimTemplatesduring resource creation. However, the Helm templates don't include these fields, causing ArgoCD to detect a constant difference between:volumeClaimTemplateswithoutapiVersion/kindvolumeClaimTemplateswithapiVersion/kindThis results in ArgoCD sync flapping, constantly trying to "fix" a difference that reappears immediately.
Expected Behavior
StatefulSet templates should explicitly include
apiVersionandkindfields involumeClaimTemplatesto match the actual cluster state and prevent ArgoCD drift detection.Affected Components
templates/alertmanager/alertmanager-statefulset.yamltemplates/compactor/compactor-statefulset.yamltemplates/ingester/ingester-statefulset.yamltemplates/store-gateway/store-gateway-statefulset.yamlReference
The Grafana Loki Helm chart uses this pattern successfully: https://github.com/grafana/loki/blob/main/production/helm/loki/templates/ingester/statefulset-ingester.yaml#L83-L85