- Sort Score
- Result 10 results
- Languages All
Results 11 - 18 of 18 for SetOwnerReferences (0.24 sec)
-
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go
if !ok { // expected map[string]interface{}, got something else return nil } ret = append(ret, extractOwnerReference(o)) } return ret } func (u *Unstructured) SetOwnerReferences(references []metav1.OwnerReference) { if references == nil { RemoveNestedField(u.Object, "metadata", "ownerReferences") return } newReferences := make([]interface{}, 0, len(references))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun May 28 03:26:35 UTC 2023 - 13.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/test/api_meta_meta_test.go
func testSetOwnerReferences(t *testing.T) { expected, references := getObjectMetaAndOwnerReferences() obj := MyAPIObject2{} accessor, err := meta.Accessor(&obj) if err != nil { t.Error(err) } accessor.SetOwnerReferences(references) if e, a := expected.ObjectMeta.OwnerReferences, obj.ObjectMeta.OwnerReferences; !reflect.DeepEqual(e, a) { t.Errorf("expect %#v\n got %#v", e, a) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 14 10:11:56 UTC 2022 - 12.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go
if err := extractFromOwnerReference(s.Index(i), &ret[i]); err != nil { klog.Errorf("extractFromOwnerReference failed: %v", err) return ret } } return ret } func (a genericAccessor) SetOwnerReferences(references []metav1.OwnerReference) { s := a.ownerReferences if s.Kind() != reflect.Pointer || s.Elem().Kind() != reflect.Slice { klog.Errorf("expect %v to be a pointer to slice", s) } s = s.Elem()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jun 25 16:23:43 UTC 2022 - 16.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go
if afterMutatingAdmission { format = DuplicateOwnerReferencesAfterMutatingAdmissionWarningFormat } warning.AddWarning(requestContext, "", fmt.Sprintf(format, strings.Join(duplicates, ", "))) accessor.SetOwnerReferences(deduped) } } func summarizeData(data []byte, maxLength int) string { switch { case len(data) == 0: return "<empty>" case data[0] == '{': if len(data) > maxLength {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 21:44:00 UTC 2023 - 17K bytes - Viewed (0) -
pkg/kube/util.go
} // ManagedFields is large and we never use it t.GetObjectMeta().SetManagedFields(nil) // Annotation is never used t.GetObjectMeta().SetAnnotations(nil) // OwnerReference is never used t.GetObjectMeta().SetOwnerReferences(nil) // only node labels and addressed are useful if node := obj.(*corev1.Node); node != nil { node.Status.Allocatable = nil node.Status.Capacity = nil node.Status.Images = nil
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 06 05:10:23 UTC 2024 - 18.6K bytes - Viewed (0) -
pkg/controller/statefulset/stateful_set_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 33.1K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/test/integration/conversion/conversion_test.go
labels["to"] = strings.Replace(desiredAPIVersion, "/", ".", 1) u.SetLabels(labels) // mutate other fields. This should be ignored. u.SetGeneration(42) u.SetOwnerReferences([]metav1.OwnerReference{{ APIVersion: "v1", Kind: "Namespace", Name: "default", UID: "1234", Controller: nil, BlockOwnerDeletion: nil,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 06 05:32:34 UTC 2023 - 47.1K bytes - Viewed (0) -
pkg/controller/disruption/disruption_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 50K bytes - Viewed (0)