@@ -210,13 +210,13 @@ func ConnectWithKubeconfig(
210
210
return kcpClient
211
211
}
212
212
213
- func DeployEtcd (t * testing.T , namespace string ) string {
213
+ func DeployEtcd (t * testing.T , name , namespace string ) string {
214
214
t .Helper ()
215
215
216
- t .Logf ("Installing etcd into %s…" , namespace )
216
+ t .Logf ("Installing etcd %q into %s…" , name , namespace )
217
217
args := []string {
218
218
"install" ,
219
- "etcd" ,
219
+ name ,
220
220
"oci://registry-1.docker.io/bitnamicharts/etcd" ,
221
221
"--namespace" , namespace ,
222
222
"--version" , "10.7.1" , // latest version at the time of writing
@@ -233,7 +233,7 @@ func DeployEtcd(t *testing.T, namespace string) string {
233
233
"wait" ,
234
234
"pods" ,
235
235
"--namespace" , namespace ,
236
- "--selector" , "app.kubernetes.io/name=etcd" ,
236
+ "--selector" , fmt . Sprintf ( "app.kubernetes.io/name=etcd,app.kubernetes.io/instance=%s" , name ) ,
237
237
"--for" , "condition=Ready" ,
238
238
"--timeout" , "3m" ,
239
239
}
@@ -242,5 +242,5 @@ func DeployEtcd(t *testing.T, namespace string) string {
242
242
t .Fatalf ("Failed to wait for etcd to become ready: %v" , err )
243
243
}
244
244
245
- return fmt .Sprintf ("http://etcd .%s.svc.cluster.local:2379" , namespace )
245
+ return fmt .Sprintf ("http://%s .%s.svc.cluster.local:2379" , name , namespace )
246
246
}
0 commit comments