fix(deployment): extend arguments

This commit is contained in:
Markus Pesch 2024-11-26 18:32:24 +01:00
parent be0e152de8
commit 6c30756f8d
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 22 additions and 0 deletions

View File

@ -24,6 +24,7 @@ spec:
- name: postgres-exporter
args:
- "--config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml"
- "--web.config.file=/etc/prometheus-postgres-exporter/config.d/web-config.yaml"
- "--web.listen-address=:9187"
{{- range .Values.deployment.postgresExporter.args }}
- {{ . | quote }}

View File

@ -32,6 +32,27 @@ tests:
content:
secretRef:
name: prometheus-postgres-exporter-unittest-database-env
- equal:
path: spec.template.spec.containers[0].args
value:
- --config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml
- --web.config.file=/etc/prometheus-postgres-exporter/config.d/web-config.yaml
- --web.listen-address=:9187
- it: Test additional arguments
set:
deployment.postgresExporter.args:
- "--foo=bar"
- "--bar=foo"
asserts:
- equal:
path: spec.template.spec.containers[0].args
value:
- --config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml
- --web.config.file=/etc/prometheus-postgres-exporter/config.d/web-config.yaml
- --web.listen-address=:9187
- --foo=bar
- --bar=foo
- it: Test custom database secret
set: