fix: pass MINIO_ROOT_USER/MINIO_ROOT_PASSWORD to MinIO container - #328
Open
krajtar wants to merge 1 commit into
Open
fix: pass MINIO_ROOT_USER/MINIO_ROOT_PASSWORD to MinIO container#328krajtar wants to merge 1 commit into
krajtar wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inSTORAGE_CONFIG(line 51 ofsecret.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:
secret.yaml: GenerateMINIO_ROOT_USER/MINIO_ROOT_PASSWORDwith the same preserve-across-upgrades pattern (explicit > existing secret > auto-generate). Use these values when auto-generatingSTORAGE_CONFIGso both sides match.minio/deployment.yaml: PassMINIO_ROOT_USER/MINIO_ROOT_PASSWORDenv vars from the Secret to the MinIO container.Backward compatibility
MINIO_ROOT_USER/MINIO_ROOT_PASSWORDfrom existing secret. If they don't exist (pre-this-PR), generates new ones and re-derives STORAGE_CONFIG. TheSTORAGE_CONFIGkey is preserved if it already exists in the secret.secrets.storageConfigset explicitly: unaffected (storageConfig override takes priority).