[alertmanager] Add apiVersion and kind to StatefulSet volumeClaimTemplates #4865
+4
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ahelm install
command, but the deployment will not show up usinghelm 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 fieldsapiVersion
andkind
. 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
[prometheus-couchdb-exporter]
)