Merge pull request #104202 from ehashman/revert-104075-cleanup/revert-dynamickubeconfig-metric

Revert "revert Bump DynamicKubeConfig metric deprecation to 1.23 by delta update"
This commit is contained in:
Kubernetes Prow Robot 2021-08-06 09:45:20 -07:00 committed by GitHub
commit f119536ab1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 22 deletions

View File

@ -367,7 +367,7 @@ var (
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: AssignedConfigKey, Name: AssignedConfigKey,
Help: "The node's understanding of intended config. The count is always 1.", Help: "The node's understanding of intended config. The count is always 1.",
DeprecatedVersion: "1.22.0", DeprecatedVersion: "1.23.0",
StabilityLevel: metrics.ALPHA, StabilityLevel: metrics.ALPHA,
}, },
[]string{ConfigSourceLabelKey, ConfigUIDLabelKey, ConfigResourceVersionLabelKey, KubeletConfigKeyLabelKey}, []string{ConfigSourceLabelKey, ConfigUIDLabelKey, ConfigResourceVersionLabelKey, KubeletConfigKeyLabelKey},
@ -378,7 +378,7 @@ var (
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: ActiveConfigKey, Name: ActiveConfigKey,
Help: "The config source the node is actively using. The count is always 1.", Help: "The config source the node is actively using. The count is always 1.",
DeprecatedVersion: "1.22.0", DeprecatedVersion: "1.23.0",
StabilityLevel: metrics.ALPHA, StabilityLevel: metrics.ALPHA,
}, },
[]string{ConfigSourceLabelKey, ConfigUIDLabelKey, ConfigResourceVersionLabelKey, KubeletConfigKeyLabelKey}, []string{ConfigSourceLabelKey, ConfigUIDLabelKey, ConfigResourceVersionLabelKey, KubeletConfigKeyLabelKey},
@ -390,7 +390,7 @@ var (
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: LastKnownGoodConfigKey, Name: LastKnownGoodConfigKey,
Help: "The config source the node will fall back to when it encounters certain errors. The count is always 1.", Help: "The config source the node will fall back to when it encounters certain errors. The count is always 1.",
DeprecatedVersion: "1.22.0", DeprecatedVersion: "1.23.0",
StabilityLevel: metrics.ALPHA, StabilityLevel: metrics.ALPHA,
}, },
[]string{ConfigSourceLabelKey, ConfigUIDLabelKey, ConfigResourceVersionLabelKey, KubeletConfigKeyLabelKey}, []string{ConfigSourceLabelKey, ConfigUIDLabelKey, ConfigResourceVersionLabelKey, KubeletConfigKeyLabelKey},
@ -401,7 +401,7 @@ var (
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: ConfigErrorKey, Name: ConfigErrorKey,
Help: "This metric is true (1) if the node is experiencing a configuration-related error, false (0) otherwise.", Help: "This metric is true (1) if the node is experiencing a configuration-related error, false (0) otherwise.",
DeprecatedVersion: "1.22.0", DeprecatedVersion: "1.23.0",
StabilityLevel: metrics.ALPHA, StabilityLevel: metrics.ALPHA,
}, },
) )

View File

@ -106,10 +106,6 @@ var _ = SIGDescribe("[Feature:DynamicKubeletConfig][NodeFeature:DynamicKubeletCo
framework.ExpectNoError(err) framework.ExpectNoError(err)
beforeKC = kc beforeKC = kc
} }
// show hidden metrics for release 1.22
beforeKC = updateShowHiddenMetricsForVersion(beforeKC, "1.22")
// reset the node's assigned/active/last-known-good config by setting the source to nil, // reset the node's assigned/active/last-known-good config by setting the source to nil,
// so each test starts from a clean-slate // so each test starts from a clean-slate
(&nodeConfigTestCase{ (&nodeConfigTestCase{
@ -122,9 +118,6 @@ var _ = SIGDescribe("[Feature:DynamicKubeletConfig][NodeFeature:DynamicKubeletCo
framework.ExpectNoError(err) framework.ExpectNoError(err)
localKC = kc localKC = kc
} }
// show hidden metrics for release 1.22
localKC = updateShowHiddenMetricsForVersion(localKC, "1.22")
}) })
ginkgo.AfterEach(func() { ginkgo.AfterEach(func() {
@ -1198,14 +1191,3 @@ func (tc *nodeConfigTestCase) checkConfigMetrics(f *framework.Framework) {
return nil return nil
}, timeout, interval).Should(gomega.BeNil()) }, timeout, interval).Should(gomega.BeNil())
} }
func updateShowHiddenMetricsForVersion(cfg *kubeletconfig.KubeletConfiguration, version string) *kubeletconfig.KubeletConfiguration {
if cfg == nil {
return &kubeletconfig.KubeletConfiguration{
ShowHiddenMetricsForVersion: version,
}
}
cfg.ShowHiddenMetricsForVersion = version
return cfg
}