From c48499d3604c7b640ae471f78bb323d65f7feac8 Mon Sep 17 00:00:00 2001 From: carlory Date: Mon, 17 Feb 2025 10:13:11 +0800 Subject: [PATCH] fix ci Signed-off-by: carlory --- cluster/gce/gci/configure-kubeapiserver.sh | 10 +--------- cluster/gce/manifests/kube-apiserver.manifest | 4 ---- test/e2e_node/kubelet_config_dir_test.go | 3 +-- test/e2e_node/remote/node_e2e.go | 3 +-- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/cluster/gce/gci/configure-kubeapiserver.sh b/cluster/gce/gci/configure-kubeapiserver.sh index aa5a9e35f2f..1b4b5ad416c 100644 --- a/cluster/gce/gci/configure-kubeapiserver.sh +++ b/cluster/gce/gci/configure-kubeapiserver.sh @@ -55,9 +55,6 @@ function configure-etcd-params { # in the manifest file, and then copies the manifest file to /etc/kubernetes/manifests. # # Assumed vars (which are calculated in function compute-master-manifest-variables) -# CLOUD_CONFIG_OPT -# CLOUD_CONFIG_VOLUME -# CLOUD_CONFIG_MOUNT # DOCKER_REGISTRY # INSECURE_PORT_MAPPING function start-kube-apiserver { @@ -66,9 +63,8 @@ function start-kube-apiserver { prepare-log-file "${KUBE_API_SERVER_AUDIT_LOG_PATH:-/var/log/kube-apiserver-audit.log}" "${KUBE_API_SERVER_RUNASUSER:-0}" # Calculate variables and assemble the command line. - local params="${API_SERVER_TEST_LOG_LEVEL:-"--v=2"} ${APISERVER_TEST_ARGS:-} ${CLOUD_CONFIG_OPT}" + local params="${API_SERVER_TEST_LOG_LEVEL:-"--v=2"} ${APISERVER_TEST_ARGS:-}" params+=" --allow-privileged=true" - params+=" --cloud-provider=${CLOUD_PROVIDER_FLAG:-external}" params+=" --client-ca-file=${CA_CERT_BUNDLE_PATH}" # params is passed by reference, so no "$" @@ -384,16 +380,12 @@ function start-kube-apiserver { sed -i -e "s@{{params}}@${params}@g" "${src_file}" sed -i -e "s@{{container_env}}@${container_env}@g" "${src_file}" sed -i -e "s@{{srv_sshproxy_path}}@/etc/srv/sshproxy@g" "${src_file}" - sed -i -e "s@{{cloud_config_mount}}@${CLOUD_CONFIG_MOUNT}@g" "${src_file}" - sed -i -e "s@{{cloud_config_volume}}@${CLOUD_CONFIG_VOLUME}@g" "${src_file}" sed -i -e "s@{{pillar\['kube_docker_registry'\]}}@${DOCKER_REGISTRY}@g" "${src_file}" sed -i -e "s@{{pillar\['kube-apiserver_docker_tag'\]}}@${kube_apiserver_docker_tag}@g" "${src_file}" sed -i -e "s@{{pillar\['allow_privileged'\]}}@true@g" "${src_file}" sed -i -e "s@{{liveness_probe_initial_delay}}@${KUBE_APISERVER_LIVENESS_PROBE_INITIAL_DELAY_SEC:-15}@g" "${src_file}" sed -i -e "s@{{secure_port}}@443@g" "${src_file}" sed -i -e "s@{{insecure_port_mapping}}@${INSECURE_PORT_MAPPING}@g" "${src_file}" - sed -i -e "s@{{additional_cloud_config_mount}}@@g" "${src_file}" - sed -i -e "s@{{additional_cloud_config_volume}}@@g" "${src_file}" sed -i -e "s@{{webhook_authn_config_mount}}@${webhook_authn_config_mount}@g" "${src_file}" sed -i -e "s@{{webhook_authn_config_volume}}@${webhook_authn_config_volume}@g" "${src_file}" sed -i -e "s@{{webhook_config_mount}}@${webhook_config_mount}@g" "${src_file}" diff --git a/cluster/gce/manifests/kube-apiserver.manifest b/cluster/gce/manifests/kube-apiserver.manifest index 45da29f1dfe..94fa9d5aeb7 100644 --- a/cluster/gce/manifests/kube-apiserver.manifest +++ b/cluster/gce/manifests/kube-apiserver.manifest @@ -67,8 +67,6 @@ "volumeMounts": [ {{kms_socket_mount}} {{encryption_provider_mount}} - {{cloud_config_mount}} - {{additional_cloud_config_mount}} {{webhook_config_mount}} {{webhook_authn_config_mount}} {{csc_config_mount}} @@ -108,8 +106,6 @@ "volumes":[ {{kms_socket_volume}} {{encryption_provider_volume}} - {{cloud_config_volume}} - {{additional_cloud_config_volume}} {{webhook_config_volume}} {{webhook_authn_config_volume}} {{csc_config_volume}} diff --git a/test/e2e_node/kubelet_config_dir_test.go b/test/e2e_node/kubelet_config_dir_test.go index 9cc0f08d295..f6b8b8769e6 100644 --- a/test/e2e_node/kubelet_config_dir_test.go +++ b/test/e2e_node/kubelet_config_dir_test.go @@ -86,7 +86,6 @@ shutdownGracePeriodByPodPriority: - priority: 3 shutdownGracePeriodSeconds: 30 featureGates: - DisableKubeletCloudCredentialProviders: true PodAndContainerStatsFromCRI: true`) framework.ExpectNoError(os.WriteFile(filepath.Join(configDir, "10-kubelet.conf"), contents, 0755)) contents = []byte(`apiVersion: kubelet.config.k8s.io/v1beta1 @@ -164,7 +163,7 @@ featureGates: }, } // This covers the case where the fields within the map are overridden. - overrides := map[string]bool{"DisableKubeletCloudCredentialProviders": true, "PodAndContainerStatsFromCRI": false, "DynamicResourceAllocation": true} + overrides := map[string]bool{"PodAndContainerStatsFromCRI": false, "DynamicResourceAllocation": true} // In some CI jobs, `NodeSwap` is explicitly disabled as the images are cgroupv1 based, // so such flags should be picked up directly from the initial configuration if _, ok := initialConfig.FeatureGates["NodeSwap"]; ok { diff --git a/test/e2e_node/remote/node_e2e.go b/test/e2e_node/remote/node_e2e.go index 25a9698b50b..25c8ea92a2d 100644 --- a/test/e2e_node/remote/node_e2e.go +++ b/test/e2e_node/remote/node_e2e.go @@ -97,10 +97,9 @@ func prependMemcgNotificationFlag(args string) string { // a credential provider plugin. func prependCredentialProviderFlag(args, workspace string) string { credentialProviderConfig := filepath.Join(workspace, "credential-provider.yaml") - featureGateFlag := "--kubelet-flags=--feature-gates=DisableKubeletCloudCredentialProviders=true" configFlag := fmt.Sprintf("--kubelet-flags=--image-credential-provider-config=%s", credentialProviderConfig) binFlag := fmt.Sprintf("--kubelet-flags=--image-credential-provider-bin-dir=%s", workspace) - return fmt.Sprintf("%s %s %s %s", featureGateFlag, configFlag, binFlag, args) + return fmt.Sprintf("%s %s %s", configFlag, binFlag, args) } // osSpecificActions takes OS specific actions required for the node tests