diff --git a/stable/minio/Chart.yaml b/stable/minio/Chart.yaml index 638981f5d7..d3bec7a4bd 100755 --- a/stable/minio/Chart.yaml +++ b/stable/minio/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Minio is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. name: minio -version: 2.3.5 +version: 2.3.6 appVersion: RELEASE.2019-01-10T00-21-20Z keywords: - storage diff --git a/stable/minio/README.md b/stable/minio/README.md index c9e7391134..ebac83bf5c 100755 --- a/stable/minio/README.md +++ b/stable/minio/README.md @@ -108,6 +108,7 @@ The following table lists the configurable parameters of the Minio chart and the | `accessKey` | Default access key (5 to 20 characters) | `AKIAIOSFODNN7EXAMPLE` | | `secretKey` | Default secret key (8 to 40 characters) | `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` | | `configPath` | Default config file location | `~/.minio` | +| `configPathmc` | Default config file location for minio client - mc | `~/.mc` | | `mountPath` | Default mount location for persistent drive| `/export` | | `clusterDomain` | domain name of kubernetes cluster where pod is running.| `cluster.local` | | `service.type` | Kubernetes service type | `ClusterIP` | @@ -307,3 +308,18 @@ $ helm install --set environment.MINIO_BROWSER=on,environment.MINIO_DOMAIN=domai ``` You can add as many environment variables as required, using the above format. Just add `environment.=` under `set` flag. + +Create buckets after install +--------------------------- + +Install the chart, specifying the buckets you want to create after install: + +```bash +$ helm install --set buckets[0].name=bucket1,buckets[0].policy=none,buckets[0].purge=false stable/minio +``` + +Description of the configuration parameters used above - +1. `buckets[].name` - name of the bucket to create, must be a string with length > 0 +2. `buckets[].policy` - Can be one of none|download|upload|public +3. `buckets[].purge` - Purge if bucket exists already + diff --git a/stable/minio/templates/_helper_create_bucket.txt b/stable/minio/templates/_helper_create_bucket.txt index 016166c0c0..955287932d 100755 --- a/stable/minio/templates/_helper_create_bucket.txt +++ b/stable/minio/templates/_helper_create_bucket.txt @@ -4,12 +4,13 @@ set -e ; # Have script exit in the event of a failed command. # connectToMinio # Use a check-sleep-check loop to wait for Minio service to be available connectToMinio() { + SCHEME=$1 ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts set -e ; # fail if we can't read the keys. ACCESS=$(cat /config/accesskey) ; SECRET=$(cat /config/secretkey) ; set +e ; # The connections to minio are allowed to fail. - echo "Connecting to Minio server: http://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="mc config host add myminio http://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + echo "Connecting to Minio server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="mc config host add myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; $MC_COMMAND ; STATUS=$? ; until [ $STATUS = 0 ] @@ -70,7 +71,12 @@ createBucket() { } # Try connecting to Minio instance -connectToMinio +{{- if .Values.tls.enabled }} +scheme=https +{{- else }} +scheme=http +{{- end }} +connectToMinio $scheme {{- if or .Values.defaultBucket.enabled }} # Create the bucket diff --git a/stable/minio/templates/post-install-create-bucket-job.yaml b/stable/minio/templates/post-install-create-bucket-job.yaml index feb03c98ae..4801a12ef6 100755 --- a/stable/minio/templates/post-install-create-bucket-job.yaml +++ b/stable/minio/templates/post-install-create-bucket-job.yaml @@ -31,6 +31,14 @@ spec: name: {{ template "minio.fullname" . }} - secret: name: {{ template "minio.fullname" . }} + {{- if .Values.tls.enabled }} + - name: cert-secret-volume-mc + secret: + secretName: {{ .Values.tls.certSecret }} + items: + - key: {{ .Values.tls.publicCrt }} + path: CAs/public.crt + {{ end }} containers: - name: minio-mc image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}" @@ -44,4 +52,8 @@ spec: volumeMounts: - name: minio-configuration mountPath: /config + {{- if .Values.tls.enabled }} + - name: cert-secret-volume-mc + mountPath: {{ .Values.configPathmc }}certs + {{ end }} {{- end }} diff --git a/stable/minio/values.yaml b/stable/minio/values.yaml index 4807cb1805..4c6e8b08bd 100755 --- a/stable/minio/values.yaml +++ b/stable/minio/values.yaml @@ -45,6 +45,7 @@ existingSecret: "" accessKey: "AKIAIOSFODNN7EXAMPLE" secretKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" configPath: "/root/.minio/" +configPathmc: "/root/.mc/" mountPath: "/export" replicas: 4