Skip to content

fix: pass MINIO_ROOT_USER/MINIO_ROOT_PASSWORD to MinIO container - #328

Open
krajtar wants to merge 1 commit into
hcengineering:mainfrom
krajtar:fix/minio-root-credentials
Open

fix: pass MINIO_ROOT_USER/MINIO_ROOT_PASSWORD to MinIO container#328
krajtar wants to merge 1 commit into
hcengineering:mainfrom
krajtar:fix/minio-root-credentials

Conversation

@krajtar

@krajtar krajtar commented Aug 18, 2026

Copy link
Copy Markdown

Problem

The MinIO deployment container has no env vars set. MinIO falls back to its default credentials (minioadmin/minioadmin). Meanwhile, the chart auto-generates random credentials in STORAGE_CONFIG (line 51 of secret.yaml) for use by Huly services to connect to MinIO. These credentials are never passed to MinIO itself, so MinIO runs with default creds while Huly services try to authenticate with the generated ones.

This works by accident when MinIO allows anonymous access on first start, but breaks on restarts or when ArgoCD recreates the pod — MinIO re-reads its env vars, finds none, and uses defaults that don't match what Huly services expect.

Fix

Two changes:

  1. secret.yaml: Generate MINIO_ROOT_USER/MINIO_ROOT_PASSWORD with the same preserve-across-upgrades pattern (explicit > existing secret > auto-generate). Use these values when auto-generating STORAGE_CONFIG so both sides match.

  2. minio/deployment.yaml: Pass MINIO_ROOT_USER/MINIO_ROOT_PASSWORD env vars from the Secret to the MinIO container.

Backward compatibility

  • On first install: generates random MinIO creds, uses them in both MinIO container and STORAGE_CONFIG.
  • On upgrade with existing secret: reads MINIO_ROOT_USER/MINIO_ROOT_PASSWORD from existing secret. If they don't exist (pre-this-PR), generates new ones and re-derives STORAGE_CONFIG. The STORAGE_CONFIG key is preserved if it already exists in the secret.
  • Users with secrets.storageConfig set explicitly: unaffected (storageConfig override takes priority).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant