Skip to content

Commit 5748def

Browse files
committed
Fixes #83, the first issue
Signed-off-by: David Karlsen <david@davidkarlsen.com>
1 parent 4ea4d40 commit 5748def

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

deployments/kubernetes/chart/gitwebhookproxy/templates/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ spec:
2828
labels:
2929
{{ include "gitwebhookproxy.labels.selector" . | indent 8 }}
3030
spec:
31+
{{- with .Values.gitWebhookProxy.podSecurityContext }}
32+
securityContext: {{ . | toYaml | nindent 8 }}
33+
{{- end }}
3134
containers:
3235
- env:
3336
- name: KUBERNETES_NAMESPACE
@@ -92,6 +95,9 @@ spec:
9295
{{- end }}
9396
image: "{{ .Values.gitWebhookProxy.image.name }}:{{ .Values.gitWebhookProxy.image.tag }}"
9497
imagePullPolicy: {{ .Values.gitWebhookProxy.image.pullPolicy }}
98+
{{- with .Values.gitWebhookProxy.securityContext }}
99+
securityContext: {{ . | toYaml | nindent 10 }}
100+
{{- end }}
95101
{{- if .Values.gitWebhookProxy.useCustomName }}
96102
name: {{ .Values.gitWebhookProxy.customName }}
97103
{{- else }}

deployments/kubernetes/chart/gitwebhookproxy/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ gitWebhookProxy:
3333
port: 80
3434
protocol: TCP
3535
targetPort: 8080
36+
securityContext:
37+
readOnlyRootFilesystem: true
38+
allowPrivilegeEscalation: false
39+
podSecurityContext:
40+
runAsUser: 1001
41+
runAsNonRoot: true
3642
ingress:
3743
enabled: false
3844
annotations:

0 commit comments

Comments
 (0)