Skip to content

Commit

Permalink
Remove index-based pool name verification (#2164)
Browse files Browse the repository at this point in the history
Build of MINIO_ARGS from Pool status is incomplete and leads to duplicated args 
names when a pool doesn't have the name `spec.pools.*.name`.

Signed-off-by: pjuarezd <[email protected]>
  • Loading branch information
pjuarezd authored Aug 6, 2024
1 parent d16ef8a commit 86722cf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/apis/minio.min.io/v2/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 86722cf

Please sign in to comment.