Merge pull request #106321 from neolit123/1.23-fix-e2e-test-failures-1

kubeadm: fix test failures in the e2e_kubeadm suite
This commit is contained in:
Kubernetes Prow Robot 2021-11-11 12:00:08 -08:00 committed by GitHub
commit 7663bffd51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -43,12 +43,12 @@ const (
// TODO: This k8s-generic, well-known constant should be fetchable from another source, not be in this package
KubeProxyClusterRoleName = "system:node-proxier"
// KubeProxyClusterRoleBindingName sets the name for the kube-proxy CluterRoleBinding
KubeProxyClusterRoleBindingName = "kubeadm:node-proxier"
// KubeProxyServiceAccountName describes the name of the ServiceAccount for the kube-proxy addon
KubeProxyServiceAccountName = "kube-proxy"
// KubeProxyClusterRoleBindingName sets the name for the kube-proxy CluterRoleBinding
KubeProxyClusterRoleBindingName = "kubeam:node-proxier"
// KubeProxyConfigMapRoleName sets the name of ClusterRole for ConfigMap
KubeProxyConfigMapRoleName = "kube-proxy"
)

View File

@ -84,11 +84,15 @@ var _ = Describe("kubelet-config ConfigMap", func() {
// https://github.com/kubernetes/kubeadm/issues/1582
var UnversionedKubeletConfigMap bool
if _, ok := m["featureGates"]; ok {
if featureGates, ok := m["featureGates"].(map[string]bool); ok {
if featureGates, ok := m["featureGates"].(map[interface{}]interface{}); ok {
// TODO: update the default to true once this graduates to Beta.
UnversionedKubeletConfigMap = false
if val, ok := featureGates["UnversionedKubeletConfigMap"]; ok {
UnversionedKubeletConfigMap = val
if valBool, ok := val.(bool); ok {
UnversionedKubeletConfigMap = valBool
} else {
framework.Failf("unable to cast the value of feature gate UnversionedKubeletConfigMap to bool")
}
}
} else {
framework.Failf("unable to cast the featureGates field in the %s ConfigMap", kubeadmConfigName)