Skip to content

Commit

Permalink
Merge pull request #90 from davidkarlsen/issue83
Browse files Browse the repository at this point in the history
Fix user configurability and securityContexts.
  • Loading branch information
Muhammad Hamza Zaib authored Nov 4, 2020
2 parents 1dfb31e + 1314370 commit b64e419
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,5 @@ data:
{{- with .Values.gitWebhookProxy.config.allowedPaths }}
allowedPaths: {{ . }}
{{- end }}
{{- with .Values.gitWebhookProxy.config.ignoredUsers }}
ignoredUsers: {{ . }}
{{- end }}
{{- with .Values.gitWebhookProxy.config.allowedUsers }}
allowedUsers: {{ . }}
{{- end }}
ignoredUsers: {{ .Values.gitWebhookProxy.config.ignoredUsers | default "" | quote }}
allowedUsers: {{ .Values.gitWebhookProxy.config.allowedUsers | default "" | quote }}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ spec:
labels:
{{ include "gitwebhookproxy.labels.selector" . | indent 8 }}
spec:
{{- with .Values.gitWebhookProxy.podSecurityContext }}
securityContext: {{ . | toYaml | nindent 8 }}
{{- end }}
containers:
- env:
- name: KUBERNETES_NAMESPACE
Expand Down Expand Up @@ -92,6 +95,9 @@ spec:
{{- end }}
image: "{{ .Values.gitWebhookProxy.image.name }}:{{ .Values.gitWebhookProxy.image.tag }}"
imagePullPolicy: {{ .Values.gitWebhookProxy.image.pullPolicy }}
{{- with .Values.gitWebhookProxy.securityContext }}
securityContext: {{ . | toYaml | nindent 10 }}
{{- end }}
{{- if .Values.gitWebhookProxy.useCustomName }}
name: {{ .Values.gitWebhookProxy.customName }}
{{- else }}
Expand Down
6 changes: 6 additions & 0 deletions deployments/kubernetes/chart/gitwebhookproxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ gitWebhookProxy:
port: 80
protocol: TCP
targetPort: 8080
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
podSecurityContext:
runAsUser: 1001
runAsNonRoot: true
ingress:
enabled: false
annotations:
Expand Down

0 comments on commit b64e419

Please sign in to comment.