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

Issue 623: add security context override to operator deployment (#623) #624

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 2 additions & 0 deletions charts/zookeeper-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ The following table lists the configurable parameters of the zookeeper-operator
| `image.tag` | Image tag | `0.2.15` |
| `labels` | Operator pod labels | `{}` |
| `nodeSelector` | Map of key-value pairs to be present as labels in the node in which the pod should run | `{}` |
| `podSecurityContext` | Security context for the pod | `{}` |
| `rbac.create` | Create RBAC resources | `true` |
| `resources` | Specifies resource requirements for the container | `{}` |
| `securityContext` | Security context for the container | `{}` |
| `serviceAccount.create` | Create service account | `true` |
| `serviceAccount.name` | Name for the service account | `zookeeper-operator` |
| `tolerations` | Specifies the pod's tolerations | `[]` |
Expand Down
8 changes: 8 additions & 0 deletions charts/zookeeper-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name }}
{{- if .Values.podSecurityContext }}
securityContext:
{{ toYaml .Values.podSecurityContext | indent 8 }}
{{- end }}
{{- if .Values.additionalVolumes }}
volumes:
{{- include "chart.additionalVolumes" . | indent 6 }}
Expand All @@ -32,6 +36,10 @@ spec:
- name: {{ template "zookeeper-operator.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.securityContext }}
securityContext:
{{ toYaml .Values.securityContext | indent 10 }}
{{- end }}
ports:
- containerPort: {{ int .Values.metricsPort }}
name: metrics
Expand Down
7 changes: 7 additions & 0 deletions charts/zookeeper-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ image:
pullPolicy: IfNotPresent

securityContext: {}
# allowPrivilegeEscalation: false
# capabilities:
# drop:
# - ALL

podSecurityContext: {}
# runAsUser: 1001
# runAsGroup: 1001
# fsGroup: 1001

## Additional labels to be added to resources
labels: {}
Expand Down