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 }} dnsPolicy: {{ .Values.deployment.dnsPolicy }}
{{- end }} {{- end }}
{{- if .Values.deployment.hostname }} {{- if .Values.deployment.hostname }}
hostname: {{ .Values.batch.dbUpdate.hostname }} hostname: {{ .Values.deployment.hostname }}
{{- end }} {{- end }}
hostNetwork: {{ .Values.deployment.hostNetwork }} hostNetwork: {{ .Values.deployment.hostNetwork }}
{{- with .Values.deployment.imagePullSecrets }} {{- with .Values.deployment.imagePullSecrets }}

View File

@ -68,10 +68,17 @@ tests:
path: spec.template.spec.dnsConfig path: spec.template.spec.dnsConfig
- notExists: - notExists:
path: spec.template.spec.dnsPolicy path: spec.template.spec.dnsPolicy
- notExists:
path: spec.template.spec.hostname
- equal:
path: spec.template.spec.hostNetwork
value: false
- notExists: - notExists:
path: spec.template.spec.nodeSelector path: spec.template.spec.nodeSelector
- notExists: - notExists:
path: spec.template.spec.priorityClassName path: spec.template.spec.priorityClassName
- notExists:
path: spec.template.spec.subdomain
- it: Test additional arguments - it: Test additional arguments
set: set:
@ -228,6 +235,22 @@ tests:
path: spec.template.spec.dnsPolicy path: spec.template.spec.dnsPolicy
value: ClusterFirst 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 - it: Test nodeSelector
set: set:
deployment.nodeSelector: deployment.nodeSelector: