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 <pjuarezd@users.noreply.github.com>
  • Loading branch information
pjuarezd committed Aug 5, 2024
1 parent d16ef8a commit b55094d
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 b55094d

Please sign in to comment.