@@ -19,7 +19,6 @@ package pod
19
19
import (
20
20
"strings"
21
21
22
- apiequality "k8s.io/apimachinery/pkg/api/equality"
23
22
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
24
23
metavalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
25
24
"k8s.io/apimachinery/pkg/util/sets"
@@ -1302,43 +1301,6 @@ func hasInvalidLabelValueInRequiredNodeAffinity(spec *api.PodSpec) bool {
1302
1301
return helper .HasInvalidLabelValueInNodeSelectorTerms (spec .Affinity .NodeAffinity .RequiredDuringSchedulingIgnoredDuringExecution .NodeSelectorTerms )
1303
1302
}
1304
1303
1305
- func MarkPodProposedForResize (oldPod , newPod * api.Pod ) {
1306
- if len (newPod .Spec .Containers ) != len (oldPod .Spec .Containers ) {
1307
- // Update is invalid: ignore changes and let validation handle it
1308
- return
1309
- }
1310
-
1311
- if utilfeature .DefaultFeatureGate .Enabled (features .SidecarContainers ) && len (newPod .Spec .InitContainers ) != len (oldPod .Spec .InitContainers ) {
1312
- return
1313
- }
1314
-
1315
- for i , c := range newPod .Spec .Containers {
1316
- if c .Name != oldPod .Spec .Containers [i ].Name {
1317
- return // Update is invalid (container mismatch): let validation handle it.
1318
- }
1319
- if apiequality .Semantic .DeepEqual (oldPod .Spec .Containers [i ].Resources , c .Resources ) {
1320
- continue
1321
- }
1322
- newPod .Status .Resize = api .PodResizeStatusProposed
1323
- return
1324
- }
1325
-
1326
- if utilfeature .DefaultFeatureGate .Enabled (features .SidecarContainers ) {
1327
- for i , c := range newPod .Spec .InitContainers {
1328
- if IsRestartableInitContainer (& c ) {
1329
- if c .Name != oldPod .Spec .InitContainers [i ].Name {
1330
- return // Update is invalid (container mismatch): let validation handle it.
1331
- }
1332
- if apiequality .Semantic .DeepEqual (oldPod .Spec .InitContainers [i ].Resources , c .Resources ) {
1333
- continue
1334
- }
1335
- newPod .Status .Resize = api .PodResizeStatusProposed
1336
- return
1337
- }
1338
- }
1339
- }
1340
- }
1341
-
1342
1304
// KEP: https://kep.k8s.io/4639
1343
1305
func dropImageVolumes (podSpec , oldPodSpec * api.PodSpec ) {
1344
1306
if utilfeature .DefaultFeatureGate .Enabled (features .ImageVolume ) || imageVolumesInUse (oldPodSpec ) {
0 commit comments