@@ -22,10 +22,8 @@ import (
22
22
23
23
v1 "k8s.io/api/core/v1"
24
24
kubetypes "k8s.io/apimachinery/pkg/types"
25
- utilfeature "k8s.io/apiserver/pkg/util/feature"
26
25
"k8s.io/klog/v2"
27
26
"k8s.io/kubelet/pkg/types"
28
- "k8s.io/kubernetes/pkg/features"
29
27
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
30
28
)
31
29
@@ -35,7 +33,6 @@ const (
35
33
podTerminationGracePeriodLabel = "io.kubernetes.pod.terminationGracePeriod"
36
34
37
35
containerHashLabel = "io.kubernetes.container.hash"
38
- containerHashWithoutResourcesLabel = "io.kubernetes.container.hashWithoutResources"
39
36
containerRestartCountLabel = "io.kubernetes.container.restartCount"
40
37
containerTerminationMessagePathLabel = "io.kubernetes.container.terminationMessagePath"
41
38
containerTerminationMessagePolicyLabel = "io.kubernetes.container.terminationMessagePolicy"
@@ -65,7 +62,6 @@ type labeledContainerInfo struct {
65
62
66
63
type annotatedContainerInfo struct {
67
64
Hash uint64
68
- HashWithoutResources uint64
69
65
RestartCount int
70
66
PodDeletionGracePeriod * int64
71
67
PodTerminationGracePeriod * int64
@@ -117,9 +113,6 @@ func newContainerAnnotations(container *v1.Container, pod *v1.Pod, restartCount
117
113
}
118
114
119
115
annotations [containerHashLabel ] = strconv .FormatUint (kubecontainer .HashContainer (container ), 16 )
120
- if utilfeature .DefaultFeatureGate .Enabled (features .InPlacePodVerticalScaling ) {
121
- annotations [containerHashWithoutResourcesLabel ] = strconv .FormatUint (kubecontainer .HashContainer (container ), 16 )
122
- }
123
116
annotations [containerRestartCountLabel ] = strconv .Itoa (restartCount )
124
117
annotations [containerTerminationMessagePathLabel ] = container .TerminationMessagePath
125
118
annotations [containerTerminationMessagePolicyLabel ] = string (container .TerminationMessagePolicy )
@@ -200,11 +193,6 @@ func getContainerInfoFromAnnotations(annotations map[string]string) *annotatedCo
200
193
if containerInfo .Hash , err = getUint64ValueFromLabel (annotations , containerHashLabel ); err != nil {
201
194
klog .ErrorS (err , "Unable to get label value from annotations" , "label" , containerHashLabel , "annotations" , annotations )
202
195
}
203
- if utilfeature .DefaultFeatureGate .Enabled (features .InPlacePodVerticalScaling ) {
204
- if containerInfo .HashWithoutResources , err = getUint64ValueFromLabel (annotations , containerHashWithoutResourcesLabel ); err != nil {
205
- klog .ErrorS (err , "Unable to get label value from annotations" , "label" , containerHashWithoutResourcesLabel , "annotations" , annotations )
206
- }
207
- }
208
196
if containerInfo .RestartCount , err = getIntValueFromLabel (annotations , containerRestartCountLabel ); err != nil {
209
197
klog .ErrorS (err , "Unable to get label value from annotations" , "label" , containerRestartCountLabel , "annotations" , annotations )
210
198
}
0 commit comments