You've already forked prometheus-postgres-exporter
							
							test(deployment): securityContext
This commit is contained in:
		| @@ -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: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user