test(deployment): hostNetwork, hostname, subdomain

This commit is contained in:
Markus Pesch 2024-11-26 19:41:40 +01:00
parent 70abc21fb4
commit ed10c5362a
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 24 additions and 1 deletions

View File

@ -81,7 +81,7 @@ spec:
dnsPolicy: {{ .Values.deployment.dnsPolicy }}
{{- end }}
{{- if .Values.deployment.hostname }}
hostname: {{ .Values.batch.dbUpdate.hostname }}
hostname: {{ .Values.deployment.hostname }}
{{- end }}
hostNetwork: {{ .Values.deployment.hostNetwork }}
{{- with .Values.deployment.imagePullSecrets }}

View File

@ -68,10 +68,17 @@ tests:
path: spec.template.spec.dnsConfig
- notExists:
path: spec.template.spec.dnsPolicy
- notExists:
path: spec.template.spec.hostname
- equal:
path: spec.template.spec.hostNetwork
value: false
- notExists:
path: spec.template.spec.nodeSelector
- notExists:
path: spec.template.spec.priorityClassName
- notExists:
path: spec.template.spec.subdomain
- it: Test additional arguments
set:
@ -228,6 +235,22 @@ tests:
path: spec.template.spec.dnsPolicy
value: ClusterFirst
- it: Test hostNetwork, hostname, subdomain
set:
deployment.hostNetwork: true
deployment.hostname: pg-exporter
deployment.subdomain: exporters.internal
asserts:
- equal:
path: spec.template.spec.hostNetwork
value: true
- equal:
path: spec.template.spec.hostname
value: pg-exporter
- equal:
path: spec.template.spec.subdomain
value: exporters.internal
- it: Test nodeSelector
set:
deployment.nodeSelector: