From b55094d0ad8c8fcdbc76ff18ea206d3d6367fb2a Mon Sep 17 00:00:00 2001 From: pjuarezd Date: Wed, 12 Jun 2024 17:17:02 -0700 Subject: [PATCH] bugfix: build MINIO_ARGS from pools in spec instead of pools in status Build from MINIO_ARGS from Pool status is incomplete and leads to duplicated args names when a pool don't have name `spec.pools.*.name`. Signed-off-by: pjuarezd --- pkg/apis/minio.min.io/v2/helper.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/apis/minio.min.io/v2/helper.go b/pkg/apis/minio.min.io/v2/helper.go index cfd3ef3330a..b68517983f9 100644 --- a/pkg/apis/minio.min.io/v2/helper.go +++ b/pkg/apis/minio.min.io/v2/helper.go @@ -413,13 +413,8 @@ func (t *Tenant) GenBearerToken(accessKey, secretKey string) string { // MinIOHosts returns the domain names in ellipses format created for current Tenant func (t *Tenant) MinIOHosts() (hosts []string) { // Create the ellipses style URL - for pi, pool := range t.Spec.Pools { - // determine the proper statefulset name + for _, pool := range t.Spec.Pools { ssName := t.PoolStatefulsetName(&pool) - if len(t.Status.Pools) > pi { - ssName = t.Status.Pools[pi].SSName - } - if pool.Servers == 1 { hosts = append(hosts, fmt.Sprintf("%s-%s.%s.%s.svc.%s", ssName, "0", t.MinIOHLServiceName(), t.Namespace, GetClusterDomain())) } else {