From 4a082ea37636c0aea2a5beeaf5cddcf82ec8fda1 Mon Sep 17 00:00:00 2001 From: Qiu Yuzhou Date: Fri, 25 Jan 2019 14:49:23 +0800 Subject: [PATCH] [stable/minio] Support use minio as a Alibaba Cloud oss gateway. (#10632) * [stable/minio] Support use minio as a Alibaba Cloud oss gateway. Signed-off-by: Qiu Yuzhou * [stable/minio] Bump version to 2.4.0 Signed-off-by: Qiu Yuzhou * [stable/minio] Fixes typo in README. Signed-off-by: Charlie Qiu --- stable/minio/Chart.yaml | 2 +- stable/minio/README.md | 3 +++ stable/minio/templates/deployment.yaml | 10 ++++++++++ stable/minio/values.yaml | 6 ++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/stable/minio/Chart.yaml b/stable/minio/Chart.yaml index d3bec7a4bd..309f6c92fb 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.6 +version: 2.4.0 appVersion: RELEASE.2019-01-10T00-21-20Z keywords: - storage diff --git a/stable/minio/README.md b/stable/minio/README.md index ebac83bf5c..e1b18bdeee 100755 --- a/stable/minio/README.md +++ b/stable/minio/README.md @@ -149,6 +149,9 @@ The following table lists the configurable parameters of the Minio chart and the | `gcsgateway.enabled` | Use minio as a [Google Cloud Storage gateway](https://docs.minio.io/docs/minio-gateway-for-gcs)| `false` | | `gcsgateway.gcsKeyJson` | credential json file of service account key | `""` | | `gcsgateway.projectId` | Google cloud project id | `""` | +| `ossgateway.enabled` | Use minio as an [Alibaba Cloud Object Storage Service gateway](https://github.com/minio/minio/blob/master/docs/gateway/oss.md)| `false` | +| `ossgateway.replicas` | Number of oss gateway instances to run in parallel | `4` | +| `ossgateway.endpointURL` | OSS server endpoint. | `""` | | `nasgateway.enabled` | Use minio as a [NAS gateway](https://docs.minio.io/docs/minio-gateway-for-nas) | `false` | | `nasgateway.replicas` | Number of NAS gateway instances to be run in parallel on a PV | `4` | | `environment` | Set Minio server relevant environment variables in `values.yaml` file. Minio containers will be passed these variables when they start. | `MINIO_BROWSER: "on"` | diff --git a/stable/minio/templates/deployment.yaml b/stable/minio/templates/deployment.yaml index 27e3bf86a2..d5214b2baf 100644 --- a/stable/minio/templates/deployment.yaml +++ b/stable/minio/templates/deployment.yaml @@ -26,6 +26,9 @@ spec: {{- if .Values.gcsgateway.enabled }} replicas: {{ .Values.gcsgateway.replicas }} {{- end }} + {{- if .Values.ossgateway.enabled }} + replicas: {{ .Values.ossgateway.replicas }} + {{- end }} selector: matchLabels: app: {{ template "minio.name" . }} @@ -62,6 +65,12 @@ spec: "cp /tmp/config.json {{ .Values.configPath }} && /usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} gateway gcs {{ .Values.gcsgateway.projectId }}" ] {{- else }} + {{- if .Values.ossgateway.enabled }} + command: [ "/bin/sh", + "-ce", + "cp /tmp/config.json {{ .Values.configPath }} && + /usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} gateway oss {{ .Values.ossgateway.endpointURL }}" ] + {{- else }} {{- if .Values.nasgateway.enabled }} command: [ "/bin/sh", "-ce", @@ -76,6 +85,7 @@ spec: {{- end }} {{- end }} {{- end }} + {{- end }} volumeMounts: {{- if and .Values.persistence.enabled ((not .Values.gcsgateway.enabled) (not .Values.azuregateway.enabled) (not .Values.s3gateway.enabled)) }} - name: export diff --git a/stable/minio/values.yaml b/stable/minio/values.yaml index 4c6e8b08bd..8c8405b31f 100755 --- a/stable/minio/values.yaml +++ b/stable/minio/values.yaml @@ -191,6 +191,12 @@ gcsgateway: # Google cloud project-id projectId: "" +ossgateway: + enabled: false + # Number of parallel instances + replicas: 4 + endpointURL: "" + ## Use minio on NAS backend ## https://docs.minio.io/docs/minio-gateway-for-nas