diff --git a/README.md b/README.md index 73e1f9f3..e1b70455 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 | `""` | 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..417b87ea 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 12 }} + {{- 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..fc475e0b 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: @@ -1307,6 +1308,10 @@ cronJob: requests: memory: 5Gi cpu: 1 + dnsConfig: + options: + - name: ndots + value: '1' # Take backup of application namespace backup: @@ -1352,3 +1357,7 @@ job: requests: memory: 5Gi cpu: 1 + dnsConfig: + options: + - name: ndots + value: '1' diff --git a/application/values.yaml b/application/values.yaml index 3569adb6..5298dd36 100644 --- a/application/values.yaml +++ b/application/values.yaml @@ -41,6 +41,11 @@ cronJob: # requests: # memory: 5Gi # cpu: 1 + # dnsConfig: + # options: + # - name: ndots + # value: '1' + # dnsPolicy: ClusterFirst job: @@ -71,6 +76,11 @@ job: # requests: # memory: 5Gi # cpu: 1 + # dnsConfig: + # options: + # - name: ndots + # value: '1' + # dnsPolicy: ClusterFirst deployment: # -- (bool) Enable Deployment. @@ -251,6 +261,9 @@ deployment: # options: # - name: ndots # value: '1' + # -- (string) DNS Policy. + # @section -- Deployment Parameters + dnsPolicy: "" # -- (object) Startup probe. # @default -- See below # Must specify either one of the following field when enabled: httpGet, exec, tcpSocket, grpc