Skip to content

Commit 7b829af

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

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

templates/config/controller/deployment.yaml.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ spec:
7979
terminationGracePeriodSeconds: 10
8080
serviceAccountName: {{ .ServiceAccountName }}
8181
hostIPC: false
82-
hostNetwork: false
8382
hostPID: false
83+
hostNetwork: false

templates/helm/templates/deployment.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,15 @@ spec:
141141
priorityClassName: {{ .Values.deployment.priorityClassName }}
142142
{{ end -}}
143143
hostIPC: false
144-
hostNetwork: false
145144
hostPID: false
145+
{{ if .Values.deployment.hostNetwork }}
146+
hostNetwork: true
147+
dnsPolicy: ClusterFirstWithHostNet
148+
{{ else }}
149+
hostNetwork: false
150+
{{ with .Values.deployment.dnsPolicy }}
151+
dnsPolicy: {{ . }}
152+
{{ end }}
146153
volumes:
147154
{{- if .Values.aws.credentials.secretName -}}
148155
- 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: ClusterFirst
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)