diff --git a/README.md b/README.md index 73e1f9f3..7b942d2c 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ helm delete --namespace test my-application | deployment.image.digest | string | `""` | Image digest. If set to a non-empty value, digest takes precedence on the tag. | | deployment.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy. | | deployment.dnsConfig | object | `nil` | DNS config for the pods. | +| deployment.dnsPolicy | string | `"ClusterFirst"` | DNS Policy. | | deployment.startupProbe | object | See below | Startup probe. Must specify either one of the following field when enabled: httpGet, exec, tcpSocket, grpc | | deployment.startupProbe.enabled | bool | `false` | Enable Startup probe. | | deployment.startupProbe.failureThreshold | int | `30` | Number of retries before marking the pod as failed. | diff --git a/application/templates/cronjob.yaml b/application/templates/cronjob.yaml index 3db0c94c..e3edfbac 100644 --- a/application/templates/cronjob.yaml +++ b/application/templates/cronjob.yaml @@ -125,6 +125,13 @@ spec: imagePullSecrets: {{ toYaml . | indent 12 }} {{ end }} + {{- if $job.dnsConfig }} + dnsConfig: + {{ toYaml $job.dnsConfig | indent 8 }} + {{- end }} + {{- if $job.dnsPolicy }} + dnsPolicy: {{ $job.dnsPolicy }} + {{- end }} {{- with $job.volumes }} volumes: {{ toYaml . | indent 12 }} diff --git a/application/templates/deployment.yaml b/application/templates/deployment.yaml index 4f5bfd23..1f827f4f 100644 --- a/application/templates/deployment.yaml +++ b/application/templates/deployment.yaml @@ -285,6 +285,9 @@ spec: dnsConfig: {{ toYaml .Values.deployment.dnsConfig | indent 8 }} {{- end }} + {{- if .Values.deployment.dnsPolicy }} + dnsPolicy: {{ .Values.deployment.dnsPolicy }} + {{- end }} {{- if or (.Values.deployment.openshiftOAuthProxy.enabled) (.Values.deployment.volumes) (and (eq .Values.persistence.enabled true) (eq .Values.persistence.mountPVC true) )}} volumes: {{- if .Values.deployment.openshiftOAuthProxy.enabled }} diff --git a/application/templates/job.yaml b/application/templates/job.yaml index 8097a15d..6dc0501e 100644 --- a/application/templates/job.yaml +++ b/application/templates/job.yaml @@ -107,6 +107,13 @@ spec: imagePullSecrets: {{ toYaml . | indent 8 }} {{ end }} + {{- if $job.dnsConfig }} + dnsConfig: +{{ toYaml $job.dnsConfig | indent 8 }} + {{- end }} + {{- if $job.dnsPolicy }} + dnsPolicy: {{ $job.dnsPolicy }} + {{- end }} {{- with $job.volumes }} volumes: {{ toYaml . | indent 8 }} diff --git a/application/values-test.yaml b/application/values-test.yaml index 5ab93b63..33e63bb8 100644 --- a/application/values-test.yaml +++ b/application/values-test.yaml @@ -12,6 +12,7 @@ deployment: options: - name: ndots value: '1' + dnsPolicy: ClusterFirst # By default deploymentStrategy is set to rollingUpdate with maxSurge of 25% and maxUnavailable of 25% # You can change type to `Recreate` or can uncomment `rollingUpdate` specification and adjust them to your usage. strategy: diff --git a/application/values.yaml b/application/values.yaml index 3569adb6..f119ff36 100644 --- a/application/values.yaml +++ b/application/values.yaml @@ -251,6 +251,9 @@ deployment: # options: # - name: ndots # value: '1' + # -- (string) DNS Policy. + # @section -- Deployment Parameters + dnsPolicy: ClusterFirst # -- (object) Startup probe. # @default -- See below # Must specify either one of the following field when enabled: httpGet, exec, tcpSocket, grpc