Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewUIDPreconditions (0.12 sec)

  1. 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)
  2. 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)
Back to top