Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(helm): explicitly define kind and apiVersion of volumeClaimTemplate element #7362

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion helm/trivy/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.persistence.enabled }}
volumeClaimTemplates:
- metadata:
- apiVersion: v1
kind: PersistentVolumeClaim
Comment on lines +20 to +21
Copy link
Contributor

@afdesk afdesk Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly from the docs, PersistentVolumeClaim is created by default. so this update doesn't affect on k8s deploying.

But it seems ArgoCD tries to compare the state in the cluster with what is specified, it notices that the kind and apiVersion are not specified in one place, and it considers this a discrepancy, which leads to an "out of sync" state.

So I think It makes sense.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it's useful if the k8s behavior will be changed.

metadata:
name: data
spec:
resources:
Expand Down
Loading