diff --git a/.gitignore b/.gitignore index 7a90c689c..1245448f5 100644 --- a/.gitignore +++ b/.gitignore @@ -90,3 +90,6 @@ ENV/ # Rope project settings .ropeproject *.sqlite + +#Helm Dependency +helm/chart/teresa/charts diff --git a/CHANGELOG.md b/CHANGELOG.md index 404496a5f..3e8382815 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Command 'deploy list' - Command 'team remove-user' +- [helm] minio as dependency ### Changed - Deploys are now performed using the 'deploy create' command diff --git a/helm/README.md b/helm/README.md index ef2b6a515..24b9c677e 100644 --- a/helm/README.md +++ b/helm/README.md @@ -90,6 +90,7 @@ Parameter | Description | Default `build.limits.cpu` | CPU limit used by build POD | `500m` `build.limits.memory` | Memory limit used by build POD | `1024Mi` `debug` | If true, print the stack trace on every panic/recover. | `false` +`useMinio` | If true, use minio instead of s3. | `false` Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/helm/chart/teresa/Chart.yaml b/helm/chart/teresa/Chart.yaml index 4e09f5f60..592c56d66 100644 --- a/helm/chart/teresa/Chart.yaml +++ b/helm/chart/teresa/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 description: A Helm chart to deploy teresa on Kubernetes name: teresa -version: 0.5.0 +version: 0.6.0 sources: - https://github.com/luizalabs/teresa diff --git a/helm/chart/teresa/requirements.lock b/helm/chart/teresa/requirements.lock new file mode 100644 index 000000000..539b7ebd0 --- /dev/null +++ b/helm/chart/teresa/requirements.lock @@ -0,0 +1,9 @@ +dependencies: +- condition: "" + enabled: false + name: minio + repository: https://kubernetes-charts.storage.googleapis.com/ + tags: null + version: 0.1.5 +digest: sha256:3aee42d4db11f4c7c5d9c3d3378ca898589cb217934cfb2c08f38869eac12a35 +generated: 2017-08-29T13:57:14.161449942-03:00 diff --git a/helm/chart/teresa/requirements.yaml b/helm/chart/teresa/requirements.yaml new file mode 100644 index 000000000..a210fd38b --- /dev/null +++ b/helm/chart/teresa/requirements.yaml @@ -0,0 +1,5 @@ +dependencies: +- name: minio + version: "0.1.5" + repository: "https://kubernetes-charts.storage.googleapis.com/" + condition: useMinio diff --git a/helm/chart/teresa/templates/deployment.yaml b/helm/chart/teresa/templates/deployment.yaml index 1ac582d22..3e2fcd88e 100644 --- a/helm/chart/teresa/templates/deployment.yaml +++ b/helm/chart/teresa/templates/deployment.yaml @@ -50,26 +50,43 @@ spec: value: /etc/teresa-keys/teresa.rsa.pub - name: TERESA_STORAGE_TYPE value: {{ .Values.storage.type }} - {{ if .Values.aws.s3.endpoint }} + {{- if .Values.useMinio }} + - name: TERESA_STORAGE_AWS_ENDPOINT + value: {{ template "minio.fullname" . }} + {{- else if .Values.aws.s3.endpoint }} - name: TERESA_STORAGE_AWS_ENDPOINT value: {{ quote .Values.aws.s3.endpoint }} {{- end }} - name: TERESA_STORAGE_AWS_BUCKET + {{- if .Values.useMinio }} + value: {{ .Values.minio.defaultBucket.name }} + {{- else }} value: {{ .Values.aws.s3.bucket }} + {{- end }} - name: TERESA_STORAGE_AWS_S3_FORCE_PATH_STYLE value: {{ quote .Values.aws.s3.force_path_style }} - name: TERESA_STORAGE_AWS_KEY valueFrom: secretKeyRef: + {{- if .Values.useMinio }} + name: {{ template "minio.fullname" . }}-user + key: accesskey + {{- else }} name: {{ template "fullname" . }}-aws key: access_key - - name: TERESA_STORAGE_AWS_REGION - value: {{ .Values.aws.region }} + {{- end }} - name: TERESA_STORAGE_AWS_SECRET valueFrom: secretKeyRef: + {{- if .Values.useMinio }} + name: {{ template "minio.fullname" . }}-user + key: secretkey + {{- else }} name: {{ template "fullname" . }}-aws key: secret_key + {{- end }} + - name: TERESA_STORAGE_AWS_REGION + value: {{ .Values.aws.region }} {{- if .Values.tls.crt }} - name: TERESA_SECRETS_TLS_CERT value: /etc/teresa/server.crt diff --git a/helm/chart/teresa/values.yaml b/helm/chart/teresa/values.yaml index 75449b215..553e241b8 100644 --- a/helm/chart/teresa/values.yaml +++ b/helm/chart/teresa/values.yaml @@ -30,3 +30,10 @@ build: cpu: 500m memory: 1024Mi debug: false +useMinio: false +minio: + serviceType: ClusterIP + bucketDefault: + enabled: true + name: teresa + policy: public