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

[prometheus-alertmanager] ArgoCD can't take a fullsync StatefulSet #4848

Open
bmgeek opened this issue Sep 11, 2024 · 1 comment · May be fixed by #4865
Open

[prometheus-alertmanager] ArgoCD can't take a fullsync StatefulSet #4848

bmgeek opened this issue Sep 11, 2024 · 1 comment · May be fixed by #4865
Labels
bug Something isn't working

Comments

@bmgeek
Copy link

bmgeek commented Sep 11, 2024

Describe the bug a clear and concise description of what the bug is.

K8s is adding automatic some strings in the volumeClaimTemplates after deploy:

StatefulSet in the cluster:

....
  volumeClaimTemplates:
    - kind: PersistentVolumeClaim
      apiVersion: v1
....

StatefulSet in the helm chart:

...
  {{- if .Values.persistence.enabled }}
  volumeClaimTemplates:
    - metadata:
        name: storage
      spec:
...
Screenshot 2024-09-11 at 12 24 32

What's your helm version?

v3.13.2

What's your kubectl version?

1.28

Which chart?

alertmanager

What's the chart version?

1.12.0

What happened?

No response

What you expected to happen?

No response

How to reproduce it?

No response

Enter the changed values of values.yaml?

No response

Enter the command that you execute and failing/misfunctioning.

i'm using an ArgoCD

Anything else we need to know?

No response

@bmgeek bmgeek added the bug Something isn't working label Sep 11, 2024
@schedin
Copy link

schedin commented Sep 19, 2024

To make it easier to test this bug without using ArgoCD I have come up with this method:

How to reproduce:
Install an older alertmanager.

git clone https://github.com/prometheus-community/helm-charts.git --branch alertmanager-1.12.0
cd helm-charts
helm upgrade --install myalertmanager helm-charts/charts/alertmanager/

Compare the alertmanager StatefulSet volumeClaimTemplates: with helm template and the installed resource

helm template charts/alertmanager/ | grep volumeClaimTemplates: -A 10
kubectl get statefulset -o yaml | grep volumeClaimTemplates: -A 10

Expected:
The volumeClaimTemplates: when comparing helm template and looking at the installed StatefulSet should look the same with respect to most attributes, but specifically kind and apiVersion.

Actual:
The helm template output is missing the kind and apiVersion under the volumeClaimTemplates:

[vagrant@schedin-k3d helm-charts]$ helm template charts/alertmanager/ | grep volumeClaimTemplates: -A 10
  volumeClaimTemplates:
    - metadata:
        name: storage
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 50Mi
[vagrant@schedin-k3d helm-charts]$ kubectl get statefulset -o yaml | grep volumeClaimTemplates: -A 10
    volumeClaimTemplates:
    - apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        creationTimestamp: null
        name: storage
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:

Fix:
I have submitted a fix for this: #4865

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants