mirror of https://github.com/k3s-io/k3s
Merge pull request #42710 from madhusudancs/fed-e2e-rs-createdobj
Automatic merge from submit-queue [Federation] Use and return created replicaset instead of the passed object. Passed replicaset object doesn't contain object name, but has a prefix set in `GenerateName`. However, we need to operate on the object name later to uniquely identified the created object. So we need the created object with the name set by the API server. ```release-note NONE ```pull/6/head
commit
a75718c912
|
@ -400,10 +400,10 @@ func createReplicaSetOrFail(clientset *fedclientset.Clientset, replicaset *v1bet
|
|||
}
|
||||
By(fmt.Sprintf("Creating federation replicaset %q in namespace %q", replicaset.Name, namespace))
|
||||
|
||||
_, err := clientset.Extensions().ReplicaSets(namespace).Create(replicaset)
|
||||
newRS, err := clientset.Extensions().ReplicaSets(namespace).Create(replicaset)
|
||||
framework.ExpectNoError(err, "Creating replicaset %q in namespace %q", replicaset.Name, namespace)
|
||||
By(fmt.Sprintf("Successfully created federation replicaset %q in namespace %q", replicaset.Name, namespace))
|
||||
return replicaset
|
||||
By(fmt.Sprintf("Successfully created federation replicaset %q in namespace %q", newRS.Name, namespace))
|
||||
return newRS
|
||||
}
|
||||
|
||||
func deleteReplicaSetOrFail(clientset *fedclientset.Clientset, nsName string, replicaSetName string, orphanDependents *bool) {
|
||||
|
|
Loading…
Reference in New Issue