test(deployment): securityContext

This commit is contained in:
Markus Pesch 2024-11-26 19:21:39 +01:00
parent 3a96e4ac5d
commit 3105f2a408
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982

View File

@ -62,6 +62,8 @@ tests:
value: IfNotPresent
- notExists:
path: spec.template.spec.containers[0].resources
- notExists:
path: spec.template.spec.containers[0].securityContext
- it: Test additional arguments
set:
@ -170,6 +172,32 @@ tests:
cpu: 25m
memory: 100MB
- it: Test custom securityContext
set:
deployment.postgresExporter.securityContext:
capabilities:
add:
- NET_RAW
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
asserts:
- equal:
path: spec.template.spec.containers[0].securityContext
value:
capabilities:
add:
- NET_RAW
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
- it: Test additional volumeMounts and volumes
set:
deployment.postgresExporter.volumeMounts: