mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
kubeadm: fix failure in e2e_kubeadm related to kubelet-config
The featureGates field in ClusterConfiguration ends up as a map[interface{}]interface{} in the test suite and cannot be casted to map[string]bool directly. Adapt the test to use map[interface{}]interface{}.
This commit is contained in:
parent
e1571bf665
commit
7fa7f6d400
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user