Skip to content

Commit

Permalink
feat(helm): container securityContext can be set and image tag is tak…
Browse files Browse the repository at this point in the history
…en from AppVersion (#768)
  • Loading branch information
chgl authored Jul 27, 2021
1 parent 0d23e6e commit 79d0f96
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
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
6 changes: 5 additions & 1 deletion helm/akhq/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy | default "Always" }}
{{- if .Values.containerSecurityContext }}
securityContext:
{{ toYaml .Values.containerSecurityContext | nindent 12 }}
{{- end }}
env:
{{- if .Values.extraEnv }}{{ toYaml .Values.extraEnv | trim | nindent 12 }}{{ end }}
{{- if or (.Values.existingSecrets) (.Values.secrets) }}
Expand Down
24 changes: 17 additions & 7 deletions helm/akhq/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# - name: my-repository-secret
image:
repository: tchiotludo/akhq
tag: latest
tag: "" # uses Chart.AppVersion by default

# custom annotations (example: for prometheus)
annotations: {}
Expand Down Expand Up @@ -73,13 +73,23 @@ initContainers: {}
# - mountPath: /tmp
# name: certs

# Configure the Pod Security Context
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
securityContext: {}
# capabilities:
# drop:
# - ALL
# # readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
# runAsNonRoot: true
# runAsUser: 1000

# Configure the Container Security Context
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
containerSecurityContext: {}
# allowPrivilegeEscalation: false
# privileged: false
# capabilities:
# drop:
# - ALL
# runAsNonRoot: true
# runAsUser: 1001
# readOnlyRootFilesystem: true

service:
enabled: true
Expand Down

0 comments on commit 79d0f96

Please sign in to comment.