test(deployment): resources

This commit is contained in:
Markus Pesch 2024-11-26 19:08:40 +01:00
parent abd73d82f2
commit 3a96e4ac5d
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 23 additions and 1 deletions

View File

@ -60,7 +60,7 @@ spec:
- name: http
containerPort: 9187
protocol: TCP
{{- with .Values.deployment.containerResources }}
{{- with .Values.deployment.postgresExporter.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}

View File

@ -60,6 +60,8 @@ tests:
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: IfNotPresent
- notExists:
path: spec.template.spec.containers[0].resources
- it: Test additional arguments
set:
@ -148,6 +150,26 @@ tests:
- secret:
name: web-config-secret
- it: Test custom resource limits and requests
set:
deployment.postgresExporter.resources:
limits:
cpu: 100m
memory: 250MB
requests:
cpu: 25m
memory: 100MB
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
limits:
cpu: 100m
memory: 250MB
requests:
cpu: 25m
memory: 100MB
- it: Test additional volumeMounts and volumes
set:
deployment.postgresExporter.volumeMounts: