- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for PrepareForUpdate (0.33 sec)
-
pkg/registry/apps/statefulset/strategy_test.go
Status: apps.StatefulSetStatus{Replicas: 4}, } Strategy.PrepareForUpdate(ctx, validPs, ps) errs = Strategy.ValidateUpdate(ctx, validPs, ps) if len(errs) != 0 { t.Errorf("updating spec.Replicas and minReadySeconds is allowed on a statefulset: %v", errs) } invalidPs := ps invalidPs.Spec.MinReadySeconds = int32(-1) Strategy.PrepareForUpdate(ctx, validPs, invalidPs) errs = Strategy.ValidateUpdate(ctx, validPs, ps)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 22.1K bytes - Viewed (0) -
pkg/registry/policy/poddisruptionbudget/strategy_test.go
}, } // Nothing in Spec changes: OK Strategy.PrepareForUpdate(ctx, newPdb, pdb) errs = Strategy.ValidateUpdate(ctx, newPdb, pdb) if len(errs) != 0 { t.Errorf("Unexpected error updating PodDisruptionBudget.") } // Changing the selector? OK newPdb.Spec.Selector = &metav1.LabelSelector{MatchLabels: map[string]string{"a": "bar"}} Strategy.PrepareForUpdate(ctx, newPdb, pdb)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 19.2K bytes - Viewed (0) -
pkg/registry/certificates/certificates/strategy.go
csr.Status.Conditions = []certificates.CertificateSigningRequestCondition{} } // PrepareForUpdate clears fields that are not allowed to be set by end users // on update. Certificate requests are immutable after creation except via subresources. func (csrStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newCSR := obj.(*certificates.CertificateSigningRequest)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 18 21:41:43 UTC 2022 - 11.4K bytes - Viewed (0) -
pkg/registry/batch/cronjob/strategy_test.go
Schedule: "5 5 5 * ?", }, Status: batch.CronJobStatus{ LastScheduleTime: &now, }, } // ensure we do not change status Strategy.PrepareForUpdate(ctx, updatedCronJob, cronJob) if updatedCronJob.Status.Active != nil { t.Errorf("PrepareForUpdate should have preserved prior version status") } if updatedCronJob.Generation != 2 { t.Errorf("expected Generation=2, got %d", updatedCronJob.Generation) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 15 14:34:53 UTC 2024 - 12.2K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go
crd.Status.StoredVersions = append(crd.Status.StoredVersions, v.Name) } break } } dropDisabledFields(crd, nil) } // PrepareForUpdate clears fields that are not allowed to be set by end users on update. func (strategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newCRD := obj.(*apiextensions.CustomResourceDefinition) oldCRD := old.(*apiextensions.CustomResourceDefinition)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 28 19:06:46 UTC 2024 - 10.3K bytes - Viewed (0) -
pkg/registry/core/service/strategy.go
service := obj.(*api.Service) service.Status = api.ServiceStatus{} dropServiceDisabledFields(service, nil) } // PrepareForUpdate sets contextual defaults and clears fields that are not allowed to be set by end users on update. func (svcStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newService := obj.(*api.Service) oldService := old.(*api.Service) newService.Status = oldService.Status
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 11 13:09:36 UTC 2024 - 14.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/rest/update.go
AllowCreateOnUpdate() bool // PrepareForUpdate is invoked on update before validation to normalize // the object. For example: remove fields that are not to be persisted, // sort order-insensitive list fields, etc. This should not remove fields // whose presence would be considered a validation error. PrepareForUpdate(ctx context.Context, obj, old runtime.Object)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Sep 27 11:48:28 UTC 2022 - 11.8K bytes - Viewed (0) -
pkg/registry/storage/csidriver/strategy_test.go
} // Update of spec is disallowed newCSIDriver := csiDriver.DeepCopy() attachNotRequired := false newCSIDriver.Spec.AttachRequired = &attachNotRequired Strategy.PrepareForUpdate(ctx, newCSIDriver, csiDriver) errs = Strategy.ValidateUpdate(ctx, newCSIDriver, csiDriver) if len(errs) == 0 { t.Errorf("Expected a validation error") } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 16.7K bytes - Viewed (0) -
pkg/registry/batch/job/strategy.go
job.Spec.PodReplacementPolicy = nil } pod.DropDisabledTemplateFields(&job.Spec.Template, nil) } // PrepareForUpdate clears fields that are not allowed to be set by end users on update. func (jobStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newJob := obj.(*batch.Job) oldJob := old.(*batch.Job) newJob.Status = oldJob.Status
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 08 16:43:24 UTC 2024 - 18.4K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go
// create cannot set status delete(customResource, "status") } accessor, _ := meta.Accessor(obj) accessor.SetGeneration(1) } // PrepareForUpdate clears fields that are not allowed to be set by end users on update. func (a customResourceStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newCustomResourceObject := obj.(*unstructured.Unstructured) oldCustomResourceObject := old.(*unstructured.Unstructured)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 28 21:22:34 UTC 2024 - 14.9K bytes - Viewed (0)