diff --git a/charts/gateway/templates/deployment.yaml b/charts/gateway/templates/deployment.yaml index 929bfee3..6ed27b8d 100644 --- a/charts/gateway/templates/deployment.yaml +++ b/charts/gateway/templates/deployment.yaml @@ -115,7 +115,7 @@ spec: {{- end }} {{- with .Values.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: diff --git a/charts/gateway/templates/tests/test-connection.yaml b/charts/gateway/templates/tests/test-connection.yaml index 808a1211..ec371945 100644 --- a/charts/gateway/templates/tests/test-connection.yaml +++ b/charts/gateway/templates/tests/test-connection.yaml @@ -22,7 +22,7 @@ spec: command: - "sh" - "-c" - - | + - > {{ $curlOpts := "--fail --retry 5 --retry-all-errors --connect-timeout 10 --retry-delay 10 --verbose" }} {{- if eq .Values.service.type "NodePort" }} if curl {{ $curlOpts }} --insecure https://${NODE_IP}:30443/entity/GATEWAY_BACKEND; then diff --git a/tests/gateway/test-values.yaml b/tests/gateway/test-values.yaml index d05466d0..c0de6e8d 100644 --- a/tests/gateway/test-values.yaml +++ b/tests/gateway/test-values.yaml @@ -34,3 +34,14 @@ resources: requests: cpu: 250m memory: 256Mi + +affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/instance + operator: In + values: + - "{{ .Release.Name }}" + topologyKey: "kubernetes.io/hostname"