Skip to content

[occm] Make hostNetwork configurable in the Helm chart#3097

Open
zwindler wants to merge 1 commit intokubernetes:masterfrom
zwindler:feat/configurable-hostnetwork
Open

[occm] Make hostNetwork configurable in the Helm chart#3097
zwindler wants to merge 1 commit intokubernetes:masterfrom
zwindler:feat/configurable-hostnetwork

Conversation

@zwindler
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Makes hostNetwork configurable in the cloud controller manager Helm chart by adding a hostNetwork value (default: true).

Currently hostNetwork: true is hardcoded in the DaemonSet template. This makes sense for the default use case where OCCM manages nodes and routes, but for users who only run a subset of controllers (e.g. just the service controller for Octavia LB), hostNetwork is an unnecessary privilege escalation. The controller only needs to talk to the Kubernetes API and the OpenStack API, both reachable from pod networking.

This PR also fixes dnsPolicy to automatically use ClusterFirstWithHostNet when hostNetwork is true, as recommended by the Kubernetes docs:

ClusterFirstWithHostNet: For Pods running with hostNetwork, you should explicitly set its DNS policy to ClusterFirstWithHostNet. Otherwise, Pods running with hostNetwork and "ClusterFirst" will fallback to the behavior of the "Default" policy.

The current chart uses dnsPolicy: ClusterFirst with hostNetwork: true, which falls back to host DNS. This has no practical impact today since OCCM doesn't resolve cluster-internal service names, but it's technically incorrect.

Which issue this PR fixes(if applicable):

N/A

Special notes for reviewers:

The default remains hostNetwork: true, so this is a no-op for existing deployments.

This PR contains two distinct changes: the hostNetwork toggle and the dnsPolicy fix. If you'd prefer to keep them separate, I can split this into two PRs.

Release note:

[openstack-cloud-controller-manager] Make hostNetwork configurable in the Helm chart (default: true)

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 15, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dulek for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @zwindler. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot requested review from dulek and zetaab April 15, 2026 09:46
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 15, 2026
@zwindler zwindler force-pushed the feat/configurable-hostnetwork branch from dba59e8 to bfcd6e6 Compare April 15, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants