@@ -22,10 +22,25 @@ spec:
2222 - name : {{ .Values.geonode.imagePullSecret }}
2323{{ end }}
2424 restartPolicy : OnFailure
25+ securityContext :
26+ runAsNonRoot : true
27+ fsGroup : {{ .Values.geonode.securityContext.fsGroup | default .Values.global.securityContext.fsGroup }}
28+
2529 containers :
2630 - name : {{ .Values.geonode.container_name }}-statics-job
2731 image : " {{ .Values.geonode.image.name }}:{{ .Values.geonode.image.tag }}"
2832 imagePullPolicy : {{ .Values.geonode.imagePullPolicy }}
33+ securityContext :
34+ runAsUser : {{ .Values.geonode.securityContext.runAsUser | default .Values.global.securityContext.runAsUser }}
35+ runAsGroup : {{ .Values.geonode.securityContext.runAsGroup | default .Values.global.securityContext.runAsGroup }}
36+ runAsNonRoot : true
37+ allowPrivilegeEscalation : false
38+ capabilities :
39+ drop :
40+ - ALL
41+ seccompProfile :
42+ type : RuntimeDefault
43+
2944 command :
3045 - bash
3146 - -c
7287 - name : DATABASE_URL
7388 value : " postgis://$(GEONODE_DATABASE):$(GEONODE_DATABASE_PASSWORD)@$(DATABASE_HOST):$(DATABASE_PORT)/$(GEONODE_DATABASE)"
7489 volumeMounts :
75- - name : " {{ include " persistant_volume_name" . }}"
90+ - name : pvc-data
7691 mountPath : /data
77- subPath : data
7892 - name : cache-volume
7993 mountPath : /tmp
8094 - name : tasks-py
@@ -88,13 +102,15 @@ spec:
88102 mountPath : " /usr/src/geonode/geonode/geonode-k8s-settings-additions.py"
89103 subPath : geonode-k8s-settings-additions.py
90104 readOnly : true
91- - name : " {{ include " persistant_volume_name" . }}"
105+ - name : pvc-statics
92106 mountPath : /mnt/volumes/statics
93- subPath : statics
94107 volumes :
95- - name : " {{ include " persistant_volume_name" . }}"
108+ - name : pvc-statics
96109 persistentVolumeClaim :
97- claimName : pvc-{{ .Release.Name }}-geonode
110+ claimName : {{ include "pvc_statics_name" . }}
111+ - name : pvc-data
112+ persistentVolumeClaim :
113+ claimName : {{ include "pvc_data_name" . }}
98114 - name : tasks-py
99115 configMap :
100116 name : {{ .Release.Name }}-geonode-tasks-py
@@ -115,7 +131,6 @@ spec:
115131 items :
116132 - key : geonode-k8s-settings-additions.py
117133 path : " geonode-k8s-settings-additions.py"
118-
119134 # Using an emptyDir to cache compiled statics... it will survive container crashes, but not pod restarts
120135 - name : cache-volume
121136 emptyDir : {}
0 commit comments