Skip to content

Commit

Permalink
bugfix: build MINIO_ARGS from pools in spec instead of pools in status
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
pjuarezd committed Jun 13, 2024
1 parent 54e4091 commit 0b80672
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 @@ -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 {
Expand Down

0 comments on commit 0b80672

Please sign in to comment.