Skip to content

Commit

Permalink
feat: add dnsPolicy support to Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjo committed Nov 24, 2024
1 parent ca4bc59 commit 777596e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 for the pods. |
| 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. |
Expand Down
3 changes: 3 additions & 0 deletions application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions application/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions application/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 777596e

Please sign in to comment.