test(deployment,secrets): imageRegistry, imageRepository, imagePullPolicy

This commit is contained in:
Markus Pesch 2024-11-26 19:03:20 +01:00
parent 7b98e68b03
commit 19b5ac5969
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982

View File

@ -54,6 +54,12 @@ tests:
name: prometheus-postgres-exporter-unittest-exporter-config
- secret:
name: prometheus-postgres-exporter-unittest-web-config
- equal:
path: spec.template.spec.containers[0].image
value: quay.io/prometheuscommunity/postgres-exporter:v0.1.0
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: IfNotPresent
- it: Test additional arguments
set:
@ -70,7 +76,24 @@ tests:
- --foo=bar
- --bar=foo
- it: Test custom database secret
- it: Test custom imageRegistry and imageRepository
set:
deployment.postgresExporter.image.registry: registry.example.local
deployment.postgresExporter.image.repository: path/special/prometheus-postgres-exporter
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: registry.example.local/path/special/prometheus-postgres-exporter:v0.1.0
- it: Test custom imagePullPolicy
set:
deployment.postgresExporter.image.pullPolicy: Always
asserts:
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: Always
- it: Test config.database.existingSecret
set:
config.database.existingSecret.enabled: true
config.database.existingSecret.secretName: custom-database-secret