From 18a890de449e56fea12d6956bf44a5ce9e517467 Mon Sep 17 00:00:00 2001 From: Sviat Loginov Date: Fri, 29 Nov 2024 22:30:41 +0200 Subject: [PATCH] fix(helm): Fix statefulset templates to not show diffs in ArgoCD --- production/helm/loki/CHANGELOG.md | 3 ++- .../templates/bloom-gateway/statefulset-bloom-gateway.yaml | 4 +++- .../templates/bloom-planner/statefulset-bloom-planner.yaml | 4 +++- .../loki/templates/compactor/statefulset-compactor.yaml | 4 +++- .../templates/index-gateway/statefulset-index-gateway.yaml | 4 +++- .../templates/ingester/statefulset-ingester-zone-a.yaml | 4 +++- .../templates/ingester/statefulset-ingester-zone-b.yaml | 4 +++- .../templates/ingester/statefulset-ingester-zone-c.yaml | 4 +++- .../helm/loki/templates/ingester/statefulset-ingester.yaml | 4 +++- .../loki/templates/memcached/_memcached-statefulset.tpl | 4 +++- .../pattern-ingester/statefulset-pattern-ingester.yaml | 6 ++++-- production/helm/loki/templates/ruler/statefulset-ruler.yaml | 4 +++- 12 files changed, 36 insertions(+), 13 deletions(-) diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index dfc51d67d0a42..2c78bea424eb4 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -18,6 +18,7 @@ Entries should include a reference to the pull request that introduced the chang - [CHANGE] Changed version of Grafana Loki to 3.3.1 - [CHANGE] Changed version of Minio helm chart to 5.3.0 (#14834) - [BUGFIX] Add default wal dir to ruler config ([#14920](https://github.com/grafana/loki/pull/14920)) +- [FIX] Fix statefulset templates to not show diffs in ArgoCD ## 6.22.0 @@ -107,7 +108,7 @@ Entries should include a reference to the pull request that introduced the chang ## 6.7.3 - [BUGFIX] Removed Helm test binary - + ## 6.7.2 - [BUGFIX] Fix imagePullSecrets for statefulset-results-cache diff --git a/production/helm/loki/templates/bloom-gateway/statefulset-bloom-gateway.yaml b/production/helm/loki/templates/bloom-gateway/statefulset-bloom-gateway.yaml index 747642b227909..8c3f574f58de0 100644 --- a/production/helm/loki/templates/bloom-gateway/statefulset-bloom-gateway.yaml +++ b/production/helm/loki/templates/bloom-gateway/statefulset-bloom-gateway.yaml @@ -161,7 +161,9 @@ spec: {{- if .Values.bloomGateway.persistence.enabled }} volumeClaimTemplates: {{- range .Values.bloomGateway.persistence.claims }} - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: {{ .name }} {{- with .annotations }} annotations: diff --git a/production/helm/loki/templates/bloom-planner/statefulset-bloom-planner.yaml b/production/helm/loki/templates/bloom-planner/statefulset-bloom-planner.yaml index d134af39e92c7..30e39a9d823af 100644 --- a/production/helm/loki/templates/bloom-planner/statefulset-bloom-planner.yaml +++ b/production/helm/loki/templates/bloom-planner/statefulset-bloom-planner.yaml @@ -161,7 +161,9 @@ spec: {{- if .Values.bloomPlanner.persistence.enabled }} volumeClaimTemplates: {{- range .Values.bloomPlanner.persistence.claims }} - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: {{ .name }} {{- with .annotations }} annotations: diff --git a/production/helm/loki/templates/compactor/statefulset-compactor.yaml b/production/helm/loki/templates/compactor/statefulset-compactor.yaml index ded01be3c62dc..987aae71233a6 100644 --- a/production/helm/loki/templates/compactor/statefulset-compactor.yaml +++ b/production/helm/loki/templates/compactor/statefulset-compactor.yaml @@ -173,7 +173,9 @@ spec: {{- if .Values.compactor.persistence.enabled }} volumeClaimTemplates: {{- range .Values.compactor.persistence.claims }} - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: {{ .name }} {{- with .annotations }} annotations: diff --git a/production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml b/production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml index e249859005456..269fa57ebed92 100644 --- a/production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml +++ b/production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml @@ -173,7 +173,9 @@ spec: {{- end }} {{- else }} volumeClaimTemplates: - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: data {{- with .Values.indexGateway.persistence.annotations }} annotations: diff --git a/production/helm/loki/templates/ingester/statefulset-ingester-zone-a.yaml b/production/helm/loki/templates/ingester/statefulset-ingester-zone-a.yaml index a7316612b5abe..f995dc7c04a82 100644 --- a/production/helm/loki/templates/ingester/statefulset-ingester-zone-a.yaml +++ b/production/helm/loki/templates/ingester/statefulset-ingester-zone-a.yaml @@ -214,7 +214,9 @@ spec: {{- else }} volumeClaimTemplates: {{- range .Values.ingester.persistence.claims }} - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: {{ .name }} {{- with .annotations }} annotations: diff --git a/production/helm/loki/templates/ingester/statefulset-ingester-zone-b.yaml b/production/helm/loki/templates/ingester/statefulset-ingester-zone-b.yaml index 75124542a06d8..0ed3333e802c0 100644 --- a/production/helm/loki/templates/ingester/statefulset-ingester-zone-b.yaml +++ b/production/helm/loki/templates/ingester/statefulset-ingester-zone-b.yaml @@ -214,7 +214,9 @@ spec: {{- else }} volumeClaimTemplates: {{- range .Values.ingester.persistence.claims }} - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: {{ .name }} {{- with .annotations }} annotations: diff --git a/production/helm/loki/templates/ingester/statefulset-ingester-zone-c.yaml b/production/helm/loki/templates/ingester/statefulset-ingester-zone-c.yaml index 657d6a51d46a6..7d2a3870658ff 100644 --- a/production/helm/loki/templates/ingester/statefulset-ingester-zone-c.yaml +++ b/production/helm/loki/templates/ingester/statefulset-ingester-zone-c.yaml @@ -214,7 +214,9 @@ spec: {{- else }} volumeClaimTemplates: {{- range .Values.ingester.persistence.claims }} - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: {{ .name }} {{- with .annotations }} annotations: diff --git a/production/helm/loki/templates/ingester/statefulset-ingester.yaml b/production/helm/loki/templates/ingester/statefulset-ingester.yaml index 217196a5f1e86..c107492d8a860 100644 --- a/production/helm/loki/templates/ingester/statefulset-ingester.yaml +++ b/production/helm/loki/templates/ingester/statefulset-ingester.yaml @@ -185,7 +185,9 @@ spec: {{- else }} volumeClaimTemplates: {{- range .Values.ingester.persistence.claims }} - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: {{ .name }} {{- with .annotations }} annotations: diff --git a/production/helm/loki/templates/memcached/_memcached-statefulset.tpl b/production/helm/loki/templates/memcached/_memcached-statefulset.tpl index 0664ba43c6a2b..cb798e508f35b 100644 --- a/production/helm/loki/templates/memcached/_memcached-statefulset.tpl +++ b/production/helm/loki/templates/memcached/_memcached-statefulset.tpl @@ -161,7 +161,9 @@ spec: {{- end }} {{- if .persistence.enabled }} volumeClaimTemplates: - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: data spec: accessModes: [ "ReadWriteOnce" ] diff --git a/production/helm/loki/templates/pattern-ingester/statefulset-pattern-ingester.yaml b/production/helm/loki/templates/pattern-ingester/statefulset-pattern-ingester.yaml index fdd2a74632794..a0b2b8f205fb6 100644 --- a/production/helm/loki/templates/pattern-ingester/statefulset-pattern-ingester.yaml +++ b/production/helm/loki/templates/pattern-ingester/statefulset-pattern-ingester.yaml @@ -134,7 +134,7 @@ spec: {{- with .Values.patternIngester.topologySpreadConstraints }} topologySpreadConstraints: {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} {{- with .Values.patternIngester.tolerations }} tolerations: {{- toYaml . | nindent 8 }} @@ -166,7 +166,9 @@ spec: {{- if .Values.patternIngester.persistence.enabled }} volumeClaimTemplates: {{- range .Values.patternIngester.persistence.claims }} - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: {{ .name }} {{- with .annotations }} annotations: diff --git a/production/helm/loki/templates/ruler/statefulset-ruler.yaml b/production/helm/loki/templates/ruler/statefulset-ruler.yaml index 87b42f2219e7f..f17c4964bd067 100644 --- a/production/helm/loki/templates/ruler/statefulset-ruler.yaml +++ b/production/helm/loki/templates/ruler/statefulset-ruler.yaml @@ -165,7 +165,9 @@ spec: emptyDir: {} {{- else }} volumeClaimTemplates: - - metadata: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: name: data {{- with .Values.ruler.persistence.annotations }} annotations: