From b9ea2e303daab4e43e35d13dcff4858bc01691b7 Mon Sep 17 00:00:00 2001 From: Chris Werner Rau Date: Fri, 17 Oct 2025 16:47:34 +0200 Subject: [PATCH] fix: don't set NODE_IP for kubeproxy, otherwise it fails without cloud provider This can happen during bootstrapping as well as when the provider is down for some reason. --- pkg/reconcilers/workload/kubeproxy/reconciler.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/pkg/reconcilers/workload/kubeproxy/reconciler.go b/pkg/reconcilers/workload/kubeproxy/reconciler.go index 0611200..9196d32 100644 --- a/pkg/reconcilers/workload/kubeproxy/reconciler.go +++ b/pkg/reconcilers/workload/kubeproxy/reconciler.go @@ -278,6 +278,7 @@ func (kr *kubeProxyReconciler) reconcileKubeProxyConfigMap( }, ClusterCIDR: kr.podCIDR, MetricsBindAddress: "0.0.0.0:10249", + NodePortAddresses: []string{"primary"}, } kubeconfigBytes, err := clientcmd.Write(*kubeconfig) @@ -364,12 +365,6 @@ func (kr *kubeProxyReconciler) reconcileKubeProxyDaemonSet( WithFieldPath("spec.nodeName"), ), ), - corev1ac.EnvVar().WithName("NODE_IP"). - WithValueFrom(corev1ac.EnvVarSource(). - WithFieldRef(corev1ac.ObjectFieldSelector(). - WithFieldPath("status.hostIP"), - ), - ), ). WithVolumeMounts(kubeProxyConfigVolumeMount, xtablesLockVolumeMount, modulesVolumeMount) @@ -424,10 +419,8 @@ func (kr *kubeProxyReconciler) buildArgs( kubeProxyConfigVolumeMount *corev1ac.VolumeMountApplyConfiguration, ) []string { args := map[string]string{ - "config": path.Join(*kubeProxyConfigVolumeMount.MountPath, kr.kubeProxyConfigMapKey), - "hostname-override": "$(NODE_NAME)", - "nodeport-addresses": "primary", - "bind-address": "$(NODE_IP)", + "config": path.Join(*kubeProxyConfigVolumeMount.MountPath, kr.kubeProxyConfigMapKey), + "hostname-override": "$(NODE_NAME)", } return operatorutil.ArgsToSlice(ctx, hostedControlPlane.Spec.KubeProxy.Args, args) }