Skip to content

Commit 1ed47d4

Browse files
committed
Made security context configurable
1 parent ced97dc commit 1ed47d4

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

charts/nfs-server-provisioner/templates/statefulset.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,10 @@ spec:
7373
- name: statd-udp
7474
containerPort: 662
7575
protocol: UDP
76+
{{- with .Values.securityContext }}
7677
securityContext:
77-
capabilities:
78-
add:
79-
- DAC_READ_SEARCH
80-
- SYS_RESOURCE
78+
{{- toYaml . | nindent 12 }}
79+
{{- end }}
8180
args:
8281
- "-provisioner={{ include "nfs-provisioner.provisionerName" . }}"
8382
{{- range $key, $value := .Values.extraArgs }}

charts/nfs-server-provisioner/values.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ service:
3939

4040
persistence:
4141
enabled: false
42-
42+
4343
## Existing Persistent Volume Claim
4444
## This should be used with persistence.enabled=true
4545
## If defined, an existing volume claim will be used, instead
@@ -96,6 +96,12 @@ rbac:
9696
##
9797
serviceAccountName: default
9898

99+
securityContext:
100+
capabilities:
101+
add:
102+
- DAC_READ_SEARCH
103+
- SYS_RESOURCE
104+
99105
## For creating the PriorityClass automatically:
100106
priorityClass:
101107
## Enable creation of a PriorityClass resource for this nfs-server-provisioner instance

0 commit comments

Comments
 (0)