cleanup: EphemeralContainers feature gate related codes

This commit is contained in:
Paco Xu
2022-12-16 23:46:47 +08:00
parent c9ed04762f
commit 70e56fa71a
13 changed files with 15 additions and 43 deletions

View File

@@ -116,7 +116,6 @@ func ephemeralContainerStartSpec(ec *v1.EphemeralContainer) *startSpec {
// targeting. The target is stored as EphemeralContainer.TargetContainerName, which must be
// resolved to a ContainerID using podStatus. The target container must already exist, which
// usually isn't a problem since ephemeral containers aren't allowed at pod creation time.
// This always returns nil when the EphemeralContainers feature is disabled.
func (s *startSpec) getTargetID(podStatus *kubecontainer.PodStatus) (*kubecontainer.ContainerID, error) {
if s.ephemeralContainer == nil || s.ephemeralContainer.TargetContainerName == "" {
return nil, nil

View File

@@ -496,7 +496,7 @@ var (
&metrics.GaugeOpts{
Subsystem: KubeletSubsystem,
Name: ManagedEphemeralContainersKey,
Help: "Current number of ephemeral containers in pods managed by this kubelet. Ephemeral containers will be ignored if disabled by the EphemeralContainers feature gate, and this number will be 0.",
Help: "Current number of ephemeral containers in pods managed by this kubelet.",
StabilityLevel: metrics.ALPHA,
},
)