Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for dedupOwnerReferences (0.25 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go

    		}
    	}
    
    	return nil
    }
    
    // dedupOwnerReferences dedups owner references over the entire entry.
    // NOTE: We don't know enough about the existing cases of owner references
    // sharing the same UID but different fields. Nor do we know what might break.
    // In the future we may just dedup/reject owner references with the same UID.
    func dedupOwnerReferences(refs []metav1.OwnerReference) ([]metav1.OwnerReference, []string) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 17K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest_test.go

    					Name:       "name",
    					UID:        "1",
    				},
    			},
    		},
    	}
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			deduped, _ := dedupOwnerReferences(tc.ownerReferences)
    			if !apiequality.Semantic.DeepEqual(deduped, tc.expected) {
    				t.Errorf("diff: %v", cmp.Diff(deduped, tc.expected))
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 41.8K bytes
    - Viewed (0)
Back to top