From 6237b821f69c99340095a9b16f7935a100f5572f Mon Sep 17 00:00:00 2001 From: "Shiva Krishna, Merla" Date: Wed, 4 Oct 2023 15:17:32 -0700 Subject: [PATCH] Fix serviceaccount handling for nfd-gc to be consistent with others Signed-off-by: Shiva Krishna, Merla --- .../node-feature-discovery/templates/clusterrolebinding.yaml | 2 +- deployment/helm/node-feature-discovery/templates/nfd-gc.yaml | 2 +- .../helm/node-feature-discovery/templates/serviceaccount.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deployment/helm/node-feature-discovery/templates/clusterrolebinding.yaml b/deployment/helm/node-feature-discovery/templates/clusterrolebinding.yaml index 8e3aef83e1..87b3003e2d 100644 --- a/deployment/helm/node-feature-discovery/templates/clusterrolebinding.yaml +++ b/deployment/helm/node-feature-discovery/templates/clusterrolebinding.yaml @@ -47,6 +47,6 @@ roleRef: name: {{ include "node-feature-discovery.fullname" . }}-gc subjects: - kind: ServiceAccount - name: {{ .Values.gc.serviceAccount.name | default "nfd-gc" }} + name: {{ include "node-feature-discovery.gc.serviceAccountName" . }} namespace: {{ include "node-feature-discovery.namespace" . }} {{- end }} diff --git a/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml b/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml index ec67a114e5..d803eef40c 100644 --- a/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml +++ b/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml @@ -27,7 +27,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ .Values.gc.serviceAccountName | default "nfd-gc" }} + serviceAccountName: {{ include "node-feature-discovery.gc.serviceAccountName" . }} dnsPolicy: ClusterFirstWithHostNet {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/deployment/helm/node-feature-discovery/templates/serviceaccount.yaml b/deployment/helm/node-feature-discovery/templates/serviceaccount.yaml index dae09503e4..34dc8b753b 100644 --- a/deployment/helm/node-feature-discovery/templates/serviceaccount.yaml +++ b/deployment/helm/node-feature-discovery/templates/serviceaccount.yaml @@ -27,12 +27,12 @@ metadata: {{- end }} {{- end }} -{{- if and .Values.gc.enable .Values.gc.rbac.create (or .Values.enableNodeFeatureApi .Values.topologyUpdater.enable) }} +{{- if and .Values.gc.enable .Values.gc.serviceAccount.create (or .Values.enableNodeFeatureApi .Values.topologyUpdater.enable) }} --- apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.gc.serviceAccount.name | default "nfd-gc" }} + name: {{ include "node-feature-discovery.gc.serviceAccountName" . }} namespace: {{ include "node-feature-discovery.namespace" . }} labels: {{- include "node-feature-discovery.labels" . | nindent 4 }}