Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for GetOwnerReferences (0.25 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/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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go

    				DeletionGracePeriodSeconds: m.GetDeletionGracePeriodSeconds(),
    				Labels:                     m.GetLabels(),
    				Annotations:                m.GetAnnotations(),
    				OwnerReferences:            m.GetOwnerReferences(),
    				Finalizers:                 m.GetFinalizers(),
    				ManagedFields:              m.GetManagedFields(),
    			},
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 16.5K bytes
    - Viewed (0)
  8. pkg/controller/garbagecollector/graph_builder.go

    		if len(added) != 0 || len(removed) != 0 || len(changed) != 0 {
    			// check if the changed dependency graph unblock owners that are
    			// waiting for the deletion of their dependents.
    			gb.addUnblockedOwnersToDeleteQueue(logger, removed, changed)
    			// update the node itself
    			existingNode.owners = accessor.GetOwnerReferences()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go

    	if u.Object == nil {
    		u.Object = make(map[string]interface{})
    	}
    	SetNestedStringMap(u.Object, value, fields...)
    }
    
    func (u *Unstructured) GetOwnerReferences() []metav1.OwnerReference {
    	field, found, err := NestedFieldNoCopy(u.Object, "metadata", "ownerReferences")
    	if !found || err != nil {
    		return nil
    	}
    	original, ok := field.([]interface{})
    	if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun May 28 03:26:35 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/test/api_meta_meta_test.go

    }
    
    func testGetOwnerReferences(t *testing.T) {
    	obj, expected := getObjectMetaAndOwnerReferences()
    	accessor, err := meta.Accessor(&obj)
    	if err != nil {
    		t.Error(err)
    	}
    	references := accessor.GetOwnerReferences()
    	if !reflect.DeepEqual(references, expected) {
    		t.Errorf("expect %#v\n got %#v", expected, references)
    	}
    }
    
    func testSetOwnerReferences(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 14 10:11:56 UTC 2022
    - 12.9K bytes
    - Viewed (0)
Back to top