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

[alertmanager] Add apiVersion and kind to StatefulSet volumeClaimTemplates #4865

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

schedin
Copy link

@schedin schedin commented Sep 19, 2024

Background

ArgoCD may take Helm charts as inputs, but does not install the Helm charts directly, instead it uses the helm template command that produces YAML file resources and then injects them directly. The result will look almost like a helm install command, but the deployment will not show up using helm list.

By using this mechanism ArgoCD can perform its own “diffing” and warn when the desired state does not match the cluster (for example if a person modified the resources after the deployment). It has the drawback that if some mechanism modifies the deployed resource(s) in an automatic way, ArgoCD will show the sync status as “OutOfSync” with a yellow arrow up icon.

What this PR does / why we need it

The Alertmanager StatefulSet has a volumeClaimTemplates: with one volume claim template. This template is missing the fields apiVersion and kind. When installed by Helm, Kubernetes will automatically add these missing fields (by a mechanism I have not digged deeper into).

This pull request will make the StatefulSet look more similar when comparing helm template with how the resource looks like in the cluster. This will make ArgoCD happy (with a green checkmark icon).

This pull request is analogous to what #4610 fixed.

Which issue this PR fixes

Special notes for your reviewer

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

Copy link
Member

@monotek monotek left a comment

Choose a reason for hiding this comment

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

please solve your issiues in argocd not in the chart.

@schedin
Copy link
Author

schedin commented Sep 26, 2024

I'm not affiliated with ArgoCD. It is correct that this issue could be resolved in the realm of ArgoCD, without contributing to the Prometheus Community charts.

I submitted this pull request because of the similar pull request #4610 that was already merged, but code reviewed by others (@zeritti) in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[prometheus-alertmanager] ArgoCD can't take a fullsync StatefulSet
2 participants