@@ -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"
@@ -1285,43 +1284,6 @@ func hasInvalidLabelValueInRequiredNodeAffinity(spec *api.PodSpec) bool {
1285
1284
return helper .HasInvalidLabelValueInNodeSelectorTerms (spec .Affinity .NodeAffinity .RequiredDuringSchedulingIgnoredDuringExecution .NodeSelectorTerms )
1286
1285
}
1287
1286
1288
- func MarkPodProposedForResize (oldPod , newPod * api.Pod ) {
1289
- if len (newPod .Spec .Containers ) != len (oldPod .Spec .Containers ) {
1290
- // Update is invalid: ignore changes and let validation handle it
1291
- return
1292
- }
1293
-
1294
- if utilfeature .DefaultFeatureGate .Enabled (features .SidecarContainers ) && len (newPod .Spec .InitContainers ) != len (oldPod .Spec .InitContainers ) {
1295
- return
1296
- }
1297
-
1298
- for i , c := range newPod .Spec .Containers {
1299
- if c .Name != oldPod .Spec .Containers [i ].Name {
1300
- return // Update is invalid (container mismatch): let validation handle it.
1301
- }
1302
- if apiequality .Semantic .DeepEqual (oldPod .Spec .Containers [i ].Resources , c .Resources ) {
1303
- continue
1304
- }
1305
- newPod .Status .Resize = api .PodResizeStatusProposed
1306
- return
1307
- }
1308
-
1309
- if utilfeature .DefaultFeatureGate .Enabled (features .SidecarContainers ) {
1310
- for i , c := range newPod .Spec .InitContainers {
1311
- if IsRestartableInitContainer (& c ) {
1312
- if c .Name != oldPod .Spec .InitContainers [i ].Name {
1313
- return // Update is invalid (container mismatch): let validation handle it.
1314
- }
1315
- if apiequality .Semantic .DeepEqual (oldPod .Spec .InitContainers [i ].Resources , c .Resources ) {
1316
- continue
1317
- }
1318
- newPod .Status .Resize = api .PodResizeStatusProposed
1319
- return
1320
- }
1321
- }
1322
- }
1323
- }
1324
-
1325
1287
// KEP: https://kep.k8s.io/4639
1326
1288
func dropImageVolumes (podSpec , oldPodSpec * api.PodSpec ) {
1327
1289
if utilfeature .DefaultFeatureGate .Enabled (features .ImageVolume ) || imageVolumesInUse (oldPodSpec ) {
0 commit comments