@@ -954,34 +954,6 @@ func ensureCRPDisruptionBudgetDeleted(crpDisruptionBudgetName string) {
954954 Eventually (removedActual , eventuallyDuration , eventuallyInterval ).Should (Succeed (), "CRP disruption budget still exists" )
955955}
956956
957- func removeOtherOwner (cluster * framework.Cluster ) {
958- ns := appNamespace ()
959- otherOwner := metav1.OwnerReference {
960- APIVersion : "another-api-version" ,
961- Kind : "another-kind" ,
962- Name : "another-owner" ,
963- UID : "another-uid" ,
964- }
965-
966- Eventually (func () error {
967- if err := cluster .KubeClient .Get (ctx , types.NamespacedName {Name : ns .Name }, & ns ); err != nil {
968- return err
969- }
970- // Filter out the owner reference you want to remove
971- newOwnerRefs := []metav1.OwnerReference {}
972- for _ , ref := range ns .OwnerReferences {
973- if ref .Name != otherOwner .Name {
974- newOwnerRefs = append (newOwnerRefs , ref )
975- } else if ref .Name == otherOwner .Name {
976- By (fmt .Sprintf ("Removing owner reference %s from namespace %s" , otherOwner .Name , ns .Name ))
977- }
978- }
979-
980- ns .SetOwnerReferences (newOwnerRefs )
981- return cluster .KubeClient .Update (ctx , & ns )
982- }, eventuallyDuration , eventuallyInterval ).Should (Succeed (), "Failed to remove other owner from namespace %s" , ns .Name )
983- }
984-
985957// verifyWorkPropagationAndMarkAsAvailable verifies that works derived from a specific CPR have been created
986958// for a specific cluster, and marks these works in the specific member cluster's
987959// reserved namespace as applied and available.
0 commit comments