Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for controllerRef (0.16 sec)

  1. pkg/controller/controller_utils.go

    	return prefix
    }
    
    func validateControllerRef(controllerRef *metav1.OwnerReference) error {
    	if controllerRef == nil {
    		return fmt.Errorf("controllerRef is nil")
    	}
    	if len(controllerRef.APIVersion) == 0 {
    		return fmt.Errorf("controllerRef has empty APIVersion")
    	}
    	if len(controllerRef.Kind) == 0 {
    		return fmt.Errorf("controllerRef has empty Kind")
    	}
    	if controllerRef.Controller == nil || !*controllerRef.Controller {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 12 15:34:44 UTC 2024
    - 47.6K bytes
    - Viewed (0)
  2. pkg/controller/disruption/disruption.go

    	}
    	if rs.UID != controllerRef.UID {
    		return nil, nil
    	}
    	controllerRef = metav1.GetControllerOf(rs)
    	if controllerRef != nil && controllerRef.Kind == controllerKindDep.Kind {
    		// Skip RS if it's controlled by a Deployment.
    		return nil, nil
    	}
    	return &controllerAndScale{rs.UID, *(rs.Spec.Replicas)}, nil
    }
    
    // getPodStatefulSet returns the statefulset referenced by the provided controllerRef.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 36.1K bytes
    - Viewed (0)
  3. pkg/controller/deployment/deployment_controller.go

    		return nil
    	}
    
    	// Now find the Deployment that owns that ReplicaSet.
    	controllerRef = metav1.GetControllerOf(rs)
    	if controllerRef == nil {
    		return nil
    	}
    	return dc.resolveControllerRef(rs.Namespace, controllerRef)
    }
    
    // resolveControllerRef returns the controller referenced by a ControllerRef,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  4. pkg/controller/statefulset/stateful_set.go

    		ssc.deletePod(logger, pod)
    		return
    	}
    
    	// If it has a ControllerRef, that's all that matters.
    	if controllerRef := metav1.GetControllerOf(pod); controllerRef != nil {
    		set := ssc.resolveControllerRef(pod.Namespace, controllerRef)
    		if set == nil {
    			return
    		}
    		logger.V(4).Info("Pod created with labels", "pod", klog.KObj(pod), "labels", pod.Labels)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  5. pkg/controller/cronjob/cronjob_controllerv2.go

    	if controllerRef.Kind != controllerKind.Kind {
    		return nil
    	}
    	cronJob, err := jm.cronJobLister.CronJobs(namespace).Get(controllerRef.Name)
    	if err != nil {
    		return nil
    	}
    	if cronJob.UID != controllerRef.UID {
    		// The controller we found with this Name is not the same one that the
    		// ControllerRef points to.
    		return nil
    	}
    	return cronJob
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 03:34:25 UTC 2024
    - 29.2K bytes
    - Viewed (0)
  6. pkg/controller/replicaset/replica_set.go

    		rsc.deletePod(logger, pod)
    		return
    	}
    
    	// If it has a ControllerRef, that's all that matters.
    	if controllerRef := metav1.GetControllerOf(pod); controllerRef != nil {
    		rs := rsc.resolveControllerRef(pod.Namespace, controllerRef)
    		if rs == nil {
    			return
    		}
    		rsKey, err := controller.KeyFunc(rs)
    		if err != nil {
    			return
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  7. pkg/controller/controller_ref_manager.go

    func (m *BaseControllerRefManager) ClaimObject(ctx context.Context, obj metav1.Object, match func(metav1.Object) bool, adopt, release func(context.Context, metav1.Object) error) (bool, error) {
    	controllerRef := metav1.GetControllerOfNoCopy(obj)
    	if controllerRef != nil {
    		if controllerRef.UID != m.Controller.GetUID() {
    			// Owned by someone else. Ignore.
    			return false, nil
    		}
    		if match(obj) {
    			// We already own it and the selector matches.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 12 12:57:29 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  8. pkg/kube/util.go

    		var controllerRef metav1.OwnerReference
    		controllerFound := false
    		for _, ref := range pod.GetOwnerReferences() {
    			if ref.Controller != nil && *ref.Controller {
    				controllerRef = ref
    				controllerFound = true
    				break
    			}
    		}
    		if controllerFound {
    			typeMetadata.APIVersion = controllerRef.APIVersion
    			typeMetadata.Kind = controllerRef.Kind
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 05:10:23 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  9. pkg/controller/deployment/util/deployment_util.go

    // ListReplicaSets returns a slice of RSes the given deployment targets.
    // Note that this does NOT attempt to reconcile ControllerRef (adopt/orphan),
    // because only the controller itself should do that.
    // However, it does filter out anything whose ControllerRef doesn't match.
    func ListReplicaSets(deployment *apps.Deployment, getRSList RsListFunc) ([]*apps.ReplicaSet, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 07:09:11 UTC 2023
    - 39.3K bytes
    - Viewed (0)
  10. pkg/controller/deployment/deployment_controller_test.go

    	// Add a Pod for each ReplicaSet.
    	pod1 := generatePodFromRS(rs1)
    	pod2 := generatePodFromRS(rs2)
    	// Add a Pod that has matching labels, but no ControllerRef.
    	pod3 := generatePodFromRS(rs1)
    	pod3.Name = "pod3"
    	pod3.OwnerReferences = nil
    	// Add a Pod that has matching labels and ControllerRef, but is inactive.
    	pod4 := generatePodFromRS(rs1)
    	pod4.Name = "pod4"
    	pod4.Status.Phase = v1.PodFailed
    
    	f.dLister = append(f.dLister, d)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 32.5K bytes
    - Viewed (0)
Back to top