Implement helm-toolkit snippet to promenade test pods/containers
This updates the promenade chart to include the pod security context on the pod template. This also adds the container security context to set readOnlyRootFilesystem flag to true Change-Id: I688017f329b267e75178053b8e18d56090900f11
This commit is contained in:
parent
c6c7a3accd
commit
62c4040a41
|
@ -30,6 +30,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
{{ tuple $envAll "promenade" "api-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
{{ tuple $envAll "promenade" "api-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
{{ dict "envAll" $envAll "application" "api_test" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 2 }}
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }}
|
{{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }}
|
||||||
|
@ -43,6 +44,7 @@ spec:
|
||||||
image: {{ .Values.images.tags.promenade }}
|
image: {{ .Values.images.tags.promenade }}
|
||||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
{{ tuple . .Values.pod.resources.test | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
|
{{ tuple . .Values.pod.resources.test | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
|
||||||
|
{{ dict "envAll" $envAll "application" "api_test" "container" "promenade_api_test" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 6 }}
|
||||||
command: ["/bin/bash", "-c", "curl -v -X GET --fail ${PROM_URL}/api/v1.0/health; exit $?"]
|
command: ["/bin/bash", "-c", "curl -v -X GET --fail ${PROM_URL}/api/v1.0/health; exit $?"]
|
||||||
...
|
...
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -180,8 +180,15 @@ pod:
|
||||||
runAsUser: 65534
|
runAsUser: 65534
|
||||||
container:
|
container:
|
||||||
promenade_api:
|
promenade_api:
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
api_test:
|
||||||
|
pod:
|
||||||
|
runAsUser: 65534
|
||||||
|
container:
|
||||||
|
promenade_api_test:
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
mandatory_access_control:
|
mandatory_access_control:
|
||||||
type: apparmor
|
type: apparmor
|
||||||
promenade-api:
|
promenade-api:
|
||||||
|
|
Loading…
Reference in New Issue