Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust parameters for testing cilium kube-proxy replacement mode #680

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/k8s/pkg/k8sd/app/hooks_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ func (a *App) onBootstrapWorkerNode(ctx context.Context, s state.State, encodedT
if err := setup.KubeletWorker(snap, s.Name(), nodeIP, response.ClusterDNS, response.ClusterDomain, response.CloudProvider, joinConfig.ExtraNodeKubeletArgs); err != nil {
return fmt.Errorf("failed to configure kubelet: %w", err)
}
if err := setup.KubeProxy(ctx, snap, s.Name(), response.PodCIDR, localhostAddress, joinConfig.ExtraNodeKubeProxyArgs); err != nil {
return fmt.Errorf("failed to configure kube-proxy: %w", err)
}
// if err := setup.KubeProxy(ctx, snap, s.Name(), response.PodCIDR, localhostAddress, joinConfig.ExtraNodeKubeProxyArgs); err != nil {
// return fmt.Errorf("failed to configure kube-proxy: %w", err)
// }
if err := setup.K8sAPIServerProxy(snap, response.APIServers, localhostAddress, joinConfig.ExtraNodeK8sAPIServerProxyArgs); err != nil {
return fmt.Errorf("failed to configure k8s-apiserver-proxy: %w", err)
}
Expand Down Expand Up @@ -432,9 +432,9 @@ func (a *App) onBootstrapControlPlane(ctx context.Context, s state.State, bootst
if err := setup.KubeletControlPlane(snap, s.Name(), nodeIP, cfg.Kubelet.GetClusterDNS(), cfg.Kubelet.GetClusterDomain(), cfg.Kubelet.GetCloudProvider(), cfg.Kubelet.GetControlPlaneTaints(), bootstrapConfig.ExtraNodeKubeletArgs); err != nil {
return fmt.Errorf("failed to configure kubelet: %w", err)
}
if err := setup.KubeProxy(ctx, snap, s.Name(), cfg.Network.GetPodCIDR(), localhostAddress, bootstrapConfig.ExtraNodeKubeProxyArgs); err != nil {
return fmt.Errorf("failed to configure kube-proxy: %w", err)
}
// if err := setup.KubeProxy(ctx, snap, s.Name(), cfg.Network.GetPodCIDR(), localhostAddress, bootstrapConfig.ExtraNodeKubeProxyArgs); err != nil {
// return fmt.Errorf("failed to configure kube-proxy: %w", err)
// }
if err := setup.KubeControllerManager(snap, bootstrapConfig.ExtraNodeKubeControllerManagerArgs); err != nil {
return fmt.Errorf("failed to configure kube-controller-manager: %w", err)
}
Expand Down
6 changes: 3 additions & 3 deletions src/k8s/pkg/k8sd/app/hooks_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ func (a *App) onPostJoin(ctx context.Context, s state.State, initConfig map[stri
if err := setup.KubeletControlPlane(snap, s.Name(), nodeIP, cfg.Kubelet.GetClusterDNS(), cfg.Kubelet.GetClusterDomain(), cfg.Kubelet.GetCloudProvider(), cfg.Kubelet.GetControlPlaneTaints(), joinConfig.ExtraNodeKubeletArgs); err != nil {
return fmt.Errorf("failed to configure kubelet: %w", err)
}
if err := setup.KubeProxy(ctx, snap, s.Name(), cfg.Network.GetPodCIDR(), localhostAddress, joinConfig.ExtraNodeKubeProxyArgs); err != nil {
return fmt.Errorf("failed to configure kube-proxy: %w", err)
}
// if err := setup.KubeProxy(ctx, snap, s.Name(), cfg.Network.GetPodCIDR(), localhostAddress, joinConfig.ExtraNodeKubeProxyArgs); err != nil {
// return fmt.Errorf("failed to configure kube-proxy: %w", err)
// }
if err := setup.KubeControllerManager(snap, joinConfig.ExtraNodeKubeControllerManagerArgs); err != nil {
return fmt.Errorf("failed to configure kube-controller-manager: %w", err)
}
Expand Down
9 changes: 3 additions & 6 deletions src/k8s/pkg/k8sd/features/cilium/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ func ApplyNetwork(ctx context.Context, snap snap.Snap, cfg types.Network, _ type
"tag": CiliumAgentImageTag,
"useDigest": false,
},
"socketLB": map[string]any{
"enabled": true,
},
"cni": map[string]any{
"confPath": "/etc/cni/net.d",
"binPath": "/opt/cni/bin",
Expand All @@ -87,10 +84,10 @@ func ApplyNetwork(ctx context.Context, snap snap.Snap, cfg types.Network, _ type
"clusterPoolIPv6PodCIDRList": ipv6CIDR,
},
},
"nodePort": map[string]any{
"enabled": true,
},
"disableEnvoyVersionCheck": true,
"kubeProxyReplacement": true,
"k8sServiceHost": "127.0.0.1",
"k8sServicePort": 6443,
}

if snap.Strict() {
Expand Down
4 changes: 2 additions & 2 deletions src/k8s/pkg/snap/util/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ var (
"containerd",
"k8s-apiserver-proxy",
"kubelet",
"kube-proxy",
// "kube-proxy",
}
// controlPlaneServices contains all k8s services that run on a control plane except of k8sd.
controlPlaneServices = []string{
"containerd",
"kube-controller-manager",
"kube-proxy",
// "kube-proxy",
"kube-scheduler",
"kubelet",
"kube-apiserver",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/tests/test_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_smoke(instances: List[harness.Instance]):
"kube-apiserver": "--request-timeout=2m",
"kube-controller-manager": "--leader-elect-retry-period=3s",
"kube-scheduler": "--authorization-webhook-cache-authorized-ttl=11s",
"kube-proxy": "--config-sync-period=14m",
# "kube-proxy": "--config-sync-period=14m",
"kubelet": "--authentication-token-webhook-cache-ttl=3m",
"containerd": "--log-level=debug",
"k8s-dqlite": "--watch-storage-available-size-interval=6s",
Expand Down
Loading