Quellcode durchsuchen

Merge pull request #114 from truenas/minio-tls-settings

NAS-111770 / 21.08 / Adapt Minio app to conform to upstream configuration for TLS
Waqar Ahmed vor 4 Jahren
Ursprung
Commit
e43c465b96
42 geänderte Dateien mit 68 neuen und 22 gelöschten Zeilen
  1. 0 10
      charts/minio/1.3.10/templates/configmap.yaml
  2. 0 0
      charts/minio/1.3.11/.helmignore
  3. 1 1
      charts/minio/1.3.11/Chart.yaml
  4. 0 0
      charts/minio/1.3.11/README.md
  5. 0 0
      charts/minio/1.3.11/app-readme.md
  6. 0 0
      charts/minio/1.3.11/charts/common-2105.0.0.tgz
  7. 0 0
      charts/minio/1.3.11/default_values.yaml
  8. 0 0
      charts/minio/1.3.11/ix_values.yaml
  9. 0 0
      charts/minio/1.3.11/migrations/migrate_from_1.0.0
  10. 10 0
      charts/minio/1.3.11/questions.yaml
  11. 0 0
      charts/minio/1.3.11/requirements.lock
  12. 0 0
      charts/minio/1.3.11/templates/NOTES.txt
  13. 0 0
      charts/minio/1.3.11/templates/_cert.tpl
  14. 12 0
      charts/minio/1.3.11/templates/_helpers.tpl
  15. 6 0
      charts/minio/1.3.11/templates/configmap.yaml
  16. 4 0
      charts/minio/1.3.11/templates/deployment.yaml
  17. 0 0
      charts/minio/1.3.11/templates/secrets.yaml
  18. 0 0
      charts/minio/1.3.11/templates/service.yaml
  19. 0 0
      charts/minio/1.3.11/templates/serviceaccount.yaml
  20. 1 0
      charts/minio/1.3.11/test_values.yaml
  21. 0 0
      charts/minio/1.3.11/values.yaml
  22. 0 10
      test/minio/1.3.10/templates/configmap.yaml
  23. 0 0
      test/minio/1.3.11/.helmignore
  24. 1 1
      test/minio/1.3.11/Chart.yaml
  25. 0 0
      test/minio/1.3.11/README.md
  26. 0 0
      test/minio/1.3.11/app-readme.md
  27. 0 0
      test/minio/1.3.11/charts/common-2105.0.0.tgz
  28. 0 0
      test/minio/1.3.11/default_values.yaml
  29. 0 0
      test/minio/1.3.11/ix_values.yaml
  30. 0 0
      test/minio/1.3.11/migrations/migrate_from_1.0.0
  31. 10 0
      test/minio/1.3.11/questions.yaml
  32. 0 0
      test/minio/1.3.11/requirements.lock
  33. 0 0
      test/minio/1.3.11/templates/NOTES.txt
  34. 0 0
      test/minio/1.3.11/templates/_cert.tpl
  35. 12 0
      test/minio/1.3.11/templates/_helpers.tpl
  36. 6 0
      test/minio/1.3.11/templates/configmap.yaml
  37. 4 0
      test/minio/1.3.11/templates/deployment.yaml
  38. 0 0
      test/minio/1.3.11/templates/secrets.yaml
  39. 0 0
      test/minio/1.3.11/templates/service.yaml
  40. 0 0
      test/minio/1.3.11/templates/serviceaccount.yaml
  41. 1 0
      test/minio/1.3.11/test_values.yaml
  42. 0 0
      test/minio/1.3.11/values.yaml

+ 0 - 10
charts/minio/1.3.10/templates/configmap.yaml

@@ -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 }}

+ 0 - 0
charts/minio/1.3.10/.helmignore → charts/minio/1.3.11/.helmignore


+ 1 - 1
charts/minio/1.3.10/Chart.yaml → 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

+ 0 - 0
charts/minio/1.3.10/README.md → charts/minio/1.3.11/README.md


+ 0 - 0
charts/minio/1.3.10/app-readme.md → charts/minio/1.3.11/app-readme.md


+ 0 - 0
charts/minio/1.3.10/charts/common-2105.0.0.tgz → charts/minio/1.3.11/charts/common-2105.0.0.tgz


+ 0 - 0
charts/minio/1.3.10/default_values.yaml → charts/minio/1.3.11/default_values.yaml


+ 0 - 0
charts/minio/1.3.10/ix_values.yaml → charts/minio/1.3.11/ix_values.yaml


