mirror of
https://github.com/truenas/charts.git
synced 2026-04-14 10:40:31 +08:00
Allow specifying domain name for minio
This commit is contained in:
@@ -140,6 +140,16 @@ questions:
|
||||
default: 9002
|
||||
required: true
|
||||
|
||||
- variable: minioDomain
|
||||
label: "Minio Domain Name"
|
||||
description: "This is only required if TLS is configured for Minio"
|
||||
group: "Minio Configuration"
|
||||
schema:
|
||||
type: string
|
||||
default: null
|
||||
null: true
|
||||
show_if: [["certificate", "!=", null]]
|
||||
|
||||
- variable: certificate
|
||||
description: "Minio Certificate"
|
||||
label: "Minio Certificate"
|
||||
|
||||
@@ -42,6 +42,10 @@ spec:
|
||||
env:
|
||||
{{ $secretName := (include "minio.secretName" .) }}
|
||||
{{ $envList := (default list .Values.environmentVariables) }}
|
||||
{{ if .Values.minioDomain }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "MINIO_BROWSER_REDIRECT_URL" "value" (printf "https://%s:%d" .Values.minioDomain .Values.service.consolePort)) }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "MINIO_SERVER_URL" "value" (printf "https://%s:%d" .Values.minioDomain .Values.service.nodePort)) }}
|
||||
{{ end }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "MINIO_ACCESS_KEY" "valueFromSecret" true "secretName" $secretName "secretKey" "accesskey") }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "MINIO_SECRET_KEY" "valueFromSecret" true "secretName" $secretName "secretKey" "secretkey") }}
|
||||
{{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
|
||||
|
||||
@@ -8,6 +8,9 @@ data:
|
||||
accesskey: {{ if .Values.accessKey }}{{ .Values.accessKey | toString | b64enc | quote }}{{ else }}{{ randAlphaNum 20 | b64enc | quote }}{{ end }}
|
||||
secretkey: {{ if .Values.secretKey }}{{ .Values.secretKey | toString | b64enc | quote }}{{ else }}{{ randAlphaNum 40 | b64enc | quote }}{{ end }}
|
||||
{{ if eq (include "minio.certAvailable" .) "true" }}
|
||||
{{ if eq .Values.minioDomain null }}
|
||||
{{ fail "Minio Domain must be specified when TLS is configured" }}
|
||||
{{ end }}
|
||||
certPublicKey: {{ (include "minio.cert.publicKey" .) | toString | b64enc | quote }}
|
||||
certPrivateKey: {{ (include "minio.cert.privateKey" .) | toString | b64enc | quote }}
|
||||
{{ end }}
|
||||
|
||||
@@ -14,4 +14,5 @@ image:
|
||||
service:
|
||||
consolePort: 32325
|
||||
nodePort: 32324
|
||||
minioDomain: null
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
Reference in New Issue
Block a user