From af4e3b1324e02d594bb53e4d2ea4fef194e9f6cd Mon Sep 17 00:00:00 2001 From: Naseem Date: Sat, 15 Feb 2020 01:27:27 -0500 Subject: [PATCH] [stable/influxdb] fix: labels (#20776) * influxdb-fix-labels Signed-off-by: Naseem * Fix labels Signed-off-by: Naseem --- stable/influxdb/Chart.yaml | 2 +- stable/influxdb/templates/backup-cronjob.yaml | 3 +-- stable/influxdb/templates/meta-statefulset.yaml | 1 + stable/influxdb/templates/post-install-set-auth.yaml | 7 +++---- stable/influxdb/templates/service.yaml | 3 +-- stable/influxdb/templates/serviceaccount.yaml | 6 +++--- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/stable/influxdb/Chart.yaml b/stable/influxdb/Chart.yaml index 4ed999e75c..ccfe7f44a0 100755 --- a/stable/influxdb/Chart.yaml +++ b/stable/influxdb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: influxdb -version: 4.0.0 +version: 4.0.1 appVersion: 1.7.6 description: Scalable datastore for metrics, events, and real-time analytics. keywords: diff --git a/stable/influxdb/templates/backup-cronjob.yaml b/stable/influxdb/templates/backup-cronjob.yaml index d92b16a119..10f49e1f6c 100644 --- a/stable/influxdb/templates/backup-cronjob.yaml +++ b/stable/influxdb/templates/backup-cronjob.yaml @@ -16,8 +16,7 @@ spec: template: metadata: labels: - app: {{ template "influxdb.fullname" . }} - release: "{{ .Release.Name }}" + {{- include "influxdb.selectorLabels" . | nindent 12 }} spec: restartPolicy: OnFailure volumes: diff --git a/stable/influxdb/templates/meta-statefulset.yaml b/stable/influxdb/templates/meta-statefulset.yaml index 9fa09164c5..e7f8410117 100644 --- a/stable/influxdb/templates/meta-statefulset.yaml +++ b/stable/influxdb/templates/meta-statefulset.yaml @@ -29,6 +29,7 @@ spec: - name: {{ . }} {{- end}} {{- end }} + serviceAccountName: {{ include "influxdb.serviceAccountName" . }} containers: - name: "{{ include "influxdb.fullname" . }}-meta" image: "{{ .Values.image.repository }}:{{ .Values.enterprise.meta.image.tag }}" diff --git a/stable/influxdb/templates/post-install-set-auth.yaml b/stable/influxdb/templates/post-install-set-auth.yaml index 5af5d6233e..05981aa596 100644 --- a/stable/influxdb/templates/post-install-set-auth.yaml +++ b/stable/influxdb/templates/post-install-set-auth.yaml @@ -2,9 +2,9 @@ apiVersion: batch/v1 kind: Job metadata: - name: {{ include "caca.fullname" . }}-set-auth + name: {{ include "influxdb.fullname" . }}-set-auth labels: - {{- include "caca.labels" . | nindent 4 }} + {{- include "influxdb.labels" . | nindent 4 }} annotations: "helm.sh/hook": post-install "helm.sh/hook-delete-policy": hook-succeeded @@ -13,8 +13,7 @@ spec: template: metadata: labels: - app: {{ template "influxdb.fullname" . }} - release: "{{ .Release.Name }}" + {{- include "influxdb.selectorLabels" . | nindent 8 }} spec: containers: - name: {{ template "influxdb.fullname" . }}-set-auth diff --git a/stable/influxdb/templates/service.yaml b/stable/influxdb/templates/service.yaml index 4f3fc4f7dc..c51e17bb44 100644 --- a/stable/influxdb/templates/service.yaml +++ b/stable/influxdb/templates/service.yaml @@ -47,5 +47,4 @@ spec: targetPort: {{ .Values.config.rpc.bind_address }} {{- end }} selector: - app: {{ template "influxdb.fullname" . }} - release: "{{ .Release.Name }}" + {{- include "influxdb.selectorLabels" . | nindent 4 }} diff --git a/stable/influxdb/templates/serviceaccount.yaml b/stable/influxdb/templates/serviceaccount.yaml index 2b09280353..c496696559 100644 --- a/stable/influxdb/templates/serviceaccount.yaml +++ b/stable/influxdb/templates/serviceaccount.yaml @@ -2,11 +2,11 @@ apiVersion: v1 kind: ServiceAccount metadata: + name: {{ include "influxdb.serviceAccountName" . }} + labels: + {{- include "influxdb.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} - name: {{ template "influxdb.serviceAccountName" . }} - labels: -{{ include "influxdb.labels" . | indent 4 }} {{- end -}}