Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions helm/huly/templates/minio/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ spec:
containerPort: 9000
- name: console
containerPort: 9001
env:
- name: MINIO_ROOT_USER
valueFrom:
secretKeyRef:
name: {{ include "huly.secretName" . }}
key: MINIO_ROOT_USER
- name: MINIO_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "huly.secretName" . }}
key: MINIO_ROOT_PASSWORD
readinessProbe:
httpGet:
path: /minio/health/ready
Expand Down
15 changes: 14 additions & 1 deletion helm/huly/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
{{- $redpandaPwd = randAlphaNum 24 -}}
{{- end -}}

{{- /* MINIO_ROOT_USER / MINIO_ROOT_PASSWORD — used by MinIO container and STORAGE_CONFIG */ -}}
{{- $minioUser := "" -}}
{{- $minioPwd := "" -}}
{{- if and $hasExisting (hasKey $existing.data "MINIO_ROOT_USER") -}}
{{- $minioUser = index $existing.data "MINIO_ROOT_USER" | b64dec -}}
{{- $minioPwd = index $existing.data "MINIO_ROOT_PASSWORD" | b64dec -}}
{{- else -}}
{{- $minioUser = randAlphaNum 20 -}}
{{- $minioPwd = randAlphaNum 40 -}}
{{- end -}}

{{- /* STORAGE_CONFIG — explicit values > storage.type config > existing secret > auto-generate */ -}}
{{- $storageConfig := "" -}}
{{- if .Values.secrets.storageConfig -}}
Expand All @@ -48,7 +59,7 @@
{{- else if and $hasExisting (hasKey $existing.data "STORAGE_CONFIG") -}}
{{- $storageConfig = index $existing.data "STORAGE_CONFIG" | b64dec -}}
{{- else -}}
{{- $storageConfig = printf "minio|minio?accessKey=%s&secretKey=%s" (randAlphaNum 20) (randAlphaNum 40) -}}
{{- $storageConfig = printf "minio|minio?accessKey=%s&secretKey=%s" $minioUser $minioPwd -}}
{{- end -}}

{{- /* CR_DB_URL */ -}}
Expand Down Expand Up @@ -82,6 +93,8 @@ data:
SERVER_SECRET: {{ $serverSecret | b64enc | quote }}
COCKROACH_PASSWORD: {{ $cockroachPwd | b64enc | quote }}
REDPANDA_SUPERUSER_PASSWORD: {{ $redpandaPwd | b64enc | quote }}
MINIO_ROOT_USER: {{ $minioUser | b64enc | quote }}
MINIO_ROOT_PASSWORD: {{ $minioPwd | b64enc | quote }}
STORAGE_CONFIG: {{ $storageConfig | b64enc | quote }}
CR_DB_URL: {{ $crDbUrl | b64enc | quote }}
AIBOT_PASSWORD: {{ $aibotPwd | b64enc | quote }}
Expand Down