Skip to content

Commit

Permalink
Make securityContext configurable for mailhog (#119)
Browse files Browse the repository at this point in the history
Enables running on Openshift

Signed-off-by: Chris <[email protected]>
  • Loading branch information
ccremer authored and unguiculus committed Oct 5, 2019
1 parent e51e4aa commit f203d43
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/mailhog/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: An e-mail testing tool for developers
name: mailhog
appVersion: 1.0.0
version: 3.0.1
version: 3.1.0
keywords:
- mailhog
- mail
Expand Down
1 change: 1 addition & 0 deletions charts/mailhog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Parameter | Description | Default
`service.node.smtp` | SMTP port of service | `""`
`service.nodePort.http` | If `service.type` is `NodePort` and this is non-empty, sets the http node port of the service | `""`
`service.nodePort.smtp` | If `service.type` is `NodePort` and this is non-empty, sets the smtp node port of the service | `""`
`securityContext` | Pod security context | `{ runAsUser: 1000, fsGroup: 1000, runAsNonRoot: true }`
`ingress.enabled` | If `true`, an ingress is created | `false`
`ingress.annotations` | Annotations for the ingress | `{}`
`ingress.path` | If `true`, an ingress is created | `/`
Expand Down
6 changes: 3 additions & 3 deletions charts/mailhog/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ spec:
app.kubernetes.io/name: {{ include "mailhog.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- with .Values.securityContext }}
securityContext:
runAsUser: 1000
fsGroup: 1000
runAsNonRoot: true
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ template "mailhog.name" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
5 changes: 5 additions & 0 deletions charts/mailhog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ service:
http: ""
smtp: ""

securityContext:
runAsUser: 1000
fsGroup: 1000
runAsNonRoot: true

ingress:
enabled: false
annotations: {}
Expand Down

0 comments on commit f203d43

Please sign in to comment.