diff --git a/stable/prometheus-cloudwatch-exporter/Chart.yaml b/stable/prometheus-cloudwatch-exporter/Chart.yaml index c650dda382..db115e9b3e 100644 --- a/stable/prometheus-cloudwatch-exporter/Chart.yaml +++ b/stable/prometheus-cloudwatch-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "0.8.0" description: A Helm chart for prometheus cloudwatch-exporter name: prometheus-cloudwatch-exporter -version: 0.7.0 +version: 0.8.0 home: https://github.com/prometheus/cloudwatch_exporter sources: - https://github.com/prometheus/cloudwatch_exporter diff --git a/stable/prometheus-cloudwatch-exporter/README.md b/stable/prometheus-cloudwatch-exporter/README.md index ec4f317948..07c43ec22e 100644 --- a/stable/prometheus-cloudwatch-exporter/README.md +++ b/stable/prometheus-cloudwatch-exporter/README.md @@ -52,7 +52,7 @@ The following table lists the configurable parameters of the Cloudwatch Exporter | Parameter | Description | Default | | --------------------------------- | ----------------------------------------------------------------------- | --------------------------- | | `image.repository` | Image | `prom/cloudwatch-exporter` | -| `image.tag` | Image tag | `cloudwatch_exporter-0.6.0` | +| `image.tag` | Image tag | `cloudwatch_exporter-0.8.0` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` | | `command` | Container entrypoint command | `[]` | | `service.type` | Service type | `ClusterIP` | diff --git a/stable/prometheus-cloudwatch-exporter/templates/_helpers.tpl b/stable/prometheus-cloudwatch-exporter/templates/_helpers.tpl index 64758118fb..3215f664fc 100644 --- a/stable/prometheus-cloudwatch-exporter/templates/_helpers.tpl +++ b/stable/prometheus-cloudwatch-exporter/templates/_helpers.tpl @@ -31,6 +31,17 @@ Create chart name and version as used by the chart label. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{/* +Create serviceAccountName for deployment. +*/}} +{{- define "prometheus-cloudwatch-exporter.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} +{{ default (include "prometheus-cloudwatch-exporter.fullname" .) .Values.serviceAccount.name }} +{{- else -}} +{{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + {{/* Return the appropriate apiVersion for deployment. */}} diff --git a/stable/prometheus-cloudwatch-exporter/templates/clusterrolebinding.yaml b/stable/prometheus-cloudwatch-exporter/templates/clusterrolebinding.yaml index 6582a22e8b..67c47ba128 100644 --- a/stable/prometheus-cloudwatch-exporter/templates/clusterrolebinding.yaml +++ b/stable/prometheus-cloudwatch-exporter/templates/clusterrolebinding.yaml @@ -10,7 +10,7 @@ metadata: heritage: {{ .Release.Service }} subjects: - kind: ServiceAccount - name: {{ template "prometheus-cloudwatch-exporter.fullname" . }} + name: {{ template "prometheus-cloudwatch-exporter.serviceAccountName" . }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole diff --git a/stable/prometheus-cloudwatch-exporter/templates/deployment.yaml b/stable/prometheus-cloudwatch-exporter/templates/deployment.yaml index c097eeb3c9..0e33ba94d1 100644 --- a/stable/prometheus-cloudwatch-exporter/templates/deployment.yaml +++ b/stable/prometheus-cloudwatch-exporter/templates/deployment.yaml @@ -106,10 +106,8 @@ spec: securityContext: {{ toYaml . | indent 8 }} {{- end }} - {{- if .Values.serviceAccount.create }} - serviceAccount: {{ template "prometheus-cloudwatch-exporter.fullname" . }} - serviceAccountName: {{ template "prometheus-cloudwatch-exporter.fullname" . }} - {{- end }} + serviceAccount: {{ template "prometheus-cloudwatch-exporter.serviceAccountName" . }} + serviceAccountName: {{ template "prometheus-cloudwatch-exporter.serviceAccountName" . }} volumes: - configMap: defaultMode: 420 diff --git a/stable/prometheus-cloudwatch-exporter/templates/serviceaccount.yaml b/stable/prometheus-cloudwatch-exporter/templates/serviceaccount.yaml index a944dd3196..79fc864f62 100644 --- a/stable/prometheus-cloudwatch-exporter/templates/serviceaccount.yaml +++ b/stable/prometheus-cloudwatch-exporter/templates/serviceaccount.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ template "prometheus-cloudwatch-exporter.fullname" . }} + name: {{ template "prometheus-cloudwatch-exporter.serviceAccountName" . }} labels: app: {{ template "prometheus-cloudwatch-exporter.name" . }} chart: {{ template "prometheus-cloudwatch-exporter.chart" . }}