Skip to content

Commit

Permalink
Merge pull request #52 from momentmaker/feature/add-securityContext
Browse files Browse the repository at this point in the history
feat: add securityContext
  • Loading branch information
rubenfiszel authored Jan 8, 2024
2 parents 9774adb + 5704289 commit 51f6812
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 7 deletions.
4 changes: 3 additions & 1 deletion charts/windmill/templates/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.app.securityContext }}
securityContext:
runAsUser: 0
{{ toYaml . | indent 8 }}
{{- end }}
---
apiVersion: v1
kind: Service
Expand Down
6 changes: 4 additions & 2 deletions charts/windmill/templates/lsp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ spec:
{{- with .Values.windmill.lsp.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- end }}
{{- with .Values.windmill.lsp.securityContext }}
securityContext:
runAsUser: 0
{{ toYaml . | indent 8 }}
{{- end }}
---
apiVersion: v1
kind: Service
Expand Down
6 changes: 4 additions & 2 deletions charts/windmill/templates/multiplayer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.multiplayer.securityContext }}
securityContext:
runAsUser: 0
{{ toYaml . | indent 8 }}
{{- end }}
---
apiVersion: v1
kind: Service
Expand All @@ -69,4 +71,4 @@ spec:
app.kubernetes.io/name: windmill-multiplayer
sessionAffinity: ClientIP
type: ClusterIP
{{- end -}}
{{- end -}}
6 changes: 4 additions & 2 deletions charts/windmill/templates/worker-groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ spec:
privileged: true
{{ else }}
securityContext:
runAsUser: 0
{{end}}
{{- with $v.securityContext }}
{{ toYaml . | indent 8 }}
{{- end }}
{{ end }}
{{ if $.Values.enterprise.enabled }}
image: {{ default "ghcr.io/windmill-labs/windmill-ee" $.Values.windmill.image }}:{{ default $.Chart.AppVersion $.Values.windmill.tag }}
{{ else }}
Expand Down
42 changes: 42 additions & 0 deletions charts/windmill/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ windmill:
# -- Tolerations to apply to the pods
tolerations: []

# -- Security context to apply to the pods
securityContext:
# -- run as user. The default is 0 for root user
runAsUser: 0
# -- run explicitly as a non-root user. The default is false.
runAsNonRoot: false

# -- Affinity rules to apply to the pods
affinity: {}

Expand Down Expand Up @@ -114,6 +121,13 @@ windmill:
# -- Tolerations to apply to the pods
tolerations: []

# -- Security context to apply to the pods
securityContext:
# -- run as user. The default is 0 for root user
runAsUser: 0
# -- run explicitly as a non-root user. The default is false.
runAsNonRoot: false

# -- Affinity rules to apply to the pods
affinity: {}

Expand Down Expand Up @@ -145,6 +159,13 @@ windmill:
# -- Tolerations to apply to the pods
tolerations: []

# -- Security context to apply to the pods
securityContext:
# -- run as user. The default is 0 for root user
runAsUser: 0
# -- run explicitly as a non-root user. The default is false.
runAsNonRoot: false

# -- Affinity rules to apply to the pods
affinity: {}

Expand All @@ -170,6 +191,13 @@ windmill:
# -- Tolerations to apply to the pods
tolerations: []

# -- Security context to apply to the pods
securityContext:
# -- run as user. The default is 0 for root user
runAsUser: 0
# -- run explicitly as a non-root user. The default is false.
runAsNonRoot: false

# -- Affinity rules to apply to the pods
affinity: {}

Expand Down Expand Up @@ -203,6 +231,13 @@ windmill:
# -- Tolerations to apply to the pods
tolerations: []

# -- Security context to apply to the pods
securityContext:
# -- run as user. The default is 0 for root user
runAsUser: 0
# -- run explicitly as a non-root user. The default is false.
runAsNonRoot: false

# -- Affinity rules to apply to the pods
affinity: {}

Expand Down Expand Up @@ -236,6 +271,13 @@ windmill:
# -- Tolerations to apply to the pods
tolerations: []

# -- Security context to apply to the pods
securityContext:
# -- run as user. The default is 0 for root user
runAsUser: 0
# -- run explicitly as a non-root user. The default is false.
runAsNonRoot: false

# -- Affinity rules to apply to the pods
affinity: {}

Expand Down

0 comments on commit 51f6812

Please sign in to comment.