Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for GetOwnerReferences (0.23 sec)

  1. plugin/pkg/admission/gc/gc_admission.go

    	}
    
    	if oldObj == nil {
    		return len(newMeta.GetOwnerReferences()) > 0
    	}
    	oldMeta, err := meta.Accessor(oldObj)
    	if err != nil {
    		// if we don't have objectmeta, we don't have the object reference
    		return false
    	}
    
    	// compare the old and new.  If they aren't the same, then we're trying to change an ownerRef
    	oldOwners := oldMeta.GetOwnerReferences()
    	newOwners := newMeta.GetOwnerReferences()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 05 02:24:38 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  2. pkg/registry/rbac/helpers.go

    	copiedMeta, err := meta.Accessor(copied)
    	if err != nil {
    		return false
    	}
    	oldMeta, err := meta.Accessor(old)
    	if err != nil {
    		return false
    	}
    	copiedMeta.SetOwnerReferences(oldMeta.GetOwnerReferences())
    	copiedMeta.SetFinalizers(oldMeta.GetFinalizers())
    	copiedMeta.SetSelfLink(oldMeta.GetSelfLink())
    	copiedMeta.SetManagedFields(oldMeta.GetManagedFields())
    
    	return equalities.DeepEqual(copied, old)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 29 16:29:43 UTC 2020
    - 1.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go

    	}
    	return &cp
    }
    
    // GetControllerOfNoCopy returns a pointer to the controllerRef if controllee has a controller
    func GetControllerOfNoCopy(controllee Object) *OwnerReference {
    	refs := controllee.GetOwnerReferences()
    	for i := range refs {
    		if refs[i].Controller != nil && *refs[i].Controller {
    			return &refs[i]
    		}
    	}
    	return nil
    }
    
    // NewControllerRef creates an OwnerReference pointing to the given owner.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 09 05:14:33 UTC 2024
    - 2K bytes
    - Viewed (0)
  4. pkg/controller/statefulset/stateful_set_test.go

    					t.Errorf("bad claim ownerRefs: %s: %v", claim.Name, claim.GetOwnerReferences())
    				}
    			case scaledownPolicy == retain && deletionPolicy == delete:
    				if hasNamedOwnerRef(claim, podName) || !hasNamedOwnerRef(claim, set.Name) {
    					t.Errorf("bad claim ownerRefs: %s: %v", claim.Name, claim.GetOwnerReferences())
    				}
    			case scaledownPolicy == delete && deletionPolicy == retain:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go

    	GetLabels() map[string]string
    	SetLabels(labels map[string]string)
    	GetAnnotations() map[string]string
    	SetAnnotations(annotations map[string]string)
    	GetFinalizers() []string
    	SetFinalizers(finalizers []string)
    	GetOwnerReferences() []OwnerReference
    	SetOwnerReferences([]OwnerReference)
    	GetManagedFields() []ManagedFieldsEntry
    	SetManagedFields(managedFields []ManagedFieldsEntry)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 05 20:12:50 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object.go

    	)
    }
    func (o *cachingObject) GetOwnerReferences() []metav1.OwnerReference {
    	o.lock.RLock()
    	defer o.lock.RUnlock()
    	return o.object.GetOwnerReferences()
    }
    func (o *cachingObject) SetOwnerReferences(references []metav1.OwnerReference) {
    	o.conditionalSet(
    		func() bool { return reflect.DeepEqual(o.object.GetOwnerReferences(), references) },
    		func() { o.object.SetOwnerReferences(references) },
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 05 18:03:48 UTC 2023
    - 12.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/test/apis_meta_v1_unstructed_unstructure_test.go

    	}
    
    	if got, want := unstruct.GetAnnotations(), map[string]string{"test_annotation": "test_value"}; !reflect.DeepEqual(got, want) {
    		t.Errorf("GetAnnotations() = %s, want %s", got, want)
    	}
    	refs := unstruct.GetOwnerReferences()
    	expectedOwnerReferences := []metav1.OwnerReference{
    		{
    			Kind:       "Pod",
    			Name:       "poda",
    			APIVersion: "v1",
    			UID:        "1",
    		},
    		{
    			Kind:               "Pod",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 05 20:12:50 UTC 2022
    - 17.3K bytes
    - Viewed (0)
  8. pkg/controller/statefulset/stateful_set_utils.go

    	if policy.WhenScaled == retain && policy.WhenDeleted == retain {
    		// On a retain policy, it's not a problem for different controller to be managing the claims.
    		return false
    	}
    	for _, ownerRef := range claim.GetOwnerReferences() {
    		if matchesRef(&ownerRef, set, controllerKind) {
    			if ownerRef.UID != set.GetUID() {
    				// A UID mismatch means that pods were incorrectly orphaned. Treating this as an unexpected
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 26.7K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go

    	allErrs = append(allErrs, ValidateAnnotations(meta.GetAnnotations(), fldPath.Child("annotations"))...)
    	allErrs = append(allErrs, ValidateOwnerReferences(meta.GetOwnerReferences(), fldPath.Child("ownerReferences"))...)
    	allErrs = append(allErrs, ValidateFinalizers(meta.GetFinalizers(), fldPath.Child("finalizers"))...)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 07 03:12:31 UTC 2022
    - 12K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go

    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 5K bytes
    - Viewed (0)
Back to top