diff --git a/charts/cp-kafka-connect/templates/deployment.yaml b/charts/cp-kafka-connect/templates/deployment.yaml index 4582f4ac..8008ec85 100644 --- a/charts/cp-kafka-connect/templates/deployment.yaml +++ b/charts/cp-kafka-connect/templates/deployment.yaml @@ -33,6 +33,10 @@ spec: {{- end }} {{- end }} spec: + {{- if .Values.serviceAccount }} + serviceAccountName: {{ template "cp-kafka-connect.fullname" . }} + automountServiceAccountToken: false + {{- end }} containers: {{- if .Values.prometheus.jmx.enabled }} - name: prometheus-jmx-exporter diff --git a/charts/cp-kafka-connect/templates/servcieaccount.yaml b/charts/cp-kafka-connect/templates/servcieaccount.yaml new file mode 100644 index 00000000..2c16fa33 --- /dev/null +++ b/charts/cp-kafka-connect/templates/servcieaccount.yaml @@ -0,0 +1,15 @@ +{{- if .Values.serviceAccount }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "cp-kafka-connect.fullname" . }} + {{- if .Values.serviceAccount.annotations }} + annotations: + {{- toYaml .Values.serviceAccount.annotations | nindent 4 }} + {{- end }} + labels: + app: {{ template "cp-kafka-connect.name" . }} + chart: {{ template "cp-kafka-connect.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- end }} diff --git a/charts/cp-kafka-connect/values.yaml b/charts/cp-kafka-connect/values.yaml index ff2cad6c..742cbca1 100644 --- a/charts/cp-kafka-connect/values.yaml +++ b/charts/cp-kafka-connect/values.yaml @@ -133,3 +133,7 @@ livenessProbe: # initialDelaySeconds: 30 # periodSeconds: 5 # failureThreshold: 10 + +serviceAccount: + # annotations: + # eks.amazonaws.com/role-arn: ""