From bfcd6e6a51e961154c7e2625aa35ccbebde695f9 Mon Sep 17 00:00:00 2001
From: Denis GERMAIN
Date: Wed, 15 Apr 2026 11:42:11 +0200
Subject: [PATCH] [occm] Make hostNetwork configurable in the Helm chart
---
charts/openstack-cloud-controller-manager/Chart.yaml | 2 +-
.../templates/daemonset.yaml | 4 ++--
charts/openstack-cloud-controller-manager/values.yaml | 6 ++++++
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/charts/openstack-cloud-controller-manager/Chart.yaml b/charts/openstack-cloud-controller-manager/Chart.yaml
index 3f083bf687..95ed5a8e4c 100644
--- a/charts/openstack-cloud-controller-manager/Chart.yaml
+++ b/charts/openstack-cloud-controller-manager/Chart.yaml
@@ -4,7 +4,7 @@ description: Openstack Cloud Controller Manager Helm Chart
icon: https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/6e4619c416ff4bd19e1c087f27a43eea/www-images-prod/openstack-logo/OpenStack-Logo-Vertical.png
home: https://github.com/kubernetes/cloud-provider-openstack
name: openstack-cloud-controller-manager
-version: 2.35.0
+version: 2.35.1
maintainers:
- name: eumel8
email: f.kloeker@telekom.de
diff --git a/charts/openstack-cloud-controller-manager/templates/daemonset.yaml b/charts/openstack-cloud-controller-manager/templates/daemonset.yaml
index 40f98ea3f8..2a6d7d2936 100644
--- a/charts/openstack-cloud-controller-manager/templates/daemonset.yaml
+++ b/charts/openstack-cloud-controller-manager/templates/daemonset.yaml
@@ -109,8 +109,8 @@ spec:
{{- if .Values.extraInitContainers }}
initContainers: {{ toYaml .Values.extraInitContainers | nindent 6 }}
{{- end }}
- dnsPolicy: {{ .Values.dnsPolicy }}
- hostNetwork: true
+ hostNetwork: {{ .Values.hostNetwork }}
+ dnsPolicy: {{ if and .Values.hostNetwork (eq .Values.dnsPolicy "ClusterFirst") }}ClusterFirstWithHostNet{{ else }}{{ .Values.dnsPolicy }}{{ end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
diff --git a/charts/openstack-cloud-controller-manager/values.yaml b/charts/openstack-cloud-controller-manager/values.yaml
index d813226992..679730b509 100644
--- a/charts/openstack-cloud-controller-manager/values.yaml
+++ b/charts/openstack-cloud-controller-manager/values.yaml
@@ -46,6 +46,12 @@ livenessProbe: {}
# Set readinessProbe in the same way like livenessProbe
readinessProbe: {}
+# Use host network for the controller pods. This is required if the controller
+# needs to access the node network (e.g. for cloud-node or route controllers),
+# but can be disabled if you only need specific controllers like the service
+# (Octavia LB) controller.
+hostNetwork: true
+
dnsPolicy: ClusterFirst
# Set nodeSelector where the controller should run, i.e. controlplane nodes