Skip to content

Commit 94c4b30

Browse files
committed
Added appArmor support, accessMode fix
1 parent ee59b0e commit 94c4b30

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

helm/templates/_helpers.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@
2121
{{- if $securityContext.privileged }}
2222
{{- $securityContext = omit $securityContext "capabilities" -}}
2323
{{- end -}}
24+
{{- if not .context.Values.global.compatibility.appArmor.enabled }}
25+
{{- $securityContext = omit $securityContext "appArmorProfile" -}}
26+
{{- end -}}
2427
{{- $securityContext | toYaml -}}
2528
{{- end -}}

helm/templates/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ spec:
178178
drop: ["ALL"]
179179
seccompProfile:
180180
type: RuntimeDefault
181+
{{- if .Values.global.compatibility.appArmor.enabled }}
182+
appArmorProfile:
183+
type: RuntimeDefault
184+
{{- end }}
181185
windowsOptions:
182186
hostProcess: false
183187
- name: unset-python3-cli-net-cap
@@ -208,5 +212,9 @@ spec:
208212
drop: ["ALL"]
209213
seccompProfile:
210214
type: RuntimeDefault
215+
{{- if .Values.global.compatibility.appArmor.enabled }}
216+
appArmorProfile:
217+
type: RuntimeDefault
218+
{{- end }}
211219
windowsOptions:
212220
hostProcess: false

helm/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ global:
55
compatibility:
66
openshift:
77
adaptSecurityContext: auto
8+
appArmor:
9+
enabled: false
810

911
fullname: pgadmin4
1012

@@ -68,7 +70,7 @@ persistence:
6870
enabled: false
6971
size: 1Gi
7072
storageClass: ""
71-
accessModes: ["ReadWriteMany"]
73+
accessModes: ["ReadWriteOnce"]
7274

7375
service:
7476
type: ClusterIP
@@ -136,5 +138,7 @@ containerSecurityContext:
136138
drop: ["ALL"]
137139
seccompProfile:
138140
type: RuntimeDefault
141+
appArmorProfile:
142+
type: RuntimeDefault
139143
windowsOptions:
140144
hostProcess: false

0 commit comments

Comments
 (0)