Skip to content

Ingress webhook to workaround the CCM issue#1403

Draft
makhov wants to merge 1 commit intok0sproject:mainfrom
makhov:ingress-ccm-issue-fix
Draft

Ingress webhook to workaround the CCM issue#1403
makhov wants to merge 1 commit intok0sproject:mainfrom
makhov:ingress-ccm-issue-fix

Conversation

@makhov
Copy link
Copy Markdown
Contributor

@makhov makhov commented Mar 18, 2026

Create mutating webhook to add KUBERNETES_SERVICE_HOST env var to the pods with given label.

This breaks the CCM chicken-and-egg: CCM pods can reach the API server whithout local HAProxy, report node addresses, so kubernetes default service can be configured

@makhov makhov requested a review from a team as a code owner March 18, 2026 14:21
@makhov makhov marked this pull request as draft March 18, 2026 14:21
@makhov makhov force-pushed the ingress-ccm-issue-fix branch from b559049 to 0eee68d Compare March 26, 2026 12:03
…CE_HOST env var to the pods with provided label

Signed-off-by: Alexey Makhov <amakhov@mirantis.com>
Signed-off-by: makhov <amakhov@mirantis.com>
@makhov makhov force-pushed the ingress-ccm-issue-fix branch from 0eee68d to 717a670 Compare March 26, 2026 12:08
@apedriza
Copy link
Copy Markdown
Contributor

Nothing new to add from my side, but here are my two cents; IMO, overriding CCM env vars under the hood is not fully transparent to users. In practice, users still need to configure CCM for this scenario anyway, either by adding labels so pods are selected by the mutating webhook, or by setting the env vars if the webhook is not running.

I think it is fair to give users full responsibility for configuring those CCM env vars. That way ensures user knows what's going on in the CCM envs and there are no lines to maintain in k0smotron side. This is one of the benefits of being able to configure an app running in the cluster, so automation might not be needed for this. Documentation of this limitation and the required CCM configuration may be enough..?

@makhov
Copy link
Copy Markdown
Contributor Author

makhov commented Mar 30, 2026

I agree with all concerns. The webhook in question is optional and should be explicitly enabled and user needs to specify the label. All CCMs comes with some labels which can be used here, so no need to change it.
But I'm still on the fence about this change, not sure if it worth adding to the k0smotron code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants