diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 96c93d4..2267cb1 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -17,6 +17,10 @@ spec: metadata: labels: {{- include "helm-exporter.selectorLabels" . | nindent 8 }} + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: @@ -31,7 +35,7 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.tillerNamespaces }} + {{- if .Values.namespaces }} args: ["-namespaces", {{ .Values.namespaces | quote }}] {{- end }} ports: diff --git a/helm/templates/role.yaml b/helm/templates/role.yaml index f34ca09..1d3bcb5 100644 --- a/helm/templates/role.yaml +++ b/helm/templates/role.yaml @@ -1,3 +1,4 @@ +{{- if .Values.rbac.create -}} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: @@ -14,3 +15,4 @@ rules: - get - watch - list +{{- end -}} diff --git a/helm/templates/role_binding.yaml b/helm/templates/role_binding.yaml index b17b6d5..7b322df 100644 --- a/helm/templates/role_binding.yaml +++ b/helm/templates/role_binding.yaml @@ -1,3 +1,4 @@ +{{- if .Values.rbac.create -}} kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: @@ -12,3 +13,4 @@ roleRef: kind: ClusterRole name: {{ include "helm-exporter.fullname" . }} apiGroup: rbac.authorization.k8s.io +{{- end -}} diff --git a/helm/values.yaml b/helm/values.yaml index 27bec3d..178f251 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -19,6 +19,9 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +rbac: + create: true + serviceAccount: # Specifies whether a service account should be created create: true @@ -29,6 +32,8 @@ serviceAccount: podSecurityContext: {} # fsGroup: 2000 +podAnnotations: {} + securityContext: {} # capabilities: # drop: