diff --git a/charts/athens-proxy/Chart.yaml b/charts/athens-proxy/Chart.yaml index 5568ae3b..3ae0a09d 100644 --- a/charts/athens-proxy/Chart.yaml +++ b/charts/athens-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: athens-proxy -version: 0.2.12 +version: 0.2.13 appVersion: 0.4.0 description: The proxy server for Go modules icon: https://raw.githubusercontent.com/gomods/athens/master/docs/static/banner.png diff --git a/charts/athens-proxy/templates/deployment.yaml b/charts/athens-proxy/templates/deployment.yaml index 66ec5f07..587b2657 100644 --- a/charts/athens-proxy/templates/deployment.yaml +++ b/charts/athens-proxy/templates/deployment.yaml @@ -101,6 +101,23 @@ spec: - name: AWS_SESSION_TOKEN value: {{ .Values.storage.s3.session_token | quote }} {{- end }} + {{- else if eq .Values.storage.type "minio" }} + {{- if .Values.storage.minio.endpoint }} + - name: ATHENS_MINIO_ENDPOINT + value: {{ .Values.storage.minio.endpoint | quote }} + {{- end }} + {{- if .Values.storage.minio.accessKey }} + - name: ATHENS_MINIO_ACCESS_KEY_ID + value: {{ .Values.storage.minio.accessKey | quote }} + {{- end }} + {{- if .Values.storage.minio.secretKey }} + - name: ATHENS_MINIO_SECRET_ACCESS_KEY + value: {{ .Values.storage.minio.secretKey | quote }} + {{- end }} + {{- if .Values.storage.minio.bucket }} + - name: ATHENS_MINIO_BUCKET_NAME + value: {{ .Values.storage.minio.bucket | quote }} + {{- end }} {{- end }} {{- if .Values.netrc.enabled }} - name: ATHENS_NETRC_PATH diff --git a/charts/athens-proxy/values.yaml b/charts/athens-proxy/values.yaml index 119db81d..835a26d7 100644 --- a/charts/athens-proxy/values.yaml +++ b/charts/athens-proxy/values.yaml @@ -49,6 +49,12 @@ storage: region: "" bucket: "" useDefaultConfiguration: true + minio: + # All these variables needs to be set when configuring athens to run with minio backend + endpoint: "" + accessKey: "" + secretKey: "" + bucket: "" # Extra environment variables to be passed # You can add any new ones at the bottom diff --git a/docs/content/install/install-on-kubernetes.md b/docs/content/install/install-on-kubernetes.md index b825b9dd..2f487526 100644 --- a/docs/content/install/install-on-kubernetes.md +++ b/docs/content/install/install-on-kubernetes.md @@ -152,6 +152,17 @@ variables, shared credentials files, and EC2 instance credentials. To manually s helm install gomods/athens-proxy -n athens --namespace athens --set storage.type=s3 --set storage.s3.region= --set storage.s3.bucket= ``` +#### Minio Configuration + +To use S3 storage with Athens, set `storage.type` to `minio`. You need to set `storage.minio.endpoint` as the URL of your minio-installation. +This URL can also be an kubernetes-internal one (e.g. something like `minio-service.default.svc`). +You need to create a bucket inside your minio-installation or use an existing one. The bucket needs to be referenced in `storage.minio.bucket`. +Last athens need authentication credentials for your minio in `storage.minio.accessKey` and `storage.minio.secretKey`. + +``` +helm install gomods/athens-proxy -n athens --namespace athens --set storage.type=minio --set storage.minio.endpoint= --set storage.minio.bucket= --set storage.minio.accessKey= --set storage.minio.secretKey= +``` + ### Kubernetes Service By default, a Kubernetes `ClusterIP` service is created for the Athens proxy. "ClusterIP" is sufficient in the case when the Athens proxy will be used from within the cluster. To expose Athens outside of the cluster, consider using a "NodePort" or "LoadBalancer" service. This can be changed by setting the `service.type` value when installing the chart. For example, to deploy Athens using a NodePort service, the following command could be used: