Skip to content

Commit 0fa28a3

Browse files
authored
Merge pull request #116 from Wieneo/container-security-context
Use HELM chart to configure container security contex
2 parents ced97dc + 1658893 commit 0fa28a3

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

charts/nfs-server-provisioner/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: 4.0.8
33
description: nfs-server-provisioner is an out-of-tree dynamic provisioner for Kubernetes. You can use it to quickly & easily deploy shared storage that works almost anywhere.
44
name: nfs-server-provisioner
5-
version: 1.6.0
5+
version: 1.7.0
66
maintainers:
77
- name: kiall
88

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)