Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions charts/superstream/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,10 @@ image: {{ $image }}
{{- if or .pullPolicy .global.image.pullPolicy }}
imagePullPolicy: {{ .pullPolicy | default .global.image.pullPolicy }}
{{- end }}
{{- end }}

{{- define "superstream.podSecurityContext" -}}
{{- if or .podSecurityContext .global.podSecurityContext -}}
{{ toYaml (.podSecurityContext | default .global.podSecurityContext) | nindent 4 -}}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/superstream/templates/deployment-data-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ spec:
{{- end }}
{{- end }}
serviceAccountName: {{ include "superstream.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.superstreamEngine.podSecurityContext | nindent 8 }}
securityContext:
{{- include "superstream.podSecurityContext" (merge (pick $.Values "global") .Values.superstreamEngine) | nindent 4 }}
containers:
- name: {{ .Chart.Name }}-data-plane
{{ include "superstream.image" (merge (pick $.Values "global") .Values.superstreamEngine.image) | nindent 10 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/superstream/templates/deployment-syslog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
{{- end }}
{{- end }}
securityContext:
{{- toYaml .Values.syslog.podSecurityContext | nindent 8 }}
{{- include "superstream.podSecurityContext" (merge (pick $.Values "global") .Values.syslog) | nindent 4 }}
containers:
- name: syslog-ng
{{ include "superstream.image" (merge (pick $.Values "global") .Values.syslog.image) | nindent 8 }}
Expand Down
6 changes: 5 additions & 1 deletion charts/superstream/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ global:

# global labels will be applied to all resources deployed by the chart
labels: {}
podSecurityContext: {}
# runAsUser: 1000
# runAsGroup: 1000
# fsGroup: 2000

############################################################
# NATS config
Expand Down Expand Up @@ -96,7 +100,7 @@ superstreamEngine:
prometheus.io/scrape: 'true'
prometheus.io/port: "7777"
podSecurityContext: {}
# fsGroup: 2000
# fsGroup: 2000

securityContext: {}
# capabilities:
Expand Down