Skip to content

Commit 892f29d

Browse files
authoredSep 14, 2023
Support setting HostNetwork and DnsPolicy using helm chart values (#460)
Issue #, if available: Description of changes: - Support setting `HostNetwork` and `DnsPolicy` using helm chart values By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent daee073 commit 892f29d

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed
 

‎templates/config/controller/deployment.yaml.tpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,6 @@ spec:
8585
terminationGracePeriodSeconds: 10
8686
serviceAccountName: {{ .ServiceAccountName }}
8787
hostIPC: false
88-
hostNetwork: false
8988
hostPID: false
89+
hostNetwork: false
90+
dnsPolicy: ClusterFirst

‎templates/helm/templates/deployment.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ spec:
147147
priorityClassName: {{ .Values.deployment.priorityClassName }}
148148
{{ end -}}
149149
hostIPC: false
150-
hostNetwork: false
151150
hostPID: false
151+
hostNetwork: {{ .Values.deployment.hostNetwork }}
152+
dnsPolicy: {{ .Values.deployment.dnsPolicy }}
152153
volumes:
153154
{{- if .Values.aws.credentials.secretName -}}
154155
- name: {{ .Values.aws.credentials.secretName }}

‎templates/helm/values.yaml.tpl

+11-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ deployment:
3232
# Which priorityClassName to set?
3333
# See: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority
3434
priorityClassName: ""
35+
# Specifies the hostname of the Pod.
36+
# If not specified, the pod's hostname will be set to a system-defined value.
37+
hostNetwork: false
38+
# Set DNS policy for the pod.
39+
# Defaults to "ClusterFirst".
40+
# Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.
41+
# To have DNS options set along with hostNetwork, you have to specify DNS policy
42+
# explicitly to 'ClusterFirstWithHostNet'.
43+
dnsPolicy: ClusterFirst
3544
extraVolumes: []
3645
extraVolumeMounts: []
3746

@@ -56,7 +65,7 @@ deployment:
5665
# If "installScope: cluster" then these labels will be applied to ClusterRole
5766
role:
5867
labels: {}
59-
68+
6069
metrics:
6170
service:
6271
# Set to true to automatically create a Kubernetes Service resource for the
@@ -84,7 +93,7 @@ aws:
8493
# Secret stringData key that contains the credentials
8594
secretKey: "credentials"
8695
# Profile used for AWS credentials
87-
profile: "default"
96+
profile: "default"
8897

8998
# log level for the controller
9099
log:

0 commit comments

Comments
 (0)