Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to create a service account and specify a default user id in securityContext #815

Merged
merged 3 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helm/akhq/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.18.0"
description: Kafka GUI for Apache Kafka to manage topics, topics data, consumers group, schema registry, connect and more...
name: akhq
version: 0.2.2
version: 0.2.3
keywords:
- kafka
- confluent
Expand Down
3 changes: 3 additions & 0 deletions helm/akhq/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ spec:
{{- if .Values.serviceAccountName }}
serviceAccountName: {{ .Values.serviceAccountName }}
{{- end }}
{{- if .Values.serviceAccountCreate }}
serviceAccountName: {{ include "akhq.name" . }}
{{- end }}
{{- if .Values.initContainers }}
initContainers:
{{- range $key, $value := .Values.initContainers }}
Expand Down
15 changes: 15 additions & 0 deletions helm/akhq/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/name: {{ include "akhq.name" . }}
helm.sh/chart: {{ include "akhq.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
name: {{ include "akhq.fullname" . }}
{{- end }}
10 changes: 8 additions & 2 deletions helm/akhq/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ extraVolumeMounts: []

# Specify ServiceAccount for pod
serviceAccountName: null
serviceAccount:
create: false
#annotations:
# eks.amazonaws.com/role-arn: arn:aws:iam::123456789000:role/iam-role-name-here

# Add your own init container or uncomment and modify the example.
initContainers: {}
Expand All @@ -73,13 +77,15 @@ initContainers: {}
# - mountPath: /tmp
# name: certs

securityContext: {}
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsUser: 1000
# capabilities:
# drop:
# - ALL
# # readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
enabled: true
Expand Down