Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for ownerRef (0.2 sec)

  1. pkg/controller/statefulset/stateful_set_utils.go

    func hasNonControllerOwner(claim *v1.PersistentVolumeClaim, set *apps.StatefulSet, pod *v1.Pod) bool {
    	for _, ownerRef := range claim.GetOwnerReferences() {
    		if ownerRef.UID == set.GetUID() || ownerRef.UID == pod.GetUID() {
    			if ownerRef.Controller == nil || !*ownerRef.Controller {
    				return true
    			}
    		}
    	}
    	return false
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 26.7K bytes
    - Viewed (0)
  2. pkg/controller/statefulset/stateful_pod_control_test.go

    		testCases := []struct {
    			name      string
    			ownerRef  []metav1.OwnerReference
    			expectRef bool
    		}{
    			{
    				name:      "bare PVC",
    				expectRef: true,
    			},
    			{
    				name:      "PVC already controller",
    				ownerRef:  []metav1.OwnerReference{{Controller: ptr.To(true), Name: "foobar"}},
    				expectRef: false,
    			},
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 35.5K bytes
    - Viewed (0)
  3. pkg/controller/endpointslice/endpointslice_controller_test.go

    	gvk := schema.GroupVersionKind{Version: "v1", Kind: "Service"}
    	ownerRef := metav1.NewControllerRef(service, gvk)
    
    	deletedTs := metav1.Now()
    	endpointSlice := &discovery.EndpointSlice{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:            "epSlice-1",
    			Namespace:       ns,
    			OwnerReferences: []metav1.OwnerReference{*ownerRef},
    			Labels: map[string]string{
    				discovery.LabelServiceName: serviceName,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 08:33:32 UTC 2024
    - 65.5K bytes
    - Viewed (0)
  4. pkg/controller/statefulset/stateful_pod_control.go

    					return fmt.Errorf("could not update claim %s for delete policy ownerRefs: %w", claimName, err)
    				}
    			}
    		}
    	}
    	return nil
    }
    
    // PodClaimIsStale returns true for a stale PVC that should block pod creation. If the scaling
    // policy is deletion, and a PVC has an ownerRef that does not match the pod, the PVC is stale. This
    // includes pods whose UID has not been created.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  5. pkg/controller/job/job_controller.go

    		}
    		return fresh, nil
    	})
    	cm := controller.NewPodControllerRefManager(jm.podControl, j, selector, controllerKind, canAdoptFunc, batch.JobTrackingFinalizer)
    	// When adopting Pods, this operation adds an ownerRef and finalizers.
    	pods, err = cm.ClaimPods(ctx, pods)
    	if err != nil {
    		return pods, err
    	}
    	// Set finalizer on adopted pods for the remaining calculations.
    	for i, p := range pods {
    		adopted := true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 10 23:56:37 UTC 2024
    - 77.6K bytes
    - Viewed (0)
  6. pkg/controller/job/job_controller_test.go

    	pb.Namespace = j.Namespace
    	pb.OwnerReferences = []metav1.OwnerReference{*metav1.NewControllerRef(j, controllerKind)}
    	return pb
    }
    
    func (pb podBuilder) owner(ownerRef metav1.OwnerReference) podBuilder {
    	pb.OwnerReferences = append(pb.OwnerReferences, ownerRef)
    	return pb
    }
    
    func (pb podBuilder) clearOwner() podBuilder {
    	pb.OwnerReferences = nil
    	return pb
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 15:36:36 UTC 2024
    - 229.2K bytes
    - Viewed (0)
  7. pkg/controller/statefulset/stateful_set_utils_test.go

    	_, ctx := ktesting.NewTestContext(t)
    	logger := klog.FromContext(ctx)
    
    	testCases := []struct {
    		name        string
    		ownerRefs   []metav1.OwnerReference
    		policy      apps.StatefulSetPersistentVolumeClaimRetentionPolicy
    		shouldMatch bool
    	}{
    		{
    			name: "normal controller, pod",
    			ownerRefs: []metav1.OwnerReference{
    				{
    					Name:       "pod-1",
    					APIVersion: "v1",
    					Kind:       "Pod",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 50.9K bytes
    - Viewed (0)
Back to top