From 0b806725001a0cd95e47225c76692b282a44b699 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 5aee5092118..3e65f97dc04 100644 --- a/pkg/apis/minio.min.io/v2/helper.go +++ b/pkg/apis/minio.min.io/v2/helper.go @@ -437,13 +437,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 {