Unverified Commit 20aeb75f authored by Petr Drastil's avatar Petr Drastil Committed by GitHub

add service account configuration for influxdb deployment (#226)

* add service account configuration for influxdb deployment * bump chart version
parent 86e976e2
apiVersion: v1
version: 0.1.11
version: 0.1.12
appVersion: 1.8.0
engine: gotpl
......
......@@ -51,8 +51,16 @@ app.kubernetes.io/name: {{ include "influxdb-enterprise.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account
*/}}
{{- define "influxdb-enterprise.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "influxdb-enterprise.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{- define "influxdb-enterprise.image" -}}
{{- $dataTagName := (printf "%s-%s" .chart.AppVersion .podtype) -}}
......
......@@ -23,6 +23,7 @@ spec:
name: {{ .Values.bootstrap.ddldml.configMap }}
{{ end }}
restartPolicy: OnFailure
serviceAccountName: {{ template "influxdb-enterprise.serviceAccountName" . }}
# Consider this a middleware of setup components.
# Each is executed in-order until all of theme complete successfully.
# This means that each command must be idempotent.
......
......@@ -28,6 +28,7 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.data.podSecurityContext | nindent 8 }}
serviceAccountName: {{ template "influxdb-enterprise.serviceAccountName" . }}
volumes:
{{ if not .Values.data.persistence.enabled }}
- name: {{ include "influxdb-enterprise.fullname" . }}-data-data
......
......@@ -28,6 +28,7 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.meta.podSecurityContext | nindent 8 }}
serviceAccountName: {{ template "influxdb-enterprise.serviceAccountName" . }}
volumes:
{{ if not .Values.meta.persistence.enabled }}
- name: {{ include "influxdb-enterprise.fullname" . }}-meta-data
......
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
{{- include "influxdb-enterprise.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
name: {{ template "influxdb-enterprise.serviceAccountName" . }}
{{- end }}
......@@ -16,6 +16,13 @@ license:
# name: influxdb-license
# key: json
# Service account to use for deployment
# If the name is not specified default account will be used
serviceAccount:
create: false
name: ''
annotations: {}
# A secret with keys "username" and "password" is required
# This bootstrap configuration allows you to configure
# some parts of the InfluxDB system at install time.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment