Skip to content

Commit ed0ecb5

Browse files
committed
chore: Support Hostnetwork and DnsPolicy
1 parent 5e27da3 commit ed0ecb5

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

templates/config/controller/deployment.yaml.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,12 @@ spec:
8181
hostIPC: false
8282
hostNetwork: false
8383
hostPID: false
84+
{{ if .Values.hostNetwork }}
85+
hostNetwork: true
86+
dnsPolicy: ClusterFirstWithHostNet
87+
{{ else }}
88+
hostNetwork: false
89+
{{ with .Values.dnsPolicy }}
90+
dnsPolicy: {{ . }}
91+
{{ end }}
92+
{{ end }}

templates/helm/templates/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ spec:
143143
hostIPC: false
144144
hostNetwork: false
145145
hostPID: false
146+
{{ if .Values.hostNetwork }}
147+
hostNetwork: true
148+
dnsPolicy: ClusterFirstWithHostNet
149+
{{ else }}
150+
hostNetwork: false
151+
{{ with .Values.dnsPolicy }}
152+
dnsPolicy: {{ . }}
153+
{{ end }}
146154
volumes:
147155
{{- if .Values.aws.credentials.secretName -}}
148156
- name: {{ .Values.aws.credentials.secretName }}

templates/helm/values.yaml.tpl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ deployment:
2828
# Which priorityClassName to set?
2929
# See: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority
3030
priorityClassName: ""
31+
hostNetwork: false
32+
# Which dnsPolicy to set?
33+
# See: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
34+
dnsPolicy:
3135
extraVolumes: []
3236
extraVolumeMounts: []
3337

@@ -52,7 +56,7 @@ deployment:
5256
# If "installScope: cluster" then these labels will be applied to ClusterRole
5357
role:
5458
labels: {}
55-
59+
5660
metrics:
5761
service:
5862
# Set to true to automatically create a Kubernetes Service resource for the
@@ -80,7 +84,7 @@ aws:
8084
# Secret stringData key that contains the credentials
8185
secretKey: "credentials"
8286
# Profile used for AWS credentials
83-
profile: "default"
87+
profile: "default"
8488

8589
# log level for the controller
8690
log:

0 commit comments

Comments
 (0)