mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
[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.
This commit is contained in:
parent
55d500e610
commit
cf07c10653
@ -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
Block a user