Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for ownerRef (0.15 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/garbagecollector/graph_builder.go

    			foundMismatch = true
    		} else {
    			for _, ownerRef := range dep.owners {
    				// ... find the ownerRef with a matching uid ...
    				if ownerRef.UID == matchOwnerIdentity.UID {
    					// ... and check if it matches all coordinates
    					if ownerReferenceMatchesCoordinates(ownerRef, matchOwnerIdentity.OwnerReference) {
    						foundMatch = true
    					} else {
    						foundMismatch = true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  3. 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)
  4. plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go

    			// resource that is owned by the service and sets blockOwnerDeletion=true in its ownerRef.
    			rbacv1helpers.NewRule("update").Groups(legacyGroup).Resources("services/finalizers").RuleOrDie(),
    			// The controller needs to be able to set a service's finalizers to be able to create an EndpointSlice
    			// resource that is owned by the endpoint and sets blockOwnerDeletion=true in its ownerRef.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 19:25:10 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  5. pkg/controller/statefulset/stateful_set_test.go

    		ssc.enqueueStatefulSet(set)
    		fakeWorker(ssc)
    		*set.Spec.Replicas = 0 // Put an ownerRef for all scale-down deleted PVCs.
    		ssc.enqueueStatefulSet(set)
    		fakeWorker(ssc)
    
    		hasNamedOwnerRef := func(claim *v1.PersistentVolumeClaim, name string) bool {
    			for _, ownerRef := range claim.GetOwnerReferences() {
    				if ownerRef.Name == name {
    					return true
    				}
    			}
    			return false
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  6. pkg/kube/controllers/common.go

    	found, ok := gvk.ToGVR(gk)
    	if !ok {
    		return schema.GroupVersionResource{}, fmt.Errorf("unknown gvk: %v", gk)
    	}
    	return found, nil
    }
    
    // EnqueueForParentHandler returns a handler that will enqueue the parent (by ownerRef) resource
    func EnqueueForParentHandler(q Queue, kind config.GroupVersionKind) func(obj Object) {
    	handler := func(obj Object) {
    		for _, ref := range obj.GetOwnerReferences() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 11 08:27:29 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  7. plugin/pkg/admission/gc/gc_admission_test.go

    func newGCPermissionsEnforcement() (*gcPermissionsEnforcement, error) {
    	// the pods/status endpoint is ignored by this plugin since old kubelets
    	// corrupt them.  the pod status strategy ensures status updates cannot mutate
    	// ownerRef.
    	whiteList := []whiteListItem{
    		{
    			groupResource: schema.GroupResource{Resource: "pods"},
    			subresource:   "status",
    		},
    	}
    	gcAdmit := &gcPermissionsEnforcement{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:28:42 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. pkg/controller/garbagecollector/garbagecollector_test.go

    					events:                 []string{`Warning OwnerRefInvalidNamespace ownerRef [v1/Pod, namespace: ns1, name: podname2, uid: poduid2] does not exist in namespace "ns1" involvedObject{kind=Pod,apiVersion=v1}`},
    				}),
    				// 6,7: handle queued delete of virtual parent
    				processAttemptToDelete(1),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 111.6K bytes
    - Viewed (0)
Back to top