jiebi/CodeConvo huggingface dataset:
t.Fatalf("%v: unexpected error when occupying CIDR %v: %v", tc.description, allocated, err) } } <del> if err := allocator.AllocateOrOccupyCIDR(tc.fakeNodeHandler.Existing[0]); err != nil { t.Errorf("%v: unexpected error in AllocateOrOccupyCIDR: %v", tc.description, err) </del> <ins> } updateCount := 0 for _, node := range tc.fakeNodeHandler.Existing { if node.Spec.PodCIDRs == nil { updateCount++ </ins> } <del> if err := waitForUpdatedNodeWithTimeout(tc.fakeNodeHandler, 1, wait.ForeverTestTimeout); err != nil { t.Fatalf("%v: timeout while waiting for Node update: %v", tc.description, err) </del> <ins> if err := allocator.AllocateOrOccupyCIDR(node); err != nil { t.Errorf("%v: unexpected error in AllocateOrOccupyCIDR: %v", tc.description, err) </ins> } } <ins> if updateCount != 1 { t.Fatalf("test error: all tests must update exactly one node") } if err := waitForUpdatedNodeWithTimeout(tc.fakeNodeHandler, updateCount, wait.ForeverTestTimeout); err != nil { t.Fatalf("%v: timeout while waiting for Node update: %v", tc.description, err) } </ins> if len(tc.expectedAllocatedCIDR) == 0 { // nothing further expected
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale // +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale <ins> // +genclient:method=CreateScale,verb=create,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale </ins> type ClusterTestType struct { metav1.TypeMeta `json:",inline"`
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterTestType, err error) GetScale(ctx context.Context, clusterTestTypeName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) <ins> CreateScale(ctx context.Context, clusterTestTypeName string, scale *autoscalingv1.Scale, opts metav1.CreateOptions) (*autoscalingv1.Scale, error) </ins> ClusterTestTypeExpansion }
Into(result) return } <ins> // CreateScale takes the representation of a scale and creates it.  Returns the server's representation of the scale, and an error, if there is any. func (c *clusterTestTypes) CreateScale(ctx context.Context, clusterTestTypeName string, scale *autoscalingv1.Scale, opts metav1.CreateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Post(). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) return } </ins>
} return obj.(*autoscalingv1.Scale), err } <ins> // CreateScale takes the representation of a scale and creates it.  Returns the server's representation of the scale, and an error, if there is any. func (c *FakeClusterTestTypes) CreateScale(ctx context.Context, clusterTestTypeName string, scale *autoscalingv1.Scale, opts v1.CreateOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateSubresourceAction(clustertesttypesResource, clusterTestTypeName, "scale", scale), &autoscalingv1.Scale{}) if obj == nil { return nil, err } return obj.(*autoscalingv1.Scale), err } </ins>
func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, "$.subresourcePath$", c.ns, $.inputType|private$), &$.resultType|raw${}) <del> $else$Invokes($.NewRootCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", $.inputType|private$), &$.resultType|raw${})$end$ </del> <ins> $else$Invokes($.NewRootCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, "$.subresourcePath$", $.inputType|private$), &$.resultType|raw${})$end$ </ins> if obj == nil { return nil, err }
prenormalizedDesiredReplicas: 5, expectedStabilizedReplicas:   5, expectedRecommendations: []timestampedRecommendation{ <del> {5, time.Now()}, </del> <ins> {5, now}, </ins> }, }, { name: "simple scale down stabilization", key:  "", recommendations: []timestampedRecommendation{ <del> {4, time.Now().Add(-2 * time.Minute)}, {5, time.Now().Add(-1 * time.Minute)}}, </del> <ins> {4, now.Add(-2 * time.Minute)}, {5, now.Add(-1 * time.Minute)}}, </ins> currentReplicas:              100, prenormalizedDesiredReplicas: 3, expectedStabilizedReplicas:   5, expectedRecommendations: []timestampedRecommendation{ <del> {4, time.Now()}, {5, time.Now()}, {3, time.Now()}, </del> <ins> {4, now}, {5, now}, {3, now}, </ins> }, scaleDownStabilizationWindowSeconds: 60 * 3, },
name: "simple scale up stabilization", key:  "", recommendations: []timestampedRecommendation{ <del> {4, time.Now().Add(-2 * time.Minute)}, {5, time.Now().Add(-1 * time.Minute)}}, </del> <ins> {4, now.Add(-2 * time.Minute)}, {5, now.Add(-1 * time.Minute)}}, </ins> currentReplicas:              1, prenormalizedDesiredReplicas: 7, expectedStabilizedReplicas:   4, expectedRecommendations: []timestampedRecommendation{ <del> {4, time.Now()}, {5, time.Now()}, {7, time.Now()}, </del> <ins> {4, now}, {5, now}, {7, now}, </ins> }, scaleUpStabilizationWindowSeconds: 60 * 5, },
name: "no scale down stabilization", key:  "", recommendations: []timestampedRecommendation{ <del> {1, time.Now().Add(-2 * time.Minute)}, {2, time.Now().Add(-1 * time.Minute)}}, </del> <ins> {1, now.Add(-2 * time.Minute)}, {2, now.Add(-1 * time.Minute)}}, </ins> currentReplicas:              100, // to apply scaleDown delay we should have current > desired prenormalizedDesiredReplicas: 3, expectedStabilizedReplicas:   3, expectedRecommendations: []timestampedRecommendation{ <del> {1, time.Now()}, {2, time.Now()}, {3, time.Now()}, </del> <ins> {1, now}, {2, now}, {3, now}, </ins> }, scaleUpStabilizationWindowSeconds: 60 * 5, },
name: "no scale up stabilization", key:  "", recommendations: []timestampedRecommendation{ <del> {4, time.Now().Add(-2 * time.Minute)}, {5, time.Now().Add(-1 * time.Minute)}}, </del> <ins> {4, now.Add(-2 * time.Minute)}, {5, now.Add(-1 * time.Minute)}}, </ins> currentReplicas:              1, // to apply scaleDown delay we should have current > desired prenormalizedDesiredReplicas: 3, expectedStabilizedReplicas:   3, expectedRecommendations: []timestampedRecommendation{ <del> {4, time.Now()}, {5, time.Now()}, {3, time.Now()}, </del> <ins> {4, now}, {5, now}, {3, now}, </ins> }, scaleDownStabilizationWindowSeconds: 60 * 5, },
name: "no scale down stabilization, reuse recommendation element", key:  "", recommendations: []timestampedRecommendation{ <del> {10, time.Now().Add(-10 * time.Minute)}, {9, time.Now().Add(-9 * time.Minute)}}, </del> <ins> {10, now.Add(-10 * time.Minute)}, {9, now.Add(-9 * time.Minute)}}, </ins> currentReplicas:              100, // to apply scaleDown delay we should have current > desired prenormalizedDesiredReplicas: 3, expectedStabilizedReplicas:   3, expectedRecommendations: []timestampedRecommendation{ <del> {10, time.Now()}, {3, time.Now()}, </del> <ins> {10, now}, {3, now}, </ins> }, }, { name: "no scale up stabilization, reuse recommendation element", key:  "", recommendations: []timestampedRecommendation{ <del> {10, time.Now().Add(-10 * time.Minute)}, {9, time.Now().Add(-9 * time.Minute)}}, </del> <ins> {10, now.Add(-10 * time.Minute)}, {9, now.Add(-9 * time.Minute)}}, </ins> currentReplicas:              1, prenormalizedDesiredReplicas: 100, expectedStabilizedReplicas:   100, expectedRecommendations: []timestampedRecommendation{ <del> {10, time.Now()}, {100, time.Now()}, </del> <ins> {10, now}, {100, now}, </ins> }, }, { name: "scale down stabilization, reuse one of obsolete recommendation element", key:  "", recommendations: []timestampedRecommendation{ <del> {10, time.Now().Add(-10 * time.Minute)}, {4, time.Now().Add(-1 * time.Minute)}, {5, time.Now().Add(-2 * time.Minute)}, {9, time.Now().Add(-9 * time.Minute)}}, </del> <ins> {10, now.Add(-10 * time.Minute)}, {4, now.Add(-1 * time.Minute)}, {5, now.Add(-2 * time.Minute)}, {9, now.Add(-9 * time.Minute)}}, </ins> currentReplicas:              100, prenormalizedDesiredReplicas: 3, expectedStabilizedReplicas:   5, expectedRecommendations: []timestampedRecommendation{ <del> {10, time.Now()}, {4, time.Now()}, {5, time.Now()}, {3, time.Now()}, </del> <ins> {10, now}, {4, now}, {5, now}, {3, now}, </ins> }, scaleDownStabilizationWindowSeconds: 3 * 60, },
name: "scale up stabilization, reuse one of obsolete recommendation element", key:  "", recommendations: []timestampedRecommendation{ <del> {10, time.Now().Add(-100 * time.Minute)}, {6, time.Now().Add(-1 * time.Minute)}, {5, time.Now().Add(-2 * time.Minute)}, {9, time.Now().Add(-3 * time.Minute)}}, </del> <ins> {10, now.Add(-100 * time.Minute)}, {6, now.Add(-1 * time.Minute)}, {5, now.Add(-2 * time.Minute)}, {9, now.Add(-3 * time.Minute)}}, </ins> currentReplicas:              1, prenormalizedDesiredReplicas: 100, expectedStabilizedReplicas:   5, expectedRecommendations: []timestampedRecommendation{ <del> {100, time.Now()}, {6, time.Now()}, {5, time.Now()}, {9, time.Now()}, </del> <ins> {100, now}, {6, now}, {5, now}, {9, now}, </ins> }, scaleUpStabilizationWindowSeconds: 300, <ins> }, { name: "scale up and down stabilization, do not scale up when prenormalized rec goes down", key:  "", recommendations: []timestampedRecommendation{ {2, now.Add(-100 * time.Minute)}, {3, now.Add(-3 * time.Minute)}, }, currentReplicas:                     2, prenormalizedDesiredReplicas:        1, expectedStabilizedReplicas:          2, scaleUpStabilizationWindowSeconds:   300, scaleDownStabilizationWindowSeconds: 300, }, { name: "scale up and down stabilization, do not scale down when prenormalized rec goes up", key:  "", recommendations: []timestampedRecommendation{ {2, now.Add(-100 * time.Minute)}, {1, now.Add(-3 * time.Minute)}, }, currentReplicas:                     2, prenormalizedDesiredReplicas:        3, expectedStabilizedReplicas:          2, scaleUpStabilizationWindowSeconds:   300, scaleDownStabilizationWindowSeconds: 300, </ins> }, } for _, tc := range tests {
} r, _, _ := hc.stabilizeRecommendationWithBehaviors(arg) assert.Equal(t, tc.expectedStabilizedReplicas, r, "expected replicas do not match") <del> if !assert.Len(t, hc.recommendations[tc.key], len(tc.expectedRecommendations), "stored recommendations differ in length") { return } for i, r := range hc.recommendations[tc.key] { expectedRecommendation := tc.expectedRecommendations[i] assert.Equal(t, expectedRecommendation.recommendation, r.recommendation, "stored recommendation differs at position %d", i) </del> <ins> if tc.expectedRecommendations != nil { if !assert.Len(t, hc.recommendations[tc.key], len(tc.expectedRecommendations), "stored recommendations differ in length") { return } for i, r := range hc.recommendations[tc.key] { expectedRecommendation := tc.expectedRecommendations[i] assert.Equal(t, expectedRecommendation.recommendation, r.recommendation, "stored recommendation differs at position %d", i) } </ins> } }) }
# # $1 - server architecture kube::build::get_docker_wrapped_binaries() { <del> local debian_iptables_version=buster-v1.3.0 </del> <ins> local debian_iptables_version=buster-v1.4.0 </ins> local go_runner_version=buster-v2.2.2 ### If you change any of these lists, please also update DOCKERIZED_BINARIES ### in build/BUILD. And kube::golang::server_image_targets
match: BASEIMAGE?=k8s.gcr.io/build-image/debian-base-s390x:[a-zA-Z]+-v((([0-9]+).([0-9]+).([0-9]+)(?:-([0-9a-zA-Z-]+(?:.[0-9a-zA-Z-]+)*))?)(?:+([0-9a-zA-Z-]+(?:.[0-9a-zA-Z-]+)*))?) - name: "k8s.gcr.io/debian-iptables: dependents" <del> version: buster-v1.3.0 </del> <ins> version: buster-v1.4.0 </ins> refPaths: - path: build/common.sh match: debian_iptables_version=
registry = "k8s.gcr.io/build-image", repository = "debian-iptables", # Ensure the digests above are updated to match a new tag <del> tag = "buster-v1.3.0",  # ignored, but kept here for documentation </del> <ins> tag = "buster-v1.4.0",  # ignored, but kept here for documentation </ins> ) def etcd_tarballs():
# REVISION provides a version number fo this image and all it's bundled # artifacts. It should start at zero for each LATEST_ETCD_VERSION and increment # for each revision of this image at that etcd version. <del> REVISION?=1 </del> <ins> REVISION?=2 </ins> # IMAGE_TAG Uniquely identifies k8s.gcr.io/etcd docker image with a tag of the form "<etcd-version>-<revision>". IMAGE_TAG=$(LATEST_ETCD_VERSION)-$(REVISION)
TEMP_DIR:=$(shell mktemp -d) ifeq ($(ARCH),amd64) <del> BASEIMAGE?=k8s.gcr.io/build-image/debian-base:buster-v1.2.0 </del> <ins> BASEIMAGE?=k8s.gcr.io/build-image/debian-base:buster-v1.3.0 </ins> endif ifeq ($(ARCH),arm) <del> BASEIMAGE?=k8s.gcr.io/build-image/debian-base-arm:buster-v1.2.0 </del> <ins> BASEIMAGE?=k8s.gcr.io/build-image/debian-base-arm:buster-v1.3.0 </ins> endif ifeq ($(ARCH),arm64) <del> BASEIMAGE?=k8s.gcr.io/build-image/debian-base-arm64:buster-v1.2.0 </del> <ins> BASEIMAGE?=k8s.gcr.io/build-image/debian-base-arm64:buster-v1.3.0 </ins> endif ifeq ($(ARCH),ppc64le) <del> BASEIMAGE?=k8s.gcr.io/build-image/debian-base-ppc64le:buster-v1.2.0 </del> <ins> BASEIMAGE?=k8s.gcr.io/build-image/debian-base-ppc64le:buster-v1.3.0 </ins> endif ifeq ($(ARCH),s390x) <del> BASEIMAGE?=k8s.gcr.io/build-image/debian-base-s390x:buster-v1.2.0 </del> <ins> BASEIMAGE?=k8s.gcr.io/build-image/debian-base-s390x:buster-v1.3.0 </ins> endif RUNNERIMAGE?=gcr.io/distroless/static:latest
configs[CheckMetadataConcealment] = Config{e2eRegistry, "metadata-concealment", "1.2"} configs[CudaVectorAdd] = Config{e2eRegistry, "cuda-vector-add", "1.0"} configs[CudaVectorAdd2] = Config{e2eRegistry, "cuda-vector-add", "2.0"} <del> configs[DebianIptables] = Config{buildImageRegistry, "debian-iptables", "buster-v1.3.0"} </del> <ins> configs[DebianIptables] = Config{buildImageRegistry, "debian-iptables", "buster-v1.4.0"} </ins> configs[EchoServer] = Config{e2eRegistry, "echoserver", "2.2"} configs[Etcd] = Config{gcRegistry, "etcd", "3.4.13-0"} configs[GlusterDynamicProvisioner] = Config{dockerGluster, "glusterdynamic-provisioner", "v1.0"}
// ListByResourceGroup indicates an expected call of ListByResourceGroup func (mr *MockInterfaceMockRecorder) ListByResourceGroup(ctx, resourceGroupName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() <del> return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByResourceGroup", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName) </del> <ins> return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByResourceGroup", reflect.TypeOf((*MockInterface)(nil).ListByResourceGroup), ctx, resourceGroupName) </ins> }
} func (saw *sampleAndWaterMarkHistograms) innerSet(updateXOrX1 func()) { <del> var when time.Time var whenInt int64 var acc sampleAndWaterMarkAccumulator var wellOrdered bool func() { </del> <ins> when, whenInt, acc, wellOrdered := func() (time.Time, int64, sampleAndWaterMarkAccumulator, bool) { </ins> saw.Lock() defer saw.Unlock() <del> when = saw.clock.Now() whenInt = saw.quantize(when) acc = saw.sampleAndWaterMarkAccumulator wellOrdered = !when.Before(acc.lastSet) </del> <ins> // Moved these variables here to tiptoe around https://github.com/golang/go/issues/43570 for #97685 when := saw.clock.Now() whenInt := saw.quantize(when) acc := saw.sampleAndWaterMarkAccumulator wellOrdered := !when.Before(acc.lastSet) </ins> updateXOrX1() saw.relX = saw.x / saw.x1 if wellOrdered {
//      data to determine if an update is required. //  5.  A new timestamped dir is created //  6.  The payload is written to the new timestamped directory <del> //  7.  Symlinks and directory for new user-visible files are created (if needed). </del> <ins> //  7.  A symlink to the new timestamped directory ..data_tmp is created that will //      become the new data directory //  8.  The new data directory symlink is renamed to the data directory; rename is atomic //  9.  Symlinks and directory for new user-visible files are created (if needed). </ins> // //      For example, consider the files: //        <target-dir>/podName
//      The data directory itself is a link to a timestamped directory with //      the real data: //        <target-dir>/..data          -> ..2016_02_01_15_04_05.12345678/ <del> //  8.  A symlink to the new timestamped directory ..data_tmp is created that will //      become the new data directory //  9.  The new data directory symlink is renamed to the data directory; rename is atomic </del> <ins> //      NOTE(claudiub): We need to create these symlinks AFTER we've finished creating and //      linking everything else. On Windows, if a target does not exist, the created symlink //      will not work properly if the target ends up being a directory. </ins> // 10.  Old paths are removed from the user-visible portion of the target directory // 11.  The previous timestamped directory is removed, if it exists func (w *AtomicWriter) Write(payload map[string]FileProjection) error {
klog.V(4).Infof("%s: performed write of new data to ts data directory: %s", w.logContext, tsDir) // (7) <del> if err = w.createUserVisibleFiles(cleanPayload); err != nil { klog.Errorf("%s: error creating visible symlinks in %s: %v", w.logContext, w.targetDir, err) return err } // (8) </del> newDataDirPath := filepath.Join(w.targetDir, newDataDirName) if err = os.Symlink(tsDirName, newDataDirPath); err != nil { os.RemoveAll(tsDir)
return err } <ins> // (9) if err = w.createUserVisibleFiles(cleanPayload); err != nil { klog.Errorf("%s: error creating visible symlinks in %s: %v", w.logContext, w.targetDir, err) return err } </ins> // (10) if err = w.removeUserVisiblePaths(pathsToRemove); err != nil { klog.Errorf("%s: error removing old visible symlinks: %v", w.logContext, err)
"//test/e2e/framework/service:go_default_library", "//test/e2e/framework/skipper:go_default_library", "//test/e2e/framework/ssh:go_default_library", <del> "//test/e2e/network/netpol:go_default_library", </del> "//test/e2e/network/scale:go_default_library", "//test/e2e/storage/utils:go_default_library", "//test/utils:go_default_library",
<del> See [e2e-tests](https://git.k8s.io/community/contributors/devel/sig-testing/e2e-tests.md) </del> <ins> # test/e2e This is home to e2e tests used for presubmit, periodic, and postsubmit jobs. Some of these jobs are merge-blocking, some are release-blocking. ## e2e test ownership All e2e tests must adhere to the following policies: - the test must be owned by one and only one SIG - the test must live in/underneath a sig-owned package matching pattern: `test/e2e/[{subpath}/]{sig}/...`, e.g. - `test/e2e/auth` - all tests owned by sig-`auth` - `test/e2e/common/storage` - all tests `common` to cluster-level and node-level e2e tests, owned by sig-`node` - `test/e2e/upgrade/apps` - all tests used in `upgrade` testing, owned by sig-`apps` - each sig-owned package should have an OWNERS file defining relevant approvers and labels for the owning sig, e.g. ```yaml # test/e2e/node/OWNERS # See the OWNERS docs at https://go.k8s.io/owners approvers: - alice - bob - cynthia emeritus_approvers: - dave reviewers: - sig-node-reviewers labels: - sig/node ``` - packages that use `{subpath}` should have an `imports.go` file importing sig-owned packages (for ginkgo's benefit), e.g. ```golang // test/e2e/common/imports.go package common import ( // ensure these packages are scanned by ginkgo for e2e tests _ "k8s.io/kubernetes/test/e2e/common/network" _ "k8s.io/kubernetes/test/e2e/common/node" _ "k8s.io/kubernetes/test/e2e/common/storage" ) ``` - test ownership must be declared via a top-level SIGDescribe call defined in the sig-owned package, e.g. ```golang // test/e2e/lifecycle/framework.go package lifecycle import "github.com/onsi/ginkgo" // SIGDescribe annotates the test with the SIG label. func SIGDescribe(text string, body func()) bool { return ginkgo.Describe("[sig-cluster-lifecycle] "+text, body) } ``` ```golang // test/e2e/lifecycle/bootstrap/bootstrap_signer.go package bootstrap import ( "github.com/onsi/ginkgo" "k8s.io/kubernetes/test/e2e/lifecycle" ) var _ = lifecycle.SIGDescribe("[Feature:BootstrapTokens]", func() { /* ... */ ginkgo.It("should sign the new added bootstrap tokens", func() { /* ... */ }) /* etc */ }) ``` These polices are enforced: - via the merge-blocking presubmit job `pull-kubernetes-verify` - which ends up running `hack/verify-e2e-test-ownership.sh` - which can also be run via `make verify WHAT=e2e-test-ownership` ## more info See [kubernetes/community/.../e2e-tests.md](https://git.k8s.io/community/contributors/devel/sig-testing/e2e-tests.md) </ins>
// barrierOp defines an op that can be used to wait until all scheduled pods of // one or many namespaces have been bound to nodes. This is useful when pods <del> // were scheduled with SkipWaitToCompletion set to true. A barrierOp is added // at the end of each each workload automatically. </del> <ins> // were scheduled with SkipWaitToCompletion set to true. </ins> type barrierOp struct { // Must be "barrier". Opcode string
b.Fatalf("op %d: invalid op %v", opIndex, concreteOp) } } <del> if err := waitUntilPodsScheduled(ctx, podInformer, b.Name(), nil, numPodsScheduledPerNamespace); err != nil { // Any pending pods must be scheduled before this test can be considered to // be complete. b.Fatal(err) } </del> <ins> // Some tests have unschedulable pods. Do not add an implicit barrier at the // end as we do not want to wait for them. </ins> return dataItems }
func getRESTMappings(mapper meta.RESTMapper, pruneResources *[]pruneResource) (namespaced, nonNamespaced []*meta.RESTMapping, err error) { if len(*pruneResources) == 0 { <del> // default whitelist // TODO: need to handle the older api versions - e.g. v1beta1 jobs. Github issue: #35991 </del> <ins> // default allowlist </ins> *pruneResources = []pruneResource{ {"", "v1", "ConfigMap", true}, {"", "v1", "Endpoints", true},
{"", "v1", "Service", true}, {"batch", "v1", "Job", true}, {"batch", "v1beta1", "CronJob", true}, <del> {"extensions", "v1beta1", "Ingress", true}, </del> <ins> {"networking.k8s.io", "v1", "Ingress", true}, </ins> {"apps", "v1", "DaemonSet", true}, {"apps", "v1", "Deployment", true}, {"apps", "v1", "ReplicaSet", true},
observations, _ := makeSignalObservations(summary) debugLogObservations("observations after resource reclaim", observations) <del> // determine the set of thresholds met independent of grace period thresholds := thresholdsMet(m.config.Thresholds, observations, false) </del> <ins> // evaluate all thresholds independently of their grace period to see if with // the new observations, we think we have met min reclaim goals thresholds := thresholdsMet(m.config.Thresholds, observations, true) </ins> debugLogThresholdsWithObservation("thresholds after resource reclaim - ignoring grace period", thresholds, observations) if len(thresholds) == 0 {