diff --git a/template/deploy/helm/[[operator]]/templates/configmap.yaml b/template/deploy/helm/[[operator]]/templates/configmap.yaml index 7fa8613d..e75acc25 100644 --- a/template/deploy/helm/[[operator]]/templates/configmap.yaml +++ b/template/deploy/helm/[[operator]]/templates/configmap.yaml @@ -4,6 +4,6 @@ data: {{ (.Files.Glob "configs/*").AsConfig | indent 2 }} kind: ConfigMap metadata: - name: {{ .Release.Name }}-configmap + name: {{ include "operator.fullname" . }}-configmap labels: {{- include "operator.labels" . | nindent 4 }} diff --git a/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 b/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 index 19e27bf0..8ca3fed8 100644 --- a/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 +++ b/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 @@ -3,7 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Release.Name }}-deployment + name: {{ include "operator.fullname" . }}-deployment labels: {{- include "operator.labels" . | nindent 4 }} spec: @@ -27,7 +27,7 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - serviceAccountName: {{ .Release.Name }}-serviceaccount + serviceAccountName: {{ include "operator.fullname" . }}-serviceaccount securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: @@ -44,17 +44,17 @@ spec: {[% if operator.product_string in ['kafka'] %}] env: - name: KAFKA_BROKER_CLUSTERROLE - value: {{ .Release.Name }}-kafka-broker-clusterrole + value: {{ include "operator.fullname" . }}-kafka-broker-clusterrole {[% endif %}] {[% if operator.product_string in ['opa'] %}] env: - name: OPA_BUNDLE_BUILDER_CLUSTERROLE - value: {{ .Release.Name }}-opa-bundle-builder-clusterrole + value: {{ include "operator.fullname" . }}-opa-bundle-builder-clusterrole {[% endif %}] volumes: - name: config-spec configMap: - name: {{ .Release.Name }}-configmap + name: {{ include "operator.fullname" . }}-configmap {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/template/deploy/helm/[[operator]]/templates/serviceaccount.yaml.j2 b/template/deploy/helm/[[operator]]/templates/serviceaccount.yaml.j2 index ff2b7f8e..8ba0d58c 100644 --- a/template/deploy/helm/[[operator]]/templates/serviceaccount.yaml.j2 +++ b/template/deploy/helm/[[operator]]/templates/serviceaccount.yaml.j2 @@ -3,7 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Release.Name }}-serviceaccount + name: {{ include "operator.fullname" . }}-serviceaccount labels: {{- include "operator.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} @@ -15,15 +15,15 @@ apiVersion: rbac.authorization.k8s.io/v1 # This cluster role binding allows anyone in the "manager" group to read secrets in any namespace. kind: ClusterRoleBinding metadata: - name: {{ .Release.Name }}-clusterrolebinding + name: {{ include "operator.fullname" . }}-clusterrolebinding labels: {{- include "operator.labels" . | nindent 4 }} subjects: - kind: ServiceAccount - name: {{ .Release.Name }}-serviceaccount + name: {{ include "operator.fullname" . }}-serviceaccount namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole - name: {{ .Release.Name }}-clusterrole + name: {{ include "operator.fullname" . }}-clusterrole apiGroup: rbac.authorization.k8s.io {{- end }}