From 445a63585559fc23b17ea2d2c00ab10a8913f101 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Mon, 9 Aug 2021 13:11:37 +0500 Subject: [PATCH 1/4] Bump minio chart version --- test/minio/{1.3.10 => 1.3.11}/.helmignore | 0 test/minio/{1.3.10 => 1.3.11}/Chart.yaml | 2 +- test/minio/{1.3.10 => 1.3.11}/README.md | 0 test/minio/{1.3.10 => 1.3.11}/app-readme.md | 0 .../{1.3.10 => 1.3.11}/charts/common-2105.0.0.tgz | Bin test/minio/{1.3.10 => 1.3.11}/default_values.yaml | 0 test/minio/{1.3.10 => 1.3.11}/ix_values.yaml | 0 .../migrations/migrate_from_1.0.0 | 0 test/minio/{1.3.10 => 1.3.11}/questions.yaml | 0 test/minio/{1.3.10 => 1.3.11}/requirements.lock | 0 test/minio/{1.3.10 => 1.3.11}/templates/NOTES.txt | 0 test/minio/{1.3.10 => 1.3.11}/templates/_cert.tpl | 0 .../minio/{1.3.10 => 1.3.11}/templates/_helpers.tpl | 0 .../{1.3.10 => 1.3.11}/templates/configmap.yaml | 0 .../{1.3.10 => 1.3.11}/templates/deployment.yaml | 0 .../minio/{1.3.10 => 1.3.11}/templates/secrets.yaml | 0 .../minio/{1.3.10 => 1.3.11}/templates/service.yaml | 0 .../templates/serviceaccount.yaml | 0 test/minio/{1.3.10 => 1.3.11}/test_values.yaml | 0 test/minio/{1.3.10 => 1.3.11}/values.yaml | 0 20 files changed, 1 insertion(+), 1 deletion(-) rename test/minio/{1.3.10 => 1.3.11}/.helmignore (100%) rename test/minio/{1.3.10 => 1.3.11}/Chart.yaml (96%) rename test/minio/{1.3.10 => 1.3.11}/README.md (100%) rename test/minio/{1.3.10 => 1.3.11}/app-readme.md (100%) rename test/minio/{1.3.10 => 1.3.11}/charts/common-2105.0.0.tgz (100%) rename test/minio/{1.3.10 => 1.3.11}/default_values.yaml (100%) rename test/minio/{1.3.10 => 1.3.11}/ix_values.yaml (100%) rename test/minio/{1.3.10 => 1.3.11}/migrations/migrate_from_1.0.0 (100%) rename test/minio/{1.3.10 => 1.3.11}/questions.yaml (100%) rename test/minio/{1.3.10 => 1.3.11}/requirements.lock (100%) rename test/minio/{1.3.10 => 1.3.11}/templates/NOTES.txt (100%) rename test/minio/{1.3.10 => 1.3.11}/templates/_cert.tpl (100%) rename test/minio/{1.3.10 => 1.3.11}/templates/_helpers.tpl (100%) rename test/minio/{1.3.10 => 1.3.11}/templates/configmap.yaml (100%) rename test/minio/{1.3.10 => 1.3.11}/templates/deployment.yaml (100%) rename test/minio/{1.3.10 => 1.3.11}/templates/secrets.yaml (100%) rename test/minio/{1.3.10 => 1.3.11}/templates/service.yaml (100%) rename test/minio/{1.3.10 => 1.3.11}/templates/serviceaccount.yaml (100%) rename test/minio/{1.3.10 => 1.3.11}/test_values.yaml (100%) rename test/minio/{1.3.10 => 1.3.11}/values.yaml (100%) diff --git a/test/minio/1.3.10/.helmignore b/test/minio/1.3.11/.helmignore similarity index 100% rename from test/minio/1.3.10/.helmignore rename to test/minio/1.3.11/.helmignore diff --git a/test/minio/1.3.10/Chart.yaml b/test/minio/1.3.11/Chart.yaml similarity index 96% rename from test/minio/1.3.10/Chart.yaml rename to test/minio/1.3.11/Chart.yaml index d8a01208d3..fe60094148 100644 --- a/test/minio/1.3.10/Chart.yaml +++ b/test/minio/1.3.11/Chart.yaml @@ -16,4 +16,4 @@ sources: - https://github.com/minio/minio - https://github.com/minio/charts upstream_version: 8.0.5 -version: 1.3.10 +version: 1.3.11 diff --git a/test/minio/1.3.10/README.md b/test/minio/1.3.11/README.md similarity index 100% rename from test/minio/1.3.10/README.md rename to test/minio/1.3.11/README.md diff --git a/test/minio/1.3.10/app-readme.md b/test/minio/1.3.11/app-readme.md similarity index 100% rename from test/minio/1.3.10/app-readme.md rename to test/minio/1.3.11/app-readme.md diff --git a/test/minio/1.3.10/charts/common-2105.0.0.tgz b/test/minio/1.3.11/charts/common-2105.0.0.tgz similarity index 100% rename from test/minio/1.3.10/charts/common-2105.0.0.tgz rename to test/minio/1.3.11/charts/common-2105.0.0.tgz diff --git a/test/minio/1.3.10/default_values.yaml b/test/minio/1.3.11/default_values.yaml similarity index 100% rename from test/minio/1.3.10/default_values.yaml rename to test/minio/1.3.11/default_values.yaml diff --git a/test/minio/1.3.10/ix_values.yaml b/test/minio/1.3.11/ix_values.yaml similarity index 100% rename from test/minio/1.3.10/ix_values.yaml rename to test/minio/1.3.11/ix_values.yaml diff --git a/test/minio/1.3.10/migrations/migrate_from_1.0.0 b/test/minio/1.3.11/migrations/migrate_from_1.0.0 similarity index 100% rename from test/minio/1.3.10/migrations/migrate_from_1.0.0 rename to test/minio/1.3.11/migrations/migrate_from_1.0.0 diff --git a/test/minio/1.3.10/questions.yaml b/test/minio/1.3.11/questions.yaml similarity index 100% rename from test/minio/1.3.10/questions.yaml rename to test/minio/1.3.11/questions.yaml diff --git a/test/minio/1.3.10/requirements.lock b/test/minio/1.3.11/requirements.lock similarity index 100% rename from test/minio/1.3.10/requirements.lock rename to test/minio/1.3.11/requirements.lock diff --git a/test/minio/1.3.10/templates/NOTES.txt b/test/minio/1.3.11/templates/NOTES.txt similarity index 100% rename from test/minio/1.3.10/templates/NOTES.txt rename to test/minio/1.3.11/templates/NOTES.txt diff --git a/test/minio/1.3.10/templates/_cert.tpl b/test/minio/1.3.11/templates/_cert.tpl similarity index 100% rename from test/minio/1.3.10/templates/_cert.tpl rename to test/minio/1.3.11/templates/_cert.tpl diff --git a/test/minio/1.3.10/templates/_helpers.tpl b/test/minio/1.3.11/templates/_helpers.tpl similarity index 100% rename from test/minio/1.3.10/templates/_helpers.tpl rename to test/minio/1.3.11/templates/_helpers.tpl diff --git a/test/minio/1.3.10/templates/configmap.yaml b/test/minio/1.3.11/templates/configmap.yaml similarity index 100% rename from test/minio/1.3.10/templates/configmap.yaml rename to test/minio/1.3.11/templates/configmap.yaml diff --git a/test/minio/1.3.10/templates/deployment.yaml b/test/minio/1.3.11/templates/deployment.yaml similarity index 100% rename from test/minio/1.3.10/templates/deployment.yaml rename to test/minio/1.3.11/templates/deployment.yaml diff --git a/test/minio/1.3.10/templates/secrets.yaml b/test/minio/1.3.11/templates/secrets.yaml similarity index 100% rename from test/minio/1.3.10/templates/secrets.yaml rename to test/minio/1.3.11/templates/secrets.yaml diff --git a/test/minio/1.3.10/templates/service.yaml b/test/minio/1.3.11/templates/service.yaml similarity index 100% rename from test/minio/1.3.10/templates/service.yaml rename to test/minio/1.3.11/templates/service.yaml diff --git a/test/minio/1.3.10/templates/serviceaccount.yaml b/test/minio/1.3.11/templates/serviceaccount.yaml similarity index 100% rename from test/minio/1.3.10/templates/serviceaccount.yaml rename to test/minio/1.3.11/templates/serviceaccount.yaml diff --git a/test/minio/1.3.10/test_values.yaml b/test/minio/1.3.11/test_values.yaml similarity index 100% rename from test/minio/1.3.10/test_values.yaml rename to test/minio/1.3.11/test_values.yaml diff --git a/test/minio/1.3.10/values.yaml b/test/minio/1.3.11/values.yaml similarity index 100% rename from test/minio/1.3.10/values.yaml rename to test/minio/1.3.11/values.yaml From 1c9df4845a8235a5efe998fe1014652f9258944d Mon Sep 17 00:00:00 2001 From: sonicaj Date: Mon, 9 Aug 2021 13:42:26 +0500 Subject: [PATCH 2/4] Allow specifying domain name for minio --- test/minio/1.3.11/questions.yaml | 10 ++++++++++ test/minio/1.3.11/templates/deployment.yaml | 4 ++++ test/minio/1.3.11/templates/secrets.yaml | 3 +++ test/minio/1.3.11/test_values.yaml | 1 + 4 files changed, 18 insertions(+) diff --git a/test/minio/1.3.11/questions.yaml b/test/minio/1.3.11/questions.yaml index 631941fbe3..62571b70b4 100644 --- a/test/minio/1.3.11/questions.yaml +++ b/test/minio/1.3.11/questions.yaml @@ -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" diff --git a/test/minio/1.3.11/templates/deployment.yaml b/test/minio/1.3.11/templates/deployment.yaml index de6c16d185..18573a26d9 100644 --- a/test/minio/1.3.11/templates/deployment.yaml +++ b/test/minio/1.3.11/templates/deployment.yaml @@ -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 }} diff --git a/test/minio/1.3.11/templates/secrets.yaml b/test/minio/1.3.11/templates/secrets.yaml index 4085fd585b..bb66428cde 100644 --- a/test/minio/1.3.11/templates/secrets.yaml +++ b/test/minio/1.3.11/templates/secrets.yaml @@ -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 }} diff --git a/test/minio/1.3.11/test_values.yaml b/test/minio/1.3.11/test_values.yaml index 5a520ef343..9e37742e1e 100644 --- a/test/minio/1.3.11/test_values.yaml +++ b/test/minio/1.3.11/test_values.yaml @@ -14,4 +14,5 @@ image: service: consolePort: 32325 nodePort: 32324 +minioDomain: null updateStrategy: RollingUpdate From 022e85f63429ef20313abc958ff23b0758b9f408 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Mon, 9 Aug 2021 14:05:48 +0500 Subject: [PATCH 3/4] Dynamically retrieve minio scheme and set it appropriately --- test/minio/1.3.11/questions.yaml | 2 +- test/minio/1.3.11/templates/_helpers.tpl | 12 ++++++++++++ test/minio/1.3.11/templates/configmap.yaml | 6 +----- test/minio/1.3.11/templates/deployment.yaml | 4 ++-- test/minio/1.3.11/templates/secrets.yaml | 3 --- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/test/minio/1.3.11/questions.yaml b/test/minio/1.3.11/questions.yaml index 62571b70b4..c426bb7322 100644 --- a/test/minio/1.3.11/questions.yaml +++ b/test/minio/1.3.11/questions.yaml @@ -147,7 +147,7 @@ questions: schema: type: string default: null - null: true + "null": true show_if: [["certificate", "!=", null]] - variable: certificate diff --git a/test/minio/1.3.11/templates/_helpers.tpl b/test/minio/1.3.11/templates/_helpers.tpl index f4d59c96f8..dc65a42ead 100644 --- a/test/minio/1.3.11/templates/_helpers.tpl +++ b/test/minio/1.3.11/templates/_helpers.tpl @@ -38,3 +38,15 @@ Retrieve private key of minio certificate {{- $_ := set $values "commonCertOptions" (dict "certKeyName" $values.Values.certificate) -}} {{ include "common.resources.cert" $values }} {{- end -}} + + +{{/* +Retrieve scheme/protocol for minio +*/}} +{{- define "minio.scheme" -}} +{{- if eq (include "minio.certAvailable" .) "true" -}} +{{- print "https" -}} +{{- else -}} +{{- print "http" -}} +{{- end -}} +{{- end -}} diff --git a/test/minio/1.3.11/templates/configmap.yaml b/test/minio/1.3.11/templates/configmap.yaml index 0c9aeea644..98a62a3890 100644 --- a/test/minio/1.3.11/templates/configmap.yaml +++ b/test/minio/1.3.11/templates/configmap.yaml @@ -1,10 +1,6 @@ -{{ $scheme := "http" }} -{{ if eq (include "minio.certAvailable" .) "true" }} -{{ $scheme = "https" }} -{{ end }} apiVersion: v1 kind: ConfigMap metadata: name: minio-config data: - protocol: {{ $scheme }} + protocol: {{ include "minio.scheme" . }} diff --git a/test/minio/1.3.11/templates/deployment.yaml b/test/minio/1.3.11/templates/deployment.yaml index 18573a26d9..a18a71893c 100644 --- a/test/minio/1.3.11/templates/deployment.yaml +++ b/test/minio/1.3.11/templates/deployment.yaml @@ -43,8 +43,8 @@ spec: {{ $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)) }} + {{ $envList = mustAppend $envList (dict "name" "MINIO_BROWSER_REDIRECT_URL" "value" (printf "%s://%s:%d" (include "minio.scheme" .) .Values.minioDomain (.Values.service.consolePort | int))) }} + {{ $envList = mustAppend $envList (dict "name" "MINIO_SERVER_URL" "value" (printf "%s://%s:%d" (include "minio.scheme" .) .Values.minioDomain (.Values.service.nodePort | int))) }} {{ 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") }} diff --git a/test/minio/1.3.11/templates/secrets.yaml b/test/minio/1.3.11/templates/secrets.yaml index bb66428cde..4085fd585b 100644 --- a/test/minio/1.3.11/templates/secrets.yaml +++ b/test/minio/1.3.11/templates/secrets.yaml @@ -8,9 +8,6 @@ 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 }} From 24e790f3e0320742b3765ea4db1299fc1cfee01b Mon Sep 17 00:00:00 2001 From: sonicaj Date: Tue, 10 Aug 2021 12:14:35 +0500 Subject: [PATCH 4/4] Update stable train from test train --- charts/minio/1.3.10/templates/configmap.yaml | 10 ---------- charts/minio/{1.3.10 => 1.3.11}/.helmignore | 0 charts/minio/{1.3.10 => 1.3.11}/Chart.yaml | 2 +- charts/minio/{1.3.10 => 1.3.11}/README.md | 0 charts/minio/{1.3.10 => 1.3.11}/app-readme.md | 0 .../{1.3.10 => 1.3.11}/charts/common-2105.0.0.tgz | Bin charts/minio/{1.3.10 => 1.3.11}/default_values.yaml | 0 charts/minio/{1.3.10 => 1.3.11}/ix_values.yaml | 0 .../migrations/migrate_from_1.0.0 | 0 charts/minio/{1.3.10 => 1.3.11}/questions.yaml | 10 ++++++++++ charts/minio/{1.3.10 => 1.3.11}/requirements.lock | 0 charts/minio/{1.3.10 => 1.3.11}/templates/NOTES.txt | 0 charts/minio/{1.3.10 => 1.3.11}/templates/_cert.tpl | 0 .../minio/{1.3.10 => 1.3.11}/templates/_helpers.tpl | 12 ++++++++++++ charts/minio/1.3.11/templates/configmap.yaml | 6 ++++++ .../{1.3.10 => 1.3.11}/templates/deployment.yaml | 4 ++++ .../minio/{1.3.10 => 1.3.11}/templates/secrets.yaml | 0 .../minio/{1.3.10 => 1.3.11}/templates/service.yaml | 0 .../templates/serviceaccount.yaml | 0 charts/minio/{1.3.10 => 1.3.11}/test_values.yaml | 1 + charts/minio/{1.3.10 => 1.3.11}/values.yaml | 0 test/minio/1.3.11/templates/deployment.yaml | 2 +- 22 files changed, 35 insertions(+), 12 deletions(-) delete mode 100644 charts/minio/1.3.10/templates/configmap.yaml rename charts/minio/{1.3.10 => 1.3.11}/.helmignore (100%) rename charts/minio/{1.3.10 => 1.3.11}/Chart.yaml (96%) rename charts/minio/{1.3.10 => 1.3.11}/README.md (100%) rename charts/minio/{1.3.10 => 1.3.11}/app-readme.md (100%) rename charts/minio/{1.3.10 => 1.3.11}/charts/common-2105.0.0.tgz (100%) rename charts/minio/{1.3.10 => 1.3.11}/default_values.yaml (100%) rename charts/minio/{1.3.10 => 1.3.11}/ix_values.yaml (100%) rename charts/minio/{1.3.10 => 1.3.11}/migrations/migrate_from_1.0.0 (100%) rename charts/minio/{1.3.10 => 1.3.11}/questions.yaml (95%) rename charts/minio/{1.3.10 => 1.3.11}/requirements.lock (100%) rename charts/minio/{1.3.10 => 1.3.11}/templates/NOTES.txt (100%) rename charts/minio/{1.3.10 => 1.3.11}/templates/_cert.tpl (100%) rename charts/minio/{1.3.10 => 1.3.11}/templates/_helpers.tpl (83%) create mode 100644 charts/minio/1.3.11/templates/configmap.yaml rename charts/minio/{1.3.10 => 1.3.11}/templates/deployment.yaml (82%) rename charts/minio/{1.3.10 => 1.3.11}/templates/secrets.yaml (100%) rename charts/minio/{1.3.10 => 1.3.11}/templates/service.yaml (100%) rename charts/minio/{1.3.10 => 1.3.11}/templates/serviceaccount.yaml (100%) rename charts/minio/{1.3.10 => 1.3.11}/test_values.yaml (94%) rename charts/minio/{1.3.10 => 1.3.11}/values.yaml (100%) diff --git a/charts/minio/1.3.10/templates/configmap.yaml b/charts/minio/1.3.10/templates/configmap.yaml deleted file mode 100644 index 0c9aeea644..0000000000 --- a/charts/minio/1.3.10/templates/configmap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -{{ $scheme := "http" }} -{{ if eq (include "minio.certAvailable" .) "true" }} -{{ $scheme = "https" }} -{{ end }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: minio-config -data: - protocol: {{ $scheme }} diff --git a/charts/minio/1.3.10/.helmignore b/charts/minio/1.3.11/.helmignore similarity index 100% rename from charts/minio/1.3.10/.helmignore rename to charts/minio/1.3.11/.helmignore diff --git a/charts/minio/1.3.10/Chart.yaml b/charts/minio/1.3.11/Chart.yaml similarity index 96% rename from charts/minio/1.3.10/Chart.yaml rename to charts/minio/1.3.11/Chart.yaml index d8a01208d3..fe60094148 100644 --- a/charts/minio/1.3.10/Chart.yaml +++ b/charts/minio/1.3.11/Chart.yaml @@ -16,4 +16,4 @@ sources: - https://github.com/minio/minio - https://github.com/minio/charts upstream_version: 8.0.5 -version: 1.3.10 +version: 1.3.11 diff --git a/charts/minio/1.3.10/README.md b/charts/minio/1.3.11/README.md similarity index 100% rename from charts/minio/1.3.10/README.md rename to charts/minio/1.3.11/README.md diff --git a/charts/minio/1.3.10/app-readme.md b/charts/minio/1.3.11/app-readme.md similarity index 100% rename from charts/minio/1.3.10/app-readme.md rename to charts/minio/1.3.11/app-readme.md diff --git a/charts/minio/1.3.10/charts/common-2105.0.0.tgz b/charts/minio/1.3.11/charts/common-2105.0.0.tgz similarity index 100% rename from charts/minio/1.3.10/charts/common-2105.0.0.tgz rename to charts/minio/1.3.11/charts/common-2105.0.0.tgz diff --git a/charts/minio/1.3.10/default_values.yaml b/charts/minio/1.3.11/default_values.yaml similarity index 100% rename from charts/minio/1.3.10/default_values.yaml rename to charts/minio/1.3.11/default_values.yaml diff --git a/charts/minio/1.3.10/ix_values.yaml b/charts/minio/1.3.11/ix_values.yaml similarity index 100% rename from charts/minio/1.3.10/ix_values.yaml rename to charts/minio/1.3.11/ix_values.yaml diff --git a/charts/minio/1.3.10/migrations/migrate_from_1.0.0 b/charts/minio/1.3.11/migrations/migrate_from_1.0.0 similarity index 100% rename from charts/minio/1.3.10/migrations/migrate_from_1.0.0 rename to charts/minio/1.3.11/migrations/migrate_from_1.0.0 diff --git a/charts/minio/1.3.10/questions.yaml b/charts/minio/1.3.11/questions.yaml similarity index 95% rename from charts/minio/1.3.10/questions.yaml rename to charts/minio/1.3.11/questions.yaml index 631941fbe3..c426bb7322 100644 --- a/charts/minio/1.3.10/questions.yaml +++ b/charts/minio/1.3.11/questions.yaml @@ -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" diff --git a/charts/minio/1.3.10/requirements.lock b/charts/minio/1.3.11/requirements.lock similarity index 100% rename from charts/minio/1.3.10/requirements.lock rename to charts/minio/1.3.11/requirements.lock diff --git a/charts/minio/1.3.10/templates/NOTES.txt b/charts/minio/1.3.11/templates/NOTES.txt similarity index 100% rename from charts/minio/1.3.10/templates/NOTES.txt rename to charts/minio/1.3.11/templates/NOTES.txt diff --git a/charts/minio/1.3.10/templates/_cert.tpl b/charts/minio/1.3.11/templates/_cert.tpl similarity index 100% rename from charts/minio/1.3.10/templates/_cert.tpl rename to charts/minio/1.3.11/templates/_cert.tpl diff --git a/charts/minio/1.3.10/templates/_helpers.tpl b/charts/minio/1.3.11/templates/_helpers.tpl similarity index 83% rename from charts/minio/1.3.10/templates/_helpers.tpl rename to charts/minio/1.3.11/templates/_helpers.tpl index f4d59c96f8..dc65a42ead 100644 --- a/charts/minio/1.3.10/templates/_helpers.tpl +++ b/charts/minio/1.3.11/templates/_helpers.tpl @@ -38,3 +38,15 @@ Retrieve private key of minio certificate {{- $_ := set $values "commonCertOptions" (dict "certKeyName" $values.Values.certificate) -}} {{ include "common.resources.cert" $values }} {{- end -}} + + +{{/* +Retrieve scheme/protocol for minio +*/}} +{{- define "minio.scheme" -}} +{{- if eq (include "minio.certAvailable" .) "true" -}} +{{- print "https" -}} +{{- else -}} +{{- print "http" -}} +{{- end -}} +{{- end -}} diff --git a/charts/minio/1.3.11/templates/configmap.yaml b/charts/minio/1.3.11/templates/configmap.yaml new file mode 100644 index 0000000000..98a62a3890 --- /dev/null +++ b/charts/minio/1.3.11/templates/configmap.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: minio-config +data: + protocol: {{ include "minio.scheme" . }} diff --git a/charts/minio/1.3.10/templates/deployment.yaml b/charts/minio/1.3.11/templates/deployment.yaml similarity index 82% rename from charts/minio/1.3.10/templates/deployment.yaml rename to charts/minio/1.3.11/templates/deployment.yaml index de6c16d185..d3f1a16a14 100644 --- a/charts/minio/1.3.10/templates/deployment.yaml +++ b/charts/minio/1.3.11/templates/deployment.yaml @@ -42,6 +42,10 @@ spec: env: {{ $secretName := (include "minio.secretName" .) }} {{ $envList := (default list .Values.environmentVariables) }} + {{ if and (eq (include "minio.certAvailable" .) "true") .Values.minioDomain }} + {{ $envList = mustAppend $envList (dict "name" "MINIO_BROWSER_REDIRECT_URL" "value" (printf "%s://%s:%d" (include "minio.scheme" .) .Values.minioDomain (.Values.service.consolePort | int))) }} + {{ $envList = mustAppend $envList (dict "name" "MINIO_SERVER_URL" "value" (printf "%s://%s:%d" (include "minio.scheme" .) .Values.minioDomain (.Values.service.nodePort | int))) }} + {{ 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 }} diff --git a/charts/minio/1.3.10/templates/secrets.yaml b/charts/minio/1.3.11/templates/secrets.yaml similarity index 100% rename from charts/minio/1.3.10/templates/secrets.yaml rename to charts/minio/1.3.11/templates/secrets.yaml diff --git a/charts/minio/1.3.10/templates/service.yaml b/charts/minio/1.3.11/templates/service.yaml similarity index 100% rename from charts/minio/1.3.10/templates/service.yaml rename to charts/minio/1.3.11/templates/service.yaml diff --git a/charts/minio/1.3.10/templates/serviceaccount.yaml b/charts/minio/1.3.11/templates/serviceaccount.yaml similarity index 100% rename from charts/minio/1.3.10/templates/serviceaccount.yaml rename to charts/minio/1.3.11/templates/serviceaccount.yaml diff --git a/charts/minio/1.3.10/test_values.yaml b/charts/minio/1.3.11/test_values.yaml similarity index 94% rename from charts/minio/1.3.10/test_values.yaml rename to charts/minio/1.3.11/test_values.yaml index 5a520ef343..9e37742e1e 100644 --- a/charts/minio/1.3.10/test_values.yaml +++ b/charts/minio/1.3.11/test_values.yaml @@ -14,4 +14,5 @@ image: service: consolePort: 32325 nodePort: 32324 +minioDomain: null updateStrategy: RollingUpdate diff --git a/charts/minio/1.3.10/values.yaml b/charts/minio/1.3.11/values.yaml similarity index 100% rename from charts/minio/1.3.10/values.yaml rename to charts/minio/1.3.11/values.yaml diff --git a/test/minio/1.3.11/templates/deployment.yaml b/test/minio/1.3.11/templates/deployment.yaml index a18a71893c..d3f1a16a14 100644 --- a/test/minio/1.3.11/templates/deployment.yaml +++ b/test/minio/1.3.11/templates/deployment.yaml @@ -42,7 +42,7 @@ spec: env: {{ $secretName := (include "minio.secretName" .) }} {{ $envList := (default list .Values.environmentVariables) }} - {{ if .Values.minioDomain }} + {{ if and (eq (include "minio.certAvailable" .) "true") .Values.minioDomain }} {{ $envList = mustAppend $envList (dict "name" "MINIO_BROWSER_REDIRECT_URL" "value" (printf "%s://%s:%d" (include "minio.scheme" .) .Values.minioDomain (.Values.service.consolePort | int))) }} {{ $envList = mustAppend $envList (dict "name" "MINIO_SERVER_URL" "value" (printf "%s://%s:%d" (include "minio.scheme" .) .Values.minioDomain (.Values.service.nodePort | int))) }} {{ end }}