mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
kubeadm: switch UnversionedKubeletConfigMap to true
- Graduate the feature gate to Beta and enable it by default. - Pre-set the default value for UnversionedKubeletConfigMap to "true" in test/e2e_kubeadm. - Fix a couple of typos in "tolerate" introduced in the PR that added the FG in 1.23.
This commit is contained in:
parent
2047936f3f
commit
66a18df14c
@ -33,7 +33,7 @@ const (
|
|||||||
PublicKeysECDSA = "PublicKeysECDSA"
|
PublicKeysECDSA = "PublicKeysECDSA"
|
||||||
// RootlessControlPlane is expected to be in alpha in v1.22
|
// RootlessControlPlane is expected to be in alpha in v1.22
|
||||||
RootlessControlPlane = "RootlessControlPlane"
|
RootlessControlPlane = "RootlessControlPlane"
|
||||||
// UnversionedKubeletConfigMap is expected to be alpha in 1.23
|
// UnversionedKubeletConfigMap is expected to be beta in 1.24
|
||||||
UnversionedKubeletConfigMap = "UnversionedKubeletConfigMap"
|
UnversionedKubeletConfigMap = "UnversionedKubeletConfigMap"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ const (
|
|||||||
var InitFeatureGates = FeatureList{
|
var InitFeatureGates = FeatureList{
|
||||||
PublicKeysECDSA: {FeatureSpec: featuregate.FeatureSpec{Default: false, PreRelease: featuregate.Alpha}},
|
PublicKeysECDSA: {FeatureSpec: featuregate.FeatureSpec{Default: false, PreRelease: featuregate.Alpha}},
|
||||||
RootlessControlPlane: {FeatureSpec: featuregate.FeatureSpec{Default: false, PreRelease: featuregate.Alpha}},
|
RootlessControlPlane: {FeatureSpec: featuregate.FeatureSpec{Default: false, PreRelease: featuregate.Alpha}},
|
||||||
UnversionedKubeletConfigMap: {FeatureSpec: featuregate.FeatureSpec{Default: false, PreRelease: featuregate.Alpha}},
|
UnversionedKubeletConfigMap: {FeatureSpec: featuregate.FeatureSpec{Default: true, PreRelease: featuregate.Beta}},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Feature represents a feature being gated
|
// Feature represents a feature being gated
|
||||||
|
@ -262,7 +262,7 @@ func TestCreateKubeConfigFileIfNotExists(t *testing.T) {
|
|||||||
kubeConfig: configWithAnotherClusterCa,
|
kubeConfig: configWithAnotherClusterCa,
|
||||||
expectedError: true,
|
expectedError: true,
|
||||||
},
|
},
|
||||||
{ // if KubeConfig is not equal to the existingKubeConfig - tollerate custom server addresses
|
{ // if KubeConfig is not equal to the existingKubeConfig - tolerate custom server addresses
|
||||||
name: "KubeConfig referst to the cluster with another address",
|
name: "KubeConfig referst to the cluster with another address",
|
||||||
existingKubeConfig: config,
|
existingKubeConfig: config,
|
||||||
kubeConfig: configWithAnotherClusterAddress,
|
kubeConfig: configWithAnotherClusterAddress,
|
||||||
@ -484,7 +484,7 @@ func TestValidateKubeConfig(t *testing.T) {
|
|||||||
configWithAnotherServerURL := setupdKubeConfigWithClientAuth(t, caCert, caKey, "https://4.3.2.1:4321", "test-cluster", "myOrg1")
|
configWithAnotherServerURL := setupdKubeConfigWithClientAuth(t, caCert, caKey, "https://4.3.2.1:4321", "test-cluster", "myOrg1")
|
||||||
|
|
||||||
// create a valid config but with whitespace around the CA PEM.
|
// create a valid config but with whitespace around the CA PEM.
|
||||||
// validateKubeConfig() should tollerate that.
|
// validateKubeConfig() should tolerate that.
|
||||||
configWhitespace := config.DeepCopy()
|
configWhitespace := config.DeepCopy()
|
||||||
configWhitespaceCtx := configWhitespace.Contexts[configWhitespace.CurrentContext]
|
configWhitespaceCtx := configWhitespace.Contexts[configWhitespace.CurrentContext]
|
||||||
configWhitespaceCA := string(configWhitespace.Clusters[configWhitespaceCtx.Cluster].CertificateAuthorityData)
|
configWhitespaceCA := string(configWhitespace.Clusters[configWhitespaceCtx.Cluster].CertificateAuthorityData)
|
||||||
|
@ -82,11 +82,9 @@ var _ = Describe("kubelet-config ConfigMap", func() {
|
|||||||
// Extract the value of the UnversionedKubeletConfigMap feature gate if its present.
|
// Extract the value of the UnversionedKubeletConfigMap feature gate if its present.
|
||||||
// TODO: remove this after the UnversionedKubeletConfigMap feature gate goes GA:
|
// TODO: remove this after the UnversionedKubeletConfigMap feature gate goes GA:
|
||||||
// https://github.com/kubernetes/kubeadm/issues/1582
|
// https://github.com/kubernetes/kubeadm/issues/1582
|
||||||
var UnversionedKubeletConfigMap bool
|
UnversionedKubeletConfigMap := true
|
||||||
if _, ok := m["featureGates"]; ok {
|
if _, ok := m["featureGates"]; ok {
|
||||||
if featureGates, ok := m["featureGates"].(map[interface{}]interface{}); 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 {
|
if val, ok := featureGates["UnversionedKubeletConfigMap"]; ok {
|
||||||
if valBool, ok := val.(bool); ok {
|
if valBool, ok := val.(bool); ok {
|
||||||
UnversionedKubeletConfigMap = valBool
|
UnversionedKubeletConfigMap = valBool
|
||||||
|
Loading…
Reference in New Issue
Block a user