- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewUIDPreconditions (0.15 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/interfaces.go
UID *types.UID `json:"uid,omitempty"` // Specifies the target ResourceVersion // +optional ResourceVersion *string `json:"resourceVersion,omitempty"` } // NewUIDPreconditions returns a Preconditions with UID set. func NewUIDPreconditions(uid string) *Preconditions { u := types.UID(uid) return &Preconditions{UID: &u} } func (p *Preconditions) Check(key string, obj runtime.Object) error { if p == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 07:53:48 UTC 2024 - 14.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go
precondition *storage.Preconditions expectInvalidObjErr bool }{{ name: "UID match", precondition: storage.NewUIDPreconditions("A"), expectInvalidObjErr: false, }, { name: "UID mismatch", precondition: storage.NewUIDPreconditions("B"), expectInvalidObjErr: true, }} for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { out := &example.Pod{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 11 12:45:33 UTC 2024 - 91.4K bytes - Viewed (0) -
pkg/kubelet/status/status_manager.go
GracePeriodSeconds: new(int64), // Use the pod UID as the precondition for deletion to prevent deleting a // newly created pod with the same name and namespace. Preconditions: metav1.NewUIDPreconditions(string(pod.UID)), } err = m.kubeClient.CoreV1().Pods(pod.Namespace).Delete(context.TODO(), pod.Name, deleteOptions) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 02 16:27:19 UTC 2024 - 44.3K bytes - Viewed (0)