Skip to content

Commit

Permalink
[YUNIKORN-2990] Add support for securityContext in the helm charts
Browse files Browse the repository at this point in the history
  • Loading branch information
pbacsko committed Nov 28, 2024
1 parent 78e3297 commit a1fbddf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions helm-charts/yunikorn/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.hostNetwork }}
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
Expand Down Expand Up @@ -95,6 +99,10 @@ spec:
fieldPath: metadata.namespace
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.schedulerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.enableWebService }}
- name: yunikorn-scheduler-web
image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag }}"
Expand All @@ -105,4 +113,8 @@ spec:
protocol: TCP
resources:
{{- toYaml .Values.web.resources | nindent 12 }}
{{- with .Values.webSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions helm-charts/yunikorn/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ enableWebService: true

podLabels: {}
podAnnotations: {}
podSecurityContext: {}
schedulerSecurityContext: {}
webSecurityContext: {}

0 comments on commit a1fbddf

Please sign in to comment.