Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-27595] Helm - made security context configurable #210

Merged
merged 2 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions helm/flink-kubernetes-operator/templates/flink-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ spec:
kubectl.kubernetes.io/default-container: {{ .Chart.Name }}
spec:
securityContext:
runAsUser: 9999
runAsGroup: 9999
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down Expand Up @@ -69,6 +68,8 @@ spec:
value: {{ .Values.jvmArgs.operator }}
- name: FLINK_OPERATOR_WATCH_NAMESPACES
value: {{ join "," .Values.watchNamespaces }}
securityContext:
{{- toYaml .Values.operatorSecurityContext | nindent 12 }}
volumeMounts:
- name: flink-operator-config-volume
mountPath: /opt/flink/conf
Expand Down Expand Up @@ -108,6 +109,8 @@ spec:
value: /opt/flink/plugins
- name: OPERATOR_NAMESPACE
value: {{ .Release.Namespace }}
securityContext:
{{- toYaml .Values.webhookSecurityContext | nindent 12 }}
volumeMounts:
- name: keystore
mountPath: "/certs"
Expand Down
9 changes: 9 additions & 0 deletions helm/flink-kubernetes-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ operatorVolumes:
# persistentVolumeClaim:
# claimName: flink-artifacts

podSecurityContext:
runAsUser: 9999
runAsGroup: 9999
# fsGroup: 9999

operatorSecurityContext: {}

webhookSecurityContext: {}

webhook:
create: true
keystore:
Expand Down