Skip to content

Commit dba59e8

Browse files
committed
[occm] Make hostNetwork configurable in the Helm chart
1 parent 57e8d5d commit dba59e8

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

charts/openstack-cloud-controller-manager/templates/daemonset.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ spec:
109109
{{- if .Values.extraInitContainers }}
110110
initContainers: {{ toYaml .Values.extraInitContainers | nindent 6 }}
111111
{{- end }}
112-
dnsPolicy: {{ .Values.dnsPolicy }}
113-
hostNetwork: true
112+
hostNetwork: {{ .Values.hostNetwork }}
113+
dnsPolicy: {{ if and .Values.hostNetwork (eq .Values.dnsPolicy "ClusterFirst") }}ClusterFirstWithHostNet{{ else }}{{ .Values.dnsPolicy }}{{ end }}
114114
{{- if .Values.priorityClassName }}
115115
priorityClassName: {{ .Values.priorityClassName }}
116116
{{- end }}

charts/openstack-cloud-controller-manager/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ livenessProbe: {}
4646
# Set readinessProbe in the same way like livenessProbe
4747
readinessProbe: {}
4848

49+
# Use host network for the controller pods. This is required if the controller
50+
# needs to access the node network (e.g. for cloud-node or route controllers),
51+
# but can be disabled if you only need specific controllers like the service
52+
# (Octavia LB) controller.
53+
hostNetwork: true
54+
4955
dnsPolicy: ClusterFirst
5056

5157
# Set nodeSelector where the controller should run, i.e. controlplane nodes

0 commit comments

Comments
 (0)