+ 0 - 0
charts/minio/1.3.10/migrations/migrate_from_1.0.0 → charts/minio/1.3.11/migrations/migrate_from_1.0.0


+ 10 - 0
test/minio/1.3.10/questions.yaml → 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"

+ 0 - 0
charts/minio/1.3.10/requirements.lock → charts/minio/1.3.11/requirements.lock


+ 0 - 0
charts/minio/1.3.10/templates/NOTES.txt → charts/minio/1.3.11/templates/NOTES.txt


+ 0 - 0
charts/minio/1.3.10/templates/_cert.tpl → charts/minio/1.3.11/templates/_cert.tpl


+ 12 - 0
test/minio/1.3.10/templates/_helpers.tpl → 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 -}}

+ 6 - 0
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" . }}

+ 4 - 0
charts/minio/1.3.10/templates/deployment.yaml → 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 }}

+ 0 - 0
charts/minio/1.3.10/templates/secrets.yaml → charts/minio/1.3.11/templates/secrets.yaml


+ 0 - 0
charts/minio/1.3.10/templates/service.yaml → charts/minio/1.3.11/templates/service.yaml


+ 0 - 0
charts/minio/1.3.10/templates/serviceaccount.yaml → charts/minio/1.3.11/templates/serviceaccount.yaml


+ 1 - 0
charts/minio/1.3.10/test_values.yaml → charts/minio/1.3.11/test_values.yaml

@@ -14,4 +14,5 @@ image:
 service:
   consolePort: 32325
   nodePort: 32324
+minioDomain: null
 updateStrategy: RollingUpdate

+ 0 - 0
charts/minio/1.3.10/values.yaml → charts/minio/1.3.11/values.yaml


+ 0 - 10
test/minio/1.3.10/templates/configmap.yaml

@@ -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 }}

+ 0 - 0
test/minio/1.3.10/.helmignore → test/minio/1.3.11/.helmignore


+ 1 - 1
test/minio/1.3.10/Chart.yaml → 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

+ 0 - 0
test/minio/1.3.10/README.md → test/minio/1.3.11/README.md


+ 0 - 0
test/minio/1.3.10/app-readme.md → test/minio/1.3.11/app-readme.md


+ 0 - 0
test/minio/1.3.10/charts/common-2105.0.0.tgz → test/minio/1.3.11/charts/common-2105.0.0.tgz


+ 0 - 0
test/minio/1.3.10/default_values.yaml → test/minio/1.3.11/default_values.yaml


+ 0 - 0
test/minio/1.3.10/ix_values.yaml → test/minio/1.3.11/ix_values.yaml


+ 0 - 0
test/minio/1.3.10/migrations/migrate_from_1.0.0 → test/minio/1.3.11/migrations/migrate_from_1.0.0


+ 10 - 0
charts/minio/1.3.10/questions.yaml → 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"

+ 0 - 0
test/minio/1.3.10/requirements.lock → test/minio/1.3.11/requirements.lock


+ 0 - 0
test/minio/1.3.10/templates/NOTES.txt → test/minio/1.3.11/templates/NOTES.txt


+ 0 - 0
test/minio/1.3.10/templates/_cert.tpl → test/minio/1.3.11/templates/_cert.tpl


+ 12 - 0
charts/minio/1.3.10/templates/_helpers.tpl → 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 -}}

+ 6 - 0
test/minio/1.3.11/templates/configmap.yaml

@@ -0,0 +1,6 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: minio-config
+data:
+  protocol: {{ include "minio.scheme" . }}

+ 4 - 0
test/minio/1.3.10/templates/deployment.yaml → test/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 }}

+ 0 - 0
test/minio/1.3.10/templates/secrets.yaml → test/minio/1.3.11/templates/secrets.yaml


+ 0 - 0
test/minio/1.3.10/templates/service.yaml → test/minio/1.3.11/templates/service.yaml


+ 0 - 0
test/minio/1.3.10/templates/serviceaccount.yaml → test/minio/1.3.11/templates/serviceaccount.yaml


+ 1 - 0
test/minio/1.3.10/test_values.yaml → test/minio/1.3.11/test_values.yaml

@@ -14,4 +14,5 @@ image:
 service:
   consolePort: 32325
   nodePort: 32324
+minioDomain: null
 updateStrategy: RollingUpdate

+ 0 - 0
test/minio/1.3.10/values.yaml → test/minio/1.3.11/values.yaml