- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 112 for PrepareForUpdate (0.17 sec)
-
pkg/registry/core/namespace/strategy_test.go
ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, } // ensure we copy spec.finalizers from old to new Strategy.PrepareForUpdate(ctx, invalidNamespace, namespace) if len(invalidNamespace.Spec.Finalizers) != 1 || invalidNamespace.Spec.Finalizers[0] != api.FinalizerKubernetes { t.Errorf("PrepareForUpdate should have preserved old.spec.finalizers") } errs = Strategy.ValidateUpdate(ctx, invalidNamespace, namespace) if len(errs) == 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Dec 07 08:51:17 UTC 2021 - 6K bytes - Viewed (0) -
pkg/registry/storage/volumeattachment/strategy_test.go
} Strategy.PrepareForUpdate(ctx, volumeAttachmentSaved, volumeAttachment) if volumeAttachmentSaved.Spec.Source.InlineVolumeSpec == nil { t.Errorf("InlineVolumeSpec unexpectedly set to nil during PrepareForUpdate") } Strategy.PrepareForUpdate(ctx, volumeAttachmentSaved, volumeAttachment) if volumeAttachmentSaved.Spec.Source.InlineVolumeSpec == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 8.8K bytes - Viewed (0) -
pkg/registry/core/podtemplate/strategy_test.go
} // ensure we do not change generation for non-spec updates updatedLabel := podTemplate.DeepCopy() updatedLabel.Labels = map[string]string{"a": "true"} Strategy.PrepareForUpdate(ctx, updatedLabel, podTemplate) if updatedLabel.Generation != 1 { t.Errorf("expected Generation=1, got %d", updatedLabel.Generation) } updatedTemplate := podTemplate.DeepCopy()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 18 14:42:36 UTC 2021 - 2.9K bytes - Viewed (0) -
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/networking/ingress/strategy.go
ingress := obj.(*networking.Ingress) // create cannot set status ingress.Status = networking.IngressStatus{} ingress.Generation = 1 } // PrepareForUpdate clears fields that are not allowed to be set by end users on update. func (ingressStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newIngress := obj.(*networking.Ingress) oldIngress := old.(*networking.Ingress) // Update is not allowed to set status
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 14 01:42:41 UTC 2023 - 6.1K bytes - Viewed (0) -
pkg/registry/resource/resourceclassparameters/strategy_test.go
ctx := genericapirequest.NewDefaultContext() resourceClassParameters := resourceClassParameters.DeepCopy() newObj := resourceClassParameters.DeepCopy() newObj.ResourceVersion = "4" Strategy.PrepareForUpdate(ctx, newObj, resourceClassParameters) errs := Strategy.ValidateUpdate(ctx, newObj, resourceClassParameters) if len(errs) != 0 { t.Errorf("unexpected validation errors: %v", errs) } })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 15:15:31 UTC 2024 - 2.5K bytes - Viewed (0) -
pkg/registry/storage/volumeattachment/strategy.go
} func (volumeAttachmentStrategy) AllowCreateOnUpdate() bool { return false } // PrepareForUpdate sets the Status fields which is not allowed to be set by an end user updating a VolumeAttachment func (volumeAttachmentStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newVolumeAttachment := obj.(*storage.VolumeAttachment)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 06 21:19:19 UTC 2022 - 5.1K bytes - Viewed (0) -
pkg/registry/admissionregistration/validatingadmissionpolicy/strategy.go
ic.Status = admissionregistration.ValidatingAdmissionPolicyStatus{} ic.Generation = 1 } // PrepareForUpdate clears fields that are not allowed to be set by end users on update. func (v *validatingAdmissionPolicyStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newIC := obj.(*admissionregistration.ValidatingAdmissionPolicy)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 7.8K bytes - Viewed (0) -
pkg/registry/storagemigration/storagemigration/strategy.go
svm := obj.(*storagemigration.StorageVersionMigration) svm.Status = storagemigration.StorageVersionMigrationStatus{} } // PrepareForUpdate clears fields that are not allowed to be set by end users on update. func (s strategy) PrepareForUpdate(ctx context.Context, new, old runtime.Object) { svm := new.(*storagemigration.StorageVersionMigration) svm.Status = old.(*storagemigration.StorageVersionMigration).Status }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 08 04:18:56 UTC 2024 - 4.7K bytes - Viewed (0) -
pkg/registry/resource/resourceclaim/strategy_test.go
ctx := genericapirequest.NewDefaultContext() resourceClaim := resourceClaim.DeepCopy() newClaim := resourceClaim.DeepCopy() newClaim.ResourceVersion = "4" Strategy.PrepareForUpdate(ctx, newClaim, resourceClaim) errs := Strategy.ValidateUpdate(ctx, newClaim, resourceClaim) if len(errs) != 0 { t.Errorf("unexpected validation errors: %v", errs) } })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 10 19:08:24 UTC 2022 - 2.4K bytes - Viewed (0)