diff --git a/charts/k8s-service/templates/_deployment_spec.tpl b/charts/k8s-service/templates/_deployment_spec.tpl index 6dd0d16..2a72b76 100644 --- a/charts/k8s-service/templates/_deployment_spec.tpl +++ b/charts/k8s-service/templates/_deployment_spec.tpl @@ -145,6 +145,10 @@ spec: {{ toYaml .Values.hostAliases | indent 8 }} {{- end }} + {{- if .Values.dnsPolicy }} + dnsPolicy: {{ .Values.dnsPolicy }} + {{- end }} + containers: {{- if .isCanary }} - name: {{ .Values.applicationName }}-canary diff --git a/charts/k8s-service/values.yaml b/charts/k8s-service/values.yaml index 2164f5e..c0adc97 100644 --- a/charts/k8s-service/values.yaml +++ b/charts/k8s-service/values.yaml @@ -76,6 +76,14 @@ containerPorts: port: 80 protocol: TCP +# dnsPolicy sets the Pod DNS policy. Allowed values are "Default", "ClusterFirst", "ClusterFirstWithHostNet" (not supported on Windows), +# and "None". Note that "Default" is not the default DNS policy. If dnsPolicy is not explicitly specified, then "ClusterFirst" is used. +# See [Pod's DNS Policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy) for details. +# +# EXAMPLE: +# +# dnsPolicy: "ClusterFirst" + # startupProbe is a map that specifies the startup probe of the main application container. Startup probes indicate # when a container application has started. If such a probe is configured, it disables liveness and readiness checks # until it succeeds, making sure those probes don't interfere with the application startup. This can be used to adopt