Skip to content

Commit c2f0390

Browse files
committed
Rmeove readOnlyRootFilesystem configurable
1 parent a5331f5 commit c2f0390

6 files changed

+6
-67
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.2.1 (November 12th, 2019)
2+
3+
Bugs:
4+
5+
* Removed `readOnlyRootFilesystem` causing issues when validating deployments
6+
17
## 0.2.0 (October 29th, 2019)
28

39
Features:

templates/server-statefulset.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ spec:
4141
terminationGracePeriodSeconds: 10
4242
serviceAccountName: {{ template "vault.fullname" . }}
4343
securityContext:
44-
{{- if .Values.server.securityContext.readOnlyRootFilesystem }}
45-
readOnlyRootFilesystem: true
46-
{{- end }}
4744
runAsNonRoot: true
4845
runAsGroup: {{ .Values.server.gid | default 1000 }}
4946
runAsUser: {{ .Values.server.uid | default 100 }}

test/unit/server-dev-statefulset.bats

-21
Original file line numberDiff line numberDiff line change
@@ -376,24 +376,3 @@ load _helpers
376376
yq -r '.spec.template.spec.securityContext.fsGroup' | tee /dev/stderr)
377377
[ "${actual}" = "2000" ]
378378
}
379-
380-
@test "server/dev-StatefulSet: readOnlyRootFilesystem default" {
381-
cd `chart_dir`
382-
local actual=$(helm template \
383-
-x templates/server-statefulset.yaml \
384-
--set 'server.dev.enabled=true' \
385-
. | tee /dev/stderr |
386-
yq -r '.spec.template.spec.securityContext.readOnlyRootFilesystem' | tee /dev/stderr)
387-
[ "${actual}" = "true" ]
388-
}
389-
390-
@test "server/dev-StatefulSet: readOnlyRootFilesystem configurable" {
391-
cd `chart_dir`
392-
local actual=$(helm template \
393-
-x templates/server-statefulset.yaml \
394-
--set 'server.dev.enabled=true' \
395-
--set 'server.securityContext.readOnlyRootFilesystem=false' \
396-
. | tee /dev/stderr |
397-
yq -r '.spec.template.spec.securityContext.readOnlyRootFilesystem' | tee /dev/stderr)
398-
[ "${actual}" = "null" ]
399-
}

test/unit/server-ha-statefulset.bats

-21
Original file line numberDiff line numberDiff line change
@@ -571,24 +571,3 @@ load _helpers
571571
yq -r '.spec.template.spec.securityContext.fsGroup' | tee /dev/stderr)
572572
[ "${actual}" = "2000" ]
573573
}
574-
575-
@test "server/ha-StatefulSet: readOnlyRootFilesystem default" {
576-
cd `chart_dir`
577-
local actual=$(helm template \
578-
-x templates/server-statefulset.yaml \
579-
--set 'server.ha.enabled=true' \
580-
. | tee /dev/stderr |
581-
yq -r '.spec.template.spec.securityContext.readOnlyRootFilesystem' | tee /dev/stderr)
582-
[ "${actual}" = "true" ]
583-
}
584-
585-
@test "server/ha-StatefulSet: readOnlyRootFilesystem configurable" {
586-
cd `chart_dir`
587-
local actual=$(helm template \
588-
-x templates/server-statefulset.yaml \
589-
--set 'server.ha.enabled=true' \
590-
--set 'server.securityContext.readOnlyRootFilesystem=false' \
591-
. | tee /dev/stderr |
592-
yq -r '.spec.template.spec.securityContext.readOnlyRootFilesystem' | tee /dev/stderr)
593-
[ "${actual}" = "null" ]
594-
}

test/unit/server-statefulset.bats

-19
Original file line numberDiff line numberDiff line change
@@ -639,22 +639,3 @@ load _helpers
639639
yq -r '.spec.template.spec.securityContext.fsGroup' | tee /dev/stderr)
640640
[ "${actual}" = "2000" ]
641641
}
642-
643-
@test "server/standalone-StatefulSet: readOnlyRootFilesystem default" {
644-
cd `chart_dir`
645-
local actual=$(helm template \
646-
-x templates/server-statefulset.yaml \
647-
. | tee /dev/stderr |
648-
yq -r '.spec.template.spec.securityContext.readOnlyRootFilesystem' | tee /dev/stderr)
649-
[ "${actual}" = "true" ]
650-
}
651-
652-
@test "server/standalone-StatefulSet: readOnlyRootFilesystem configurable" {
653-
cd `chart_dir`
654-
local actual=$(helm template \
655-
-x templates/server-statefulset.yaml \
656-
--set 'server.securityContext.readOnlyRootFilesystem=false' \
657-
. | tee /dev/stderr |
658-
yq -r '.spec.template.spec.securityContext.readOnlyRootFilesystem' | tee /dev/stderr)
659-
[ "${actual}" = "null" ]
660-
}

values.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ server:
2121
# should map directly to the value of the resources field for a PodSpec.
2222
# By default no direct resource request is made.
2323

24-
securityContext:
25-
readOnlyRootFilesystem: true
26-
2724
resources:
2825
# resources:
2926
# requests:

0 commit comments

Comments
 (0)