Browse Source

Merge pull request #193 from truenas/NAS-112865

NAS-112865 / 22.02-RC.2 / Allow connecting minio instance to a minio cluster
Waqar Ahmed 3 năm trước cách đây
mục cha
commit
2e91ae01bc
40 tập tin đã thay đổi với 190 bổ sung12 xóa
  1. 0 0
      charts/minio/1.4.0/.helmignore
  2. 1 1
      charts/minio/1.4.0/Chart.yaml
  3. 0 0
      charts/minio/1.4.0/README.md
  4. 0 0
      charts/minio/1.4.0/app-readme.md
  5. 0 0
      charts/minio/1.4.0/charts/common-2105.0.0.tgz
  6. 0 0
      charts/minio/1.4.0/default_values.yaml
  7. 0 0
      charts/minio/1.4.0/ix_values.yaml
  8. 0 0
      charts/minio/1.4.0/migrations/migrate_from_1.0.0
  9. 51 2
      charts/minio/1.4.0/questions.yaml
  10. 0 0
      charts/minio/1.4.0/requirements.lock
  11. 0 0
      charts/minio/1.4.0/templates/NOTES.txt
  12. 0 0
      charts/minio/1.4.0/templates/_cert.tpl
  13. 25 0
      charts/minio/1.4.0/templates/_helpers.tpl
  14. 0 0
      charts/minio/1.4.0/templates/configmap.yaml
  15. 15 3
      charts/minio/1.4.0/templates/deployment.yaml
  16. 0 0
      charts/minio/1.4.0/templates/secrets.yaml
  17. 0 0
      charts/minio/1.4.0/templates/service.yaml
  18. 0 0
      charts/minio/1.4.0/templates/serviceaccount.yaml
  19. 3 0
      charts/minio/1.4.0/test_values.yaml
  20. 0 0
      charts/minio/1.4.0/values.yaml
  21. 0 0
      test/minio/1.4.0/.helmignore
  22. 1 1
      test/minio/1.4.0/Chart.yaml
  23. 0 0
      test/minio/1.4.0/README.md
  24. 0 0
      test/minio/1.4.0/app-readme.md
  25. 0 0
      test/minio/1.4.0/charts/common-2105.0.0.tgz
  26. 0 0
      test/minio/1.4.0/default_values.yaml
  27. 0 0
      test/minio/1.4.0/ix_values.yaml
  28. 0 0
      test/minio/1.4.0/migrations/migrate_from_1.0.0
  29. 51 2
      test/minio/1.4.0/questions.yaml
  30. 0 0
      test/minio/1.4.0/requirements.lock
  31. 0 0
      test/minio/1.4.0/templates/NOTES.txt
  32. 0 0
      test/minio/1.4.0/templates/_cert.tpl
  33. 25 0
      test/minio/1.4.0/templates/_helpers.tpl
  34. 0 0
      test/minio/1.4.0/templates/configmap.yaml
  35. 15 3
      test/minio/1.4.0/templates/deployment.yaml
  36. 0 0
      test/minio/1.4.0/templates/secrets.yaml
  37. 0 0
      test/minio/1.4.0/templates/service.yaml
  38. 0 0
      test/minio/1.4.0/templates/serviceaccount.yaml
  39. 3 0
      test/minio/1.4.0/test_values.yaml
  40. 0 0
      test/minio/1.4.0/values.yaml

+ 0 - 0
charts/minio/1.3.22/.helmignore → charts/minio/1.4.0/.helmignore


+ 1 - 1
charts/minio/1.3.22/Chart.yaml → charts/minio/1.4.0/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.22
+version: 1.4.0

+ 0 - 0
charts/minio/1.3.22/README.md → charts/minio/1.4.0/README.md


+ 0 - 0
charts/minio/1.3.22/app-readme.md → charts/minio/1.4.0/app-readme.md


+ 0 - 0
charts/minio/1.3.22/charts/common-2105.0.0.tgz → charts/minio/1.4.0/charts/common-2105.0.0.tgz


+ 0 - 0
charts/minio/1.3.22/default_values.yaml → charts/minio/1.4.0/default_values.yaml


+ 0 - 0
charts/minio/1.3.22/ix_values.yaml → charts/minio/1.4.0/ix_values.yaml


+ 0 - 0
charts/minio/1.3.22/migrations/migrate_from_1.0.0 → charts/minio/1.4.0/migrations/migrate_from_1.0.0


+ 51 - 2
test/minio/1.3.22/questions.yaml → charts/minio/1.4.0/questions.yaml

@@ -3,10 +3,10 @@ groups:
     description: "Image to be used for container"
   - name: "Workload Configuration"
     description: "Configure workload deployment"
-  - name: "Storage"
-    description: "Configure Storage for Nextcloud"
   - name: "Minio Configuration"
     description: "Configure Minio credentials"
+  - name: "Storage"
+    description: "Configure Storage for Nextcloud"
   - name: "Advanced DNS Settings"
     description: "Configure DNS settings"
 
@@ -60,6 +60,29 @@ questions:
         - value: "Recreate"
           description: "Kill existing pods before creating new ones"
 
+  - variable: distributedMode
+    label: "Enable Distributed Mode"
+    description: "Run Minio instance to connect to a distributed minio cluster"
+    group: "Minio Configuration"
+    schema:
+      type: boolean
+      default: false
+      show_subquestions_if: true
+      subquestions:
+        - variable: distributedIps
+          label: "Distributed Minio Instance URI(s)"
+          schema:
+            type: list
+            required: true
+            default: []
+            items:
+              - variable: ip
+                label: "Distributed Minio Instance URI"
+                schema:
+                  type: string
+                  empty: false
+
+
   - variable: extraArgs
     label: "Minio Extra Arguments"
     group: "Minio Configuration"
@@ -164,6 +187,7 @@ questions:
     group: "Storage"
     schema:
       type: dict
+      show_if: [["distributedMode", "=", false]]
       attrs:
         - variable: export
           label: "Data Volume"
@@ -200,3 +224,28 @@ questions:
                       schema:
                         type: hostpath
                         required: true
+
+  - variable: extraAppVolumeMounts
+    label: "Extra Host Path Volumes"
+    group: "Storage"
+    schema:
+      type: list
+      items:
+        - variable: extraAppVolume
+          label: "Host Path Volume"
+          description: "Add an extra host path volume for Minio application"
+          schema:
+            type: dict
+            attrs:
+              - variable: mountPath
+                label: "Mount Path in Pod"
+                description: "Path where the volume will be mounted inside the pod"
+                schema:
+                  type: path
+                  required: true
+              - variable: hostPath
+                label: "Host Path"
+                description: "Host path"
+                schema:
+                  type: hostpath
+                  required: true

+ 0 - 0
charts/minio/1.3.22/requirements.lock → charts/minio/1.4.0/requirements.lock


+ 0 - 0
charts/minio/1.3.22/templates/NOTES.txt → charts/minio/1.4.0/templates/NOTES.txt


+ 0 - 0
charts/minio/1.3.22/templates/_cert.tpl → charts/minio/1.4.0/templates/_cert.tpl


+ 25 - 0
test/minio/1.3.22/templates/_helpers.tpl → charts/minio/1.4.0/templates/_helpers.tpl

@@ -50,3 +50,28 @@ Retrieve scheme/protocol for minio
 {{- print "http" -}}
 {{- end -}}
 {{- end -}}
+
+
+{{/*
+Retrieve command for minio application
+*/}}
+{{- define "minio.commandArgs" -}}
+{{- $arg := "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs server --console-address=':9001'" -}}
+{{- if .Values.distributedMode -}}
+{{- cat $arg (join " " (concat (.Values.distributedIps | default list) (.Values.extraArgs | default list))) -}}
+{{- else -}}
+{{- cat $arg ((concat (list "/export") (.Values.extraArgs | default list)) | join " ") -}}
+{{- end -}}
+{{- end -}}
+
+
+{{/*
+Enable host networking
+*/}}
+{{- define "minio.hostNetworking" -}}
+{{- if .Values.distributedMode -}}
+{{- print "true" -}}
+{{- else -}}
+{{- print "false" -}}
+{{- end -}}
+{{- end -}}

+ 0 - 0
charts/minio/1.3.22/templates/configmap.yaml → charts/minio/1.4.0/templates/configmap.yaml


+ 15 - 3
test/minio/1.3.22/templates/deployment.yaml → charts/minio/1.4.0/templates/deployment.yaml

@@ -7,6 +7,8 @@ metadata:
     chart: {{ template "common.names.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+  annotations:
+    rollme: {{ randAlphaNum 5 | quote }}
 spec:
   replicas: {{ (default 1 .Values.replicas) }}
   strategy:
@@ -25,15 +27,20 @@ spec:
       annotations: {{ include "common.annotations" . | nindent 8 }}
     spec:
       serviceAccountName: {{ include "common.names.serviceAccountName" . | quote }}
+      hostNetwork: {{ include "minio.hostNetworking" . }}
       containers:
         - name: {{ .Chart.Name }}
           {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
           volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
           {{- include "minio.tlsKeysVolumeMount" . | nindent 12 }}
+          {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
+            - name: extrappvolume-{{ $index }}
+              mountPath: {{ $hostPathConfiguration.mountPath }}
+          {{ end }}
           command:
             - "/bin/sh"
             - "-ce"
-            - "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs server /export --console-address=':9001' {{ (.Values.extraArgs | default list) | join " " }}"
+            - {{ include "minio.commandArgs" . }}
           ports:
             - name: api
               containerPort: 9000
@@ -50,5 +57,10 @@ spec:
             {{ $envList = mustAppend $envList (dict "name" "MINIO_ROOT_PASSWORD" "valueFromSecret" true "secretName" $secretName "secretKey" "secretkey") }}
             {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
 {{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
-{{ include "common.storage.allAppVolumes" .Values | nindent 6 }}
-{{- include "minio.tlsKeysVolume" . | nindent 8 }}
+      volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
+      {{- include "minio.tlsKeysVolume" . | nindent 8 }}
+      {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
+        - name: extrappvolume-{{ $index }}
+          hostPath:
+            path: {{ $hostPathConfiguration.hostPath }}
+    {{ end }}

+ 0 - 0
charts/minio/1.3.22/templates/secrets.yaml → charts/minio/1.4.0/templates/secrets.yaml


+ 0 - 0
charts/minio/1.3.22/templates/service.yaml → charts/minio/1.4.0/templates/service.yaml


+ 0 - 0
charts/minio/1.3.22/templates/serviceaccount.yaml → charts/minio/1.4.0/templates/serviceaccount.yaml


+ 3 - 0
charts/minio/1.3.22/test_values.yaml → charts/minio/1.4.0/test_values.yaml

@@ -16,3 +16,6 @@ service:
   consolePort: 32325
   nodePort: 32324
 updateStrategy: RollingUpdate
+distributedMode: false
+distributedIps: []
+extraAppVolumeMounts: []

+ 0 - 0
charts/minio/1.3.22/values.yaml → charts/minio/1.4.0/values.yaml


+ 0 - 0
test/minio/1.3.22/.helmignore → test/minio/1.4.0/.helmignore


+ 1 - 1
test/minio/1.3.22/Chart.yaml → test/minio/1.4.0/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.22
+version: 1.4.0

+ 0 - 0
test/minio/1.3.22/README.md → test/minio/1.4.0/README.md


+ 0 - 0
test/minio/1.3.22/app-readme.md → test/minio/1.4.0/app-readme.md


+ 0 - 0
test/minio/1.3.22/charts/common-2105.0.0.tgz → test/minio/1.4.0/charts/common-2105.0.0.tgz


+ 0 - 0
test/minio/1.3.22/default_values.yaml → test/minio/1.4.0/default_values.yaml


+ 0 - 0
test/minio/1.3.22/ix_values.yaml → test/minio/1.4.0/ix_values.yaml


+ 0 - 0
test/minio/1.3.22/migrations/migrate_from_1.0.0 → test/minio/1.4.0/migrations/migrate_from_1.0.0


+ 51 - 2
charts/minio/1.3.22/questions.yaml → test/minio/1.4.0/questions.yaml

@@ -3,10 +3,10 @@ groups:
     description: "Image to be used for container"
   - name: "Workload Configuration"
     description: "Configure workload deployment"
-  - name: "Storage"
-    description: "Configure Storage for Nextcloud"
   - name: "Minio Configuration"
     description: "Configure Minio credentials"
+  - name: "Storage"
+    description: "Configure Storage for Nextcloud"
   - name: "Advanced DNS Settings"
     description: "Configure DNS settings"
 
@@ -60,6 +60,29 @@ questions:
         - value: "Recreate"
           description: "Kill existing pods before creating new ones"
 
+  - variable: distributedMode
+    label: "Enable Distributed Mode"
+    description: "Run Minio instance to connect to a distributed minio cluster"
+    group: "Minio Configuration"
+    schema:
+      type: boolean
+      default: false
+      show_subquestions_if: true
+      subquestions:
+        - variable: distributedIps
+          label: "Distributed Minio Instance URI(s)"
+          schema:
+            type: list
+            required: true
+            default: []
+            items:
+              - variable: ip
+                label: "Distributed Minio Instance URI"
+                schema:
+                  type: string
+                  empty: false
+
+
   - variable: extraArgs
     label: "Minio Extra Arguments"
     group: "Minio Configuration"
@@ -164,6 +187,7 @@ questions:
     group: "Storage"
     schema:
       type: dict
+      show_if: [["distributedMode", "=", false]]
       attrs:
         - variable: export
           label: "Data Volume"
@@ -200,3 +224,28 @@ questions:
                       schema:
                         type: hostpath
                         required: true
+
+  - variable: extraAppVolumeMounts
+    label: "Extra Host Path Volumes"
+    group: "Storage"
+    schema:
+      type: list
+      items:
+        - variable: extraAppVolume
+          label: "Host Path Volume"
+          description: "Add an extra host path volume for Minio application"
+          schema:
+            type: dict
+            attrs:
+              - variable: mountPath
+                label: "Mount Path in Pod"
+                description: "Path where the volume will be mounted inside the pod"
+                schema:
+                  type: path
+                  required: true
+              - variable: hostPath
+                label: "Host Path"
+                description: "Host path"
+                schema:
+                  type: hostpath
+                  required: true

+ 0 - 0
test/minio/1.3.22/requirements.lock → test/minio/1.4.0/requirements.lock


+ 0 - 0
test/minio/1.3.22/templates/NOTES.txt → test/minio/1.4.0/templates/NOTES.txt


+ 0 - 0
test/minio/1.3.22/templates/_cert.tpl → test/minio/1.4.0/templates/_cert.tpl


+ 25 - 0
charts/minio/1.3.22/templates/_helpers.tpl → test/minio/1.4.0/templates/_helpers.tpl

@@ -50,3 +50,28 @@ Retrieve scheme/protocol for minio
 {{- print "http" -}}
 {{- end -}}
 {{- end -}}
+
+
+{{/*
+Retrieve command for minio application
+*/}}
+{{- define "minio.commandArgs" -}}
+{{- $arg := "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs server --console-address=':9001'" -}}
+{{- if .Values.distributedMode -}}
+{{- cat $arg (join " " (concat (.Values.distributedIps | default list) (.Values.extraArgs | default list))) -}}
+{{- else -}}
+{{- cat $arg ((concat (list "/export") (.Values.extraArgs | default list)) | join " ") -}}
+{{- end -}}
+{{- end -}}
+
+
+{{/*
+Enable host networking
+*/}}
+{{- define "minio.hostNetworking" -}}
+{{- if .Values.distributedMode -}}
+{{- print "true" -}}
+{{- else -}}
+{{- print "false" -}}
+{{- end -}}
+{{- end -}}

+ 0 - 0
test/minio/1.3.22/templates/configmap.yaml → test/minio/1.4.0/templates/configmap.yaml


+ 15 - 3
charts/minio/1.3.22/templates/deployment.yaml → test/minio/1.4.0/templates/deployment.yaml

@@ -7,6 +7,8 @@ metadata:
     chart: {{ template "common.names.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+  annotations:
+    rollme: {{ randAlphaNum 5 | quote }}
 spec:
   replicas: {{ (default 1 .Values.replicas) }}
   strategy:
@@ -25,15 +27,20 @@ spec:
       annotations: {{ include "common.annotations" . | nindent 8 }}
     spec:
       serviceAccountName: {{ include "common.names.serviceAccountName" . | quote }}
+      hostNetwork: {{ include "minio.hostNetworking" . }}
       containers:
         - name: {{ .Chart.Name }}
           {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
           volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
           {{- include "minio.tlsKeysVolumeMount" . | nindent 12 }}
+          {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
+            - name: extrappvolume-{{ $index }}
+              mountPath: {{ $hostPathConfiguration.mountPath }}
+          {{ end }}
           command:
             - "/bin/sh"
             - "-ce"
-            - "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs server /export --console-address=':9001' {{ (.Values.extraArgs | default list) | join " " }}"
+            - {{ include "minio.commandArgs" . }}
           ports:
             - name: api
               containerPort: 9000
@@ -50,5 +57,10 @@ spec:
             {{ $envList = mustAppend $envList (dict "name" "MINIO_ROOT_PASSWORD" "valueFromSecret" true "secretName" $secretName "secretKey" "secretkey") }}
             {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
 {{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
-{{ include "common.storage.allAppVolumes" .Values | nindent 6 }}
-{{- include "minio.tlsKeysVolume" . | nindent 8 }}
+      volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
+      {{- include "minio.tlsKeysVolume" . | nindent 8 }}
+      {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
+        - name: extrappvolume-{{ $index }}
+          hostPath:
+            path: {{ $hostPathConfiguration.hostPath }}
+    {{ end }}

+ 0 - 0
test/minio/1.3.22/templates/secrets.yaml → test/minio/1.4.0/templates/secrets.yaml


+ 0 - 0
test/minio/1.3.22/templates/service.yaml → test/minio/1.4.0/templates/service.yaml


+ 0 - 0
test/minio/1.3.22/templates/serviceaccount.yaml → test/minio/1.4.0/templates/serviceaccount.yaml


+ 3 - 0
test/minio/1.3.22/test_values.yaml → test/minio/1.4.0/test_values.yaml

@@ -16,3 +16,6 @@ service:
   consolePort: 32325
   nodePort: 32324
 updateStrategy: RollingUpdate
+distributedMode: false
+distributedIps: []
+extraAppVolumeMounts: []

+ 0 - 0
test/minio/1.3.22/values.yaml → test/minio/1.4.0/values.yaml