From 98f1453d511f9f154bb64b0acc0d3345dd9e6cf4 Mon Sep 17 00:00:00 2001 From: Etienne Audet-Cobello Date: Thu, 13 Jun 2024 09:40:43 -0400 Subject: [PATCH] merge --- src/k8s/pkg/k8sd/setup/kube_controller_manager_test.go | 7 ++++--- src/k8s/pkg/k8sd/setup/kubelet_test.go | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/k8s/pkg/k8sd/setup/kube_controller_manager_test.go b/src/k8s/pkg/k8sd/setup/kube_controller_manager_test.go index 625f95fe73..e556e2f58b 100644 --- a/src/k8s/pkg/k8sd/setup/kube_controller_manager_test.go +++ b/src/k8s/pkg/k8sd/setup/kube_controller_manager_test.go @@ -142,15 +142,16 @@ func TestKubeControllerManager(t *testing.T) { }{ {key: "--authentication-kubeconfig", expectedVal: path.Join(s.Mock.KubernetesConfigDir, "controller.conf")}, {key: "--authorization-kubeconfig", expectedVal: path.Join(s.Mock.KubernetesConfigDir, "controller.conf")}, + {key: "--cluster-signing-cert-file", expectedVal: path.Join(s.Mock.KubernetesPKIDir, "ca.crt")}, + {key: "--cluster-signing-key-file", expectedVal: path.Join(s.Mock.KubernetesPKIDir, "ca.key")}, {key: "--kubeconfig", expectedVal: path.Join(s.Mock.KubernetesConfigDir, "controller.conf")}, {key: "--leader-elect-renew-deadline", expectedVal: "15s"}, + {key: "--my-extra-arg", expectedVal: "my-extra-val"}, {key: "--profiling", expectedVal: "true"}, {key: "--root-ca-file", expectedVal: path.Join(s.Mock.KubernetesPKIDir, "ca.crt")}, {key: "--service-account-private-key-file", expectedVal: path.Join(s.Mock.KubernetesPKIDir, "serviceaccount.key")}, + {key: "--terminated-pod-gc-threshold", expectedVal: "12500"}, {key: "--use-service-account-credentials", expectedVal: "true"}, - {key: "--cluster-signing-cert-file", expectedVal: path.Join(s.Mock.KubernetesPKIDir, "ca.crt")}, - {key: "--cluster-signing-key-file", expectedVal: path.Join(s.Mock.KubernetesPKIDir, "ca.key")}, - {key: "--my-extra-arg", expectedVal: "my-extra-val"}, } for _, tc := range tests { t.Run(tc.key, func(t *testing.T) { diff --git a/src/k8s/pkg/k8sd/setup/kubelet_test.go b/src/k8s/pkg/k8sd/setup/kubelet_test.go index 5145e7a78c..33e65a3f7a 100644 --- a/src/k8s/pkg/k8sd/setup/kubelet_test.go +++ b/src/k8s/pkg/k8sd/setup/kubelet_test.go @@ -269,23 +269,24 @@ func TestKubelet(t *testing.T) { }{ {key: "--anonymous-auth", expectedVal: "false"}, {key: "--authentication-token-webhook", expectedVal: "true"}, - {key: "--cert-dir", expectedVal: s.Mock.KubernetesPKIDir}, {key: "--client-ca-file", expectedVal: path.Join(s.Mock.KubernetesPKIDir, "client-ca.crt")}, + {key: "--cluster-dns", expectedVal: "10.152.1.1"}, + {key: "--cluster-domain", expectedVal: "override.local"}, {key: "--container-runtime-endpoint", expectedVal: path.Join(s.Mock.ContainerdSocketDir, "containerd.sock")}, {key: "--containerd", expectedVal: path.Join(s.Mock.ContainerdSocketDir, "containerd.sock")}, {key: "--eviction-hard", expectedVal: "'memory.available<100Mi,nodefs.available<1Gi,imagefs.available<1Gi'"}, {key: "--fail-swap-on", expectedVal: "false"}, {key: "--hostname-override", expectedVal: "dev"}, {key: "--kubeconfig", expectedVal: path.Join(s.Mock.KubernetesConfigDir, "kubelet.conf")}, + {key: "--node-ip", expectedVal: "192.168.0.1"}, {key: "--node-labels", expectedVal: expectedWorkerLabels}, {key: "--read-only-port", expectedVal: "0"}, {key: "--register-with-taints", expectedVal: ""}, {key: "--root-dir", expectedVal: s.Mock.KubeletRootDir}, {key: "--serialize-image-pulls", expectedVal: "false"}, + {key: "--tls-cert-file", expectedVal: path.Join(s.Mock.KubernetesPKIDir, "kubelet.crt")}, {key: "--tls-cipher-suites", expectedVal: kubeletTLSCipherSuites}, - {key: "--cluster-dns", expectedVal: "10.152.1.1"}, - {key: "--cluster-domain", expectedVal: "override.local"}, - {key: "--node-ip", expectedVal: "192.168.0.1"}, + {key: "--tls-private-key", expectedVal: path.Join(s.Mock.KubernetesPKIDir, "kubelet.key")}, } for _, tc := range tests { t.Run(tc.key, func(t *testing.T) {