├── README.md ├── mdn ├── charts │ ├── mysql-0.1.0.tgz │ ├── redis-0.4.2.tgz │ ├── worker-0.1.0.tgz │ ├── kuma_api-0.1.0.tgz │ ├── kuma_web-0.1.0.tgz │ ├── memcached-0.4.0.tgz │ ├── kumascript-0.1.0.tgz │ └── elasticsearch-0.1.0.tgz ├── .helmignore ├── values.yaml ├── Chart.yaml ├── requirements.yaml ├── templates │ └── _helpers.tpl └── requirements.lock ├── kuma_api ├── charts │ └── kuma-0.1.0.tgz ├── requirements.yaml ├── values.yaml ├── requirements.lock ├── .helmignore └── Chart.yaml ├── kuma_web ├── charts │ └── kuma-0.1.0.tgz ├── requirements.yaml ├── values.yaml ├── requirements.lock ├── .helmignore └── Chart.yaml ├── worker ├── charts │ └── kuma-0.1.0.tgz ├── requirements.yaml ├── requirements.lock ├── .helmignore ├── values.yaml └── Chart.yaml ├── kuma ├── templates │ ├── _helpers.tpl │ ├── service.yaml │ ├── NOTES.txt │ └── deployment.yaml ├── .helmignore ├── Chart.yaml └── values.yaml ├── mysql ├── templates │ ├── _helpers.tpl │ ├── svc.yaml │ ├── secrets.yaml │ ├── NOTES.txt │ ├── pvc.yaml │ └── deployment.yaml ├── .helmignore ├── Chart.yaml └── values.yaml ├── kumascript ├── templates │ ├── _helpers.tpl │ ├── service.yaml │ ├── NOTES.txt │ └── deployment.yaml ├── .helmignore ├── values.yaml └── Chart.yaml ├── elasticsearch ├── templates │ ├── _helpers.tpl │ ├── service.yaml │ ├── deployment.yaml │ └── NOTES.txt ├── .helmignore ├── values.yaml └── Chart.yaml ├── Makefile └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | # helm-charts 2 | Kubernetes Helm charts for the Mozilla Developer Network (MDN). 3 | -------------------------------------------------------------------------------- /mdn/charts/mysql-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/mdn/charts/mysql-0.1.0.tgz -------------------------------------------------------------------------------- /mdn/charts/redis-0.4.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/mdn/charts/redis-0.4.2.tgz -------------------------------------------------------------------------------- /mdn/charts/worker-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/mdn/charts/worker-0.1.0.tgz -------------------------------------------------------------------------------- /kuma_api/charts/kuma-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/kuma_api/charts/kuma-0.1.0.tgz -------------------------------------------------------------------------------- /kuma_web/charts/kuma-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/kuma_web/charts/kuma-0.1.0.tgz -------------------------------------------------------------------------------- /mdn/charts/kuma_api-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/mdn/charts/kuma_api-0.1.0.tgz -------------------------------------------------------------------------------- /mdn/charts/kuma_web-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/mdn/charts/kuma_web-0.1.0.tgz -------------------------------------------------------------------------------- /mdn/charts/memcached-0.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/mdn/charts/memcached-0.4.0.tgz -------------------------------------------------------------------------------- /worker/charts/kuma-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/worker/charts/kuma-0.1.0.tgz -------------------------------------------------------------------------------- /mdn/charts/kumascript-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/mdn/charts/kumascript-0.1.0.tgz -------------------------------------------------------------------------------- /mdn/charts/elasticsearch-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/helm-charts/master/mdn/charts/elasticsearch-0.1.0.tgz -------------------------------------------------------------------------------- /worker/requirements.yaml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: kuma 3 | version: 0.1.0 4 | repository: http://localhost:8879/charts 5 | -------------------------------------------------------------------------------- /kuma_api/requirements.yaml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: kuma 3 | version: 0.1.0 4 | repository: http://localhost:8879/charts 5 | -------------------------------------------------------------------------------- /kuma_web/requirements.yaml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: kuma 3 | version: 0.1.0 4 | repository: http://localhost:8879/charts 5 | -------------------------------------------------------------------------------- /kuma/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{- define "fullname" -}} 2 | {{- $name := default .Chart.Name .Values.name -}} 3 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 4 | {{- end -}} 5 | -------------------------------------------------------------------------------- /mysql/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{- define "fullname" -}} 2 | {{- $name := default .Chart.Name .Values.name -}} 3 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 4 | {{- end -}} 5 | -------------------------------------------------------------------------------- /kumascript/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{- define "fullname" -}} 2 | {{- $name := default .Chart.Name .Values.name -}} 3 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 4 | {{- end -}} 5 | -------------------------------------------------------------------------------- /elasticsearch/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{- define "fullname" -}} 2 | {{- $name := default .Chart.Name .Values.name -}} 3 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 4 | {{- end -}} 5 | -------------------------------------------------------------------------------- /kuma_api/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for the Kuma API service. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | kuma: 5 | name: api 6 | livenessProbe: false 7 | readinessProbe: false 8 | -------------------------------------------------------------------------------- /kuma_web/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for the Kuma web service. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | kuma: 5 | name: web 6 | livenessProbe: false 7 | readinessProbe: false 8 | -------------------------------------------------------------------------------- /kuma_api/requirements.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - condition: "" 3 | enabled: false 4 | name: kuma 5 | repository: http://localhost:8879/charts 6 | tags: null 7 | version: 0.1.0 8 | digest: sha256:6d732966b35eb1a4282870e971a4d6a495760cdaea4021140481713564d9a3dc 9 | generated: 2017-03-27T16:46:04.193637623-07:00 10 | -------------------------------------------------------------------------------- /kuma_web/requirements.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - condition: "" 3 | enabled: false 4 | name: kuma 5 | repository: http://localhost:8879/charts 6 | tags: null 7 | version: 0.1.0 8 | digest: sha256:6d732966b35eb1a4282870e971a4d6a495760cdaea4021140481713564d9a3dc 9 | generated: 2017-03-27T16:46:05.526418724-07:00 10 | -------------------------------------------------------------------------------- /worker/requirements.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - condition: "" 3 | enabled: false 4 | name: kuma 5 | repository: http://localhost:8879/charts 6 | tags: null 7 | version: 0.1.0 8 | digest: sha256:6d732966b35eb1a4282870e971a4d6a495760cdaea4021140481713564d9a3dc 9 | generated: 2017-03-27T16:46:02.548393276-07:00 10 | -------------------------------------------------------------------------------- /elasticsearch/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "fullname" . }} 5 | labels: 6 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 7 | spec: 8 | type: {{ .Values.service.type }} 9 | selector: 10 | app: {{ template "fullname" . }} 11 | ports: 12 | - name: client 13 | port: 9200 14 | - name: peer 15 | port: 9300 16 | -------------------------------------------------------------------------------- /kuma/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /mdn/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /mysql/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /worker/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /kuma_api/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /kuma_web/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /kumascript/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /kumascript/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "fullname" . }} 5 | labels: 6 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 7 | spec: 8 | type: {{ .Values.service.type }} 9 | selector: 10 | app: {{ template "fullname" . }} 11 | ports: 12 | - port: {{ .Values.service.externalPort }} 13 | targetPort: {{ .Values.service.internalPort }} 14 | protocol: TCP 15 | -------------------------------------------------------------------------------- /elasticsearch/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /kumascript/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for kumascript. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | replicaCount: 1 5 | 6 | image: 7 | repository: quay.io/mozmar/kumascript 8 | tag: latest 9 | pullPolicy: IfNotPresent 10 | 11 | service: 12 | type: ClusterIP 13 | externalPort: 9080 14 | internalPort: 9080 15 | 16 | resources: 17 | requests: 18 | cpu: 100m 19 | memory: 256Mi 20 | -------------------------------------------------------------------------------- /mysql/templates/svc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "fullname" . }} 5 | labels: 6 | app: {{ template "fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | release: "{{ .Release.Name }}" 9 | heritage: "{{ .Release.Service }}" 10 | spec: 11 | ports: 12 | - name: mysql 13 | port: 3306 14 | targetPort: mysql 15 | selector: 16 | app: {{ template "fullname" . }} 17 | -------------------------------------------------------------------------------- /elasticsearch/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for elasticsearch. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | name: elasticsearch 5 | 6 | replicaCount: 1 7 | 8 | image: 9 | repository: elasticsearch 10 | tag: 1.7 11 | pullPolicy: IfNotPresent 12 | 13 | service: 14 | type: ClusterIP 15 | 16 | resources: 17 | limits: 18 | cpu: 1 19 | memory: 2Gi 20 | requests: 21 | cpu: 1 22 | memory: 2Gi 23 | -------------------------------------------------------------------------------- /kuma/templates/service.yaml: -------------------------------------------------------------------------------- 1 | {{if .Values.service.enable}} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: {{ template "fullname" . }} 6 | labels: 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | spec: 9 | type: {{ .Values.service.type }} 10 | selector: 11 | app: {{ template "fullname" . }} 12 | ports: 13 | - port: {{ .Values.service.externalPort }} 14 | targetPort: {{ .Values.service.internalPort }} 15 | protocol: TCP 16 | {{end}} 17 | -------------------------------------------------------------------------------- /elasticsearch/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | name: elasticsearch 3 | version: 0.1.0 4 | description: > 5 | A Kubernetes Helm chart for elasticsearch for the 6 | Mozilla Developer Network (MDN). 7 | home: https://github.com/elastic/elasticsearch 8 | maintainers: 9 | - name: Josh Mize 10 | email: jmize@mozilla.com 11 | - name: Dave Parfitt 12 | email: dparfitt@mozilla.com 13 | - name: John Whitlock 14 | email: jwhitlock@mozilla.com 15 | - name: Ryan Johnson 16 | email: rjohnson@mozilla.com 17 | -------------------------------------------------------------------------------- /worker/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for the Kuma worker service. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | kuma: 5 | name: worker 6 | command: ./manage.py 7 | args: 8 | - celery 9 | - worker 10 | - "--events" 11 | - "--beat" 12 | - "--autoreload" 13 | - "--concurrency=4" 14 | - "-Q mdn_purgeable,mdn_search,mdn_emails,mdn_wiki,celery" 15 | service: 16 | enable: false 17 | livenessProbe: false 18 | readinessProbe: false 19 | -------------------------------------------------------------------------------- /kumascript/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | name: kumascript 3 | version: 0.1.0 4 | description: A Kubernetes Helm chart for the KumaScript service of the Mozilla Developer Network (MDN). 5 | home: https://github.com/mozilla/kumascript 6 | keywords: 7 | - MDN 8 | - Mozilla Developer Network 9 | - KumaScript 10 | - Mozilla 11 | sources: 12 | - https://github.com/mozilla/kumascript 13 | maintainers: 14 | - name: Josh Mize 15 | email: jmize@mozilla.com 16 | - name: Dave Parfitt 17 | email: dparfitt@mozilla.com 18 | - name: John Whitlock 19 | email: jwhitlock@mozilla.com 20 | - name: Ryan Johnson 21 | email: rjohnson@mozilla.com 22 | -------------------------------------------------------------------------------- /worker/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | name: worker 3 | version: 0.1.0 4 | description: A Kubernetes Helm chart for the Celery service of the Mozilla Developer Network (MDN). 5 | home: https://github.com/mozilla/kuma 6 | keywords: 7 | - MDN 8 | - Mozilla Developer Network 9 | - Kuma 10 | - Mozilla 11 | maintainers: 12 | - name: Josh Mize 13 | email: jmize@mozilla.com 14 | - name: Dave Parfitt 15 | email: dparfitt@mozilla.com 16 | - name: John Whitlock 17 | email: jwhitlock@mozilla.com 18 | - name: Ryan Johnson 19 | email: rjohnson@mozilla.com 20 | icon: https://raw.githubusercontent.com/mozilla/kuma/master/kuma/static/img/favicon32.png 21 | -------------------------------------------------------------------------------- /kuma_api/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | name: kuma_api 3 | version: 0.1.0 4 | description: A Kubernetes Helm chart for the Kuma API service of the Mozilla Developer Network (MDN). 5 | home: https://github.com/mozilla/kuma 6 | keywords: 7 | - MDN 8 | - Mozilla Developer Network 9 | - Kuma 10 | - Mozilla 11 | maintainers: 12 | - name: Josh Mize 13 | email: jmize@mozilla.com 14 | - name: Dave Parfitt 15 | email: dparfitt@mozilla.com 16 | - name: John Whitlock 17 | email: jwhitlock@mozilla.com 18 | - name: Ryan Johnson 19 | email: rjohnson@mozilla.com 20 | icon: https://raw.githubusercontent.com/mozilla/kuma/master/kuma/static/img/favicon32.png 21 | -------------------------------------------------------------------------------- /kuma_web/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | name: kuma_web 3 | version: 0.1.0 4 | description: A Kubernetes Helm chart for the Kuma Web service of the Mozilla Developer Network (MDN). 5 | home: https://github.com/mozilla/kuma 6 | keywords: 7 | - MDN 8 | - Mozilla Developer Network 9 | - Kuma 10 | - Mozilla 11 | maintainers: 12 | - name: Josh Mize 13 | email: jmize@mozilla.com 14 | - name: Dave Parfitt 15 | email: dparfitt@mozilla.com 16 | - name: John Whitlock 17 | email: jwhitlock@mozilla.com 18 | - name: Ryan Johnson 19 | email: rjohnson@mozilla.com 20 | icon: https://raw.githubusercontent.com/mozilla/kuma/master/kuma/static/img/favicon32.png 21 | -------------------------------------------------------------------------------- /kuma/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | name: kuma 3 | version: 0.1.0 4 | description: A Kubernetes Helm chart for the Kuma service of the Mozilla Developer Network (MDN). 5 | home: https://github.com/mozilla/kuma 6 | keywords: 7 | - MDN 8 | - Mozilla Developer Network 9 | - Kuma 10 | - Mozilla 11 | sources: 12 | - https://github.com/mozilla/kuma 13 | maintainers: 14 | - name: Josh Mize 15 | email: jmize@mozilla.com 16 | - name: Dave Parfitt 17 | email: dparfitt@mozilla.com 18 | - name: John Whitlock 19 | email: jwhitlock@mozilla.com 20 | - name: Ryan Johnson 21 | email: rjohnson@mozilla.com 22 | icon: https://raw.githubusercontent.com/mozilla/kuma/master/kuma/static/img/favicon32.png 23 | -------------------------------------------------------------------------------- /mdn/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for MDN. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | redis: 5 | redisPassword: kuma 6 | persistence: 7 | # This is required, at least for a minikube cluster, to avoid this issue: 8 | # https://github.com/kubernetes/charts/issues/228 9 | enabled: false 10 | 11 | mysql: 12 | persistence: 13 | enabled: false 14 | mysqlUser: root 15 | mysqlPassword: kuma 16 | mysqlRootPassword: kuma 17 | mysqlDatabase: developer_mozilla_org 18 | 19 | kuma_api: 20 | kuma: 21 | brokerPassword: kuma 22 | 23 | kuma_web: 24 | kuma: 25 | brokerPassword: kuma 26 | 27 | worker: 28 | kuma: 29 | brokerPassword: kuma 30 | -------------------------------------------------------------------------------- /mdn/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | name: mdn 3 | version: 0.1.0 4 | description: A Kubernetes Helm chart for the Mozilla Developer Network (MDN). 5 | home: https://github.com/mozilla/kuma 6 | keywords: 7 | - MDN 8 | - Mozilla Developer Network 9 | - Kuma 10 | - Mozilla 11 | sources: 12 | - https://github.com/mozilla/kuma 13 | - https://github.com/mozilla/kumascript 14 | maintainers: 15 | - name: Josh Mize 16 | email: jmize@mozilla.com 17 | - name: Dave Parfitt 18 | email: dparfitt@mozilla.com 19 | - name: John Whitlock 20 | email: jwhitlock@mozilla.com 21 | - name: Ryan Johnson 22 | email: rjohnson@mozilla.com 23 | icon: https://raw.githubusercontent.com/mozilla/kuma/master/kuma/static/img/favicon32.png 24 | -------------------------------------------------------------------------------- /mysql/templates/secrets.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: {{ template "fullname" . }} 5 | labels: 6 | app: {{ template "fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | release: "{{ .Release.Name }}" 9 | heritage: "{{ .Release.Service }}" 10 | type: Opaque 11 | data: 12 | {{ if .Values.mysqlRootPassword }} 13 | mysql-root-password: {{ .Values.mysqlRootPassword | b64enc | quote }} 14 | {{ else }} 15 | mysql-root-password: {{ randAlphaNum 10 | b64enc | quote }} 16 | {{ end }} 17 | {{ if .Values.mysqlPassword }} 18 | mysql-password: {{ .Values.mysqlPassword | b64enc | quote }} 19 | {{ else }} 20 | mysql-password: {{ randAlphaNum 10 | b64enc | quote }} 21 | {{ end }} 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | clean: 3 | rm -f {kuma_api,kuma_web,worker,mdn}/requirements.lock 4 | 5 | build: clean 6 | helm lint kuma && helm package kuma 7 | helm lint worker && helm dependency build worker && helm package worker 8 | helm lint kuma_api && helm dependency build kuma_api && \ 9 | helm package kuma_api 10 | helm lint kuma_web && helm dependency build kuma_web && \ 11 | helm package kuma_web 12 | helm lint kumascript && helm package kumascript 13 | helm lint mysql && helm package mysql 14 | helm lint elasticsearch && helm package elasticsearch 15 | helm lint mdn && helm dependency build mdn && helm package mdn 16 | @ rm -f kuma-*.tgz kuma_api-*.tgz kuma_web-*.tgz worker-*.tgz 17 | @ rm -f elasticsearch-*.tgz kumascript-*.tgz mdn-*.tgz mysql-*.tgz 18 | -------------------------------------------------------------------------------- /mysql/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | name: mysql 3 | version: 0.1.0 4 | description: > 5 | A Kubernetes Helm chart for MySQL for the Mozilla Developer Network (MDN). 6 | It is almost an exact copy of version 0.2.5 of the stable/mysql chart, but 7 | with a different Docker image. 8 | home: https://github.com/mozilla/kuma 9 | keywords: 10 | - MDN 11 | - Mozilla Developer Network 12 | - Kuma 13 | - Mozilla 14 | - MySQL 15 | - SQL 16 | - database 17 | sources: 18 | - https://github.com/kubernetes/charts 19 | maintainers: 20 | - name: Josh Mize 21 | email: jmize@mozilla.com 22 | - name: Dave Parfitt 23 | email: dparfitt@mozilla.com 24 | - name: John Whitlock 25 | email: jwhitlock@mozilla.com 26 | - name: Ryan Johnson 27 | email: rjohnson@mozilla.com 28 | -------------------------------------------------------------------------------- /mysql/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | MySQL can be accessed via port 3306 on the following DNS name from within your cluster: 2 | {{ template "fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local 3 | 4 | To get your root password run: 5 | 6 | kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo 7 | 8 | To connect to your database: 9 | 10 | 1. Run an Ubuntu pod that you can use as a client: 11 | 12 | kubectl run -i --tty ubuntu --image=ubuntu:16.04 --restart=Never -- bash -il 13 | 14 | 2. Install the mysql client: 15 | 16 | $ apt-get update && apt-get install mysql-client -y 17 | 18 | 3. Connect using the mysql cli, then provide your password: 19 | $ mysql -h {{ template "fullname" . }} -p 20 | -------------------------------------------------------------------------------- /mysql/templates/pvc.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.persistence.enabled }} 2 | kind: PersistentVolumeClaim 3 | apiVersion: v1 4 | metadata: 5 | name: {{ template "fullname" . }} 6 | labels: 7 | app: {{ template "fullname" . }} 8 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 9 | release: "{{ .Release.Name }}" 10 | heritage: "{{ .Release.Service }}" 11 | annotations: 12 | {{- if .Values.persistence.storageClass }} 13 | volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} 14 | {{- else }} 15 | volume.alpha.kubernetes.io/storage-class: default 16 | {{- end }} 17 | spec: 18 | accessModes: 19 | - {{ .Values.persistence.accessMode | quote }} 20 | resources: 21 | requests: 22 | storage: {{ .Values.persistence.size | quote }} 23 | {{- end }} 24 | -------------------------------------------------------------------------------- /mdn/requirements.yaml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: worker 3 | version: 0.1.0 4 | repository: http://localhost:8879/charts 5 | - name: kuma_api 6 | version: 0.1.0 7 | repository: http://localhost:8879/charts 8 | - name: kuma_web 9 | version: 0.1.0 10 | repository: http://localhost:8879/charts 11 | - name: kumascript 12 | version: 0.1.0 13 | repository: http://localhost:8879/charts 14 | - name: elasticsearch 15 | version: 0.1.0 16 | repository: http://localhost:8879/charts 17 | - name: mysql 18 | version: 0.1.0 19 | repository: http://localhost:8879/charts 20 | - name: redis 21 | version: 0.4.2 22 | repository: https://kubernetes-charts.storage.googleapis.com 23 | - name: memcached 24 | version: 0.4.0 25 | repository: https://kubernetes-charts.storage.googleapis.com 26 | -------------------------------------------------------------------------------- /mdn/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{- define "kuma_database_url" -}} 3 | mysql://{{.Values.mysql.mysqlUser}}:{{.Values.mysql.mysqlPassword}}@{{ printf "%s-%s" .Release.Name "mysql" | trunc 63 }}:3306/{{.Values.mysql.mysqlDatabase}} 4 | {{- end -}} 5 | 6 | {{- define "kuma_broker_url" -}} 7 | redis://{{.Values.redis.redisPassword}}@{{ printf "%s-%s" .Release.Name "redis" | trunc 63 }}:6379/0 8 | {{- end -}} 9 | 10 | {{- define "kuma_kumascript_url_template" -}} 11 | http://{{ printf "%s-%s" .Release.Name "kumascript" | trunc 63 }}{{if (ne .Values.kumascript.service.externalPort 80.0)}}:{{.Values.kumascript.service.externalPort}}{{end}}/docs/{path} 12 | {{- end -}} 13 | 14 | {{- define "kuma_site_url" -}} 15 | http://{{ printf "%s-%s" .Release.Name .Values.kuma_web.kuma.name | trunc 63 }}{{if (ne .Values.kuma_web.kuma.service.externalPort 80.0)}}:{{.Values.kuma_web.kuma.service.externalPort}}{{end}} 16 | {{- end -}} 17 | -------------------------------------------------------------------------------- /kuma/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for kuma. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | replicaCount: 1 5 | 6 | image: 7 | repository: quay.io/mozmar/kuma 8 | tag: latest 9 | pullPolicy: IfNotPresent 10 | 11 | service: 12 | enable: true 13 | type: ClusterIP 14 | externalPort: 80 15 | internalPort: 8000 16 | 17 | command: gunicorn 18 | 19 | args: 20 | - "-w=4" 21 | - "--bind=0.0.0.0" 22 | - "--access-logfile=-" 23 | - "--timeout=120" 24 | - "kuma.wsgi:application" 25 | 26 | livenessProbe: 27 | httpGet: 28 | path: /contribute.json 29 | port: 8000 30 | initialDelaySeconds: 20 31 | periodSeconds: 3 32 | 33 | readinessProbe: 34 | httpGet: 35 | path: /en-US 36 | port: 8000 37 | initialDelaySeconds: 20 38 | periodSeconds: 3 39 | 40 | resources: 41 | requests: 42 | cpu: 100m 43 | memory: 256Mi 44 | 45 | debug: "False" 46 | debug_toolbar: "False" 47 | allowed_hosts: "*" 48 | maintenance_mode: "False" 49 | -------------------------------------------------------------------------------- /elasticsearch/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: {{ template "fullname" . }} 5 | labels: 6 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | template: 10 | metadata: 11 | labels: 12 | app: {{ template "fullname" . }} 13 | spec: 14 | volumes: 15 | - name: elasticsearch-data 16 | emptyDir: {} # for demos only -- deleted when pod removed from node 17 | containers: 18 | - name: {{ .Chart.Name }} 19 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 20 | imagePullPolicy: {{ .Values.image.pullPolicy }} 21 | ports: 22 | - containerPort: 9200 23 | - containerPort: 9300 24 | volumeMounts: 25 | - name: elasticsearch-data 26 | mountPath: /usr/share/elasticsearch/data 27 | resources: 28 | {{ toYaml .Values.resources | indent 12 }} 29 | -------------------------------------------------------------------------------- /mysql/values.yaml: -------------------------------------------------------------------------------- 1 | name: mysql 2 | 3 | ## mysql image version 4 | ## ref: https://hub.docker.com/r/library/mysql/tags/ 5 | ## 6 | imageTag: latest 7 | 8 | ## Specify password for root user 9 | ## 10 | ## Default: random 10 character string 11 | # mysqlRootPassword: testing 12 | 13 | ## Create a database user 14 | ## 15 | # mysqlUser: 16 | # mysqlPassword: 17 | 18 | ## Allow unauthenticated access, uncomment to enable 19 | ## 20 | # mysqlAllowEmptyPassword: true 21 | 22 | ## Create a database 23 | ## 24 | # mysqlDatabase: 25 | 26 | ## Specify an imagePullPolicy (Required) 27 | ## It's recommended to change this to 'Always' if the image tag is 'latest' 28 | ## ref: http://kubernetes.io/docs/user-guide/images/#updating-images 29 | ## 30 | imagePullPolicy: IfNotPresent 31 | 32 | ## Persist data to a persitent volume 33 | persistence: 34 | enabled: false 35 | ## If defined, volume.beta.kubernetes.io/storage-class: 36 | ## Default: volume.alpha.kubernetes.io/storage-class: default 37 | ## 38 | # storageClass: 39 | # accessMode: ReadWriteOnce 40 | # size: 8Gi 41 | 42 | ## Configure resource requests and limits 43 | ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ 44 | ## 45 | resources: 46 | requests: 47 | memory: 256Mi 48 | cpu: 100m 49 | -------------------------------------------------------------------------------- /kuma/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Get the URL for {{ .Values.service.name }} by running these commands: 2 | {{- if contains "NodePort" .Values.service.type }} 3 | export WEB_NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "fullname" . }}) 4 | export WEB_NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 5 | echo http://$WEB_NODE_IP:$WEB_NODE_PORT/login 6 | {{- else if contains "LoadBalancer" .Values.service.type }} 7 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 8 | You can watch the status of by running 'kubectl get svc -w {{ include "fullname" . }}' 9 | export WEB_SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') 10 | echo http://$SERVICE_IP:{{ .Values.service.externalPort }} 11 | {{- else if contains "ClusterIP" .Values.service.type }} 12 | export WEB_POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ include "fullname" . }}" -o jsonpath="{.items[0].metadata.name}") 13 | echo "Visit http://127.0.0.1:8080 to use your application" 14 | kubectl port-forward $WEB_POD_NAME 8080:{{ .Values.service.externalPort }} 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /elasticsearch/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Get the URL for {{ .Values.service.name }} by running these commands: 2 | {{- if contains "NodePort" .Values.service.type }} 3 | export WEB_NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }}) 4 | export WEB_NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 5 | echo http://$WEB_NODE_IP:$WEB_NODE_PORT/login 6 | {{- else if contains "LoadBalancer" .Values.service.type }} 7 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 8 | You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}' 9 | export WEB_SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') 10 | echo http://$SERVICE_IP:{{ .Values.service.externalPort }} 11 | {{- else if contains "ClusterIP" .Values.service.type }} 12 | export WEB_POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}") 13 | echo "Visit http://127.0.0.1:8080 to use your application" 14 | kubectl port-forward $WEB_POD_NAME 8080:{{ .Values.service.externalPort }} 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /kumascript/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Get the URL for {{ .Values.service.name }} by running these commands: 2 | {{- if contains "NodePort" .Values.service.type }} 3 | export WEB_NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }}) 4 | export WEB_NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 5 | echo http://$WEB_NODE_IP:$WEB_NODE_PORT/login 6 | {{- else if contains "LoadBalancer" .Values.service.type }} 7 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 8 | You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}' 9 | export WEB_SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') 10 | echo http://$SERVICE_IP:{{ .Values.service.externalPort }} 11 | {{- else if contains "ClusterIP" .Values.service.type }} 12 | export WEB_POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}") 13 | echo "Visit http://127.0.0.1:8080 to use your application" 14 | kubectl port-forward $WEB_POD_NAME 8080:{{ .Values.service.externalPort }} 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /mdn/requirements.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - condition: "" 3 | enabled: false 4 | name: worker 5 | repository: http://localhost:8879/charts 6 | tags: null 7 | version: 0.1.0 8 | - condition: "" 9 | enabled: false 10 | name: kuma_api 11 | repository: http://localhost:8879/charts 12 | tags: null 13 | version: 0.1.0 14 | - condition: "" 15 | enabled: false 16 | name: kuma_web 17 | repository: http://localhost:8879/charts 18 | tags: null 19 | version: 0.1.0 20 | - condition: "" 21 | enabled: false 22 | name: kumascript 23 | repository: http://localhost:8879/charts 24 | tags: null 25 | version: 0.1.0 26 | - condition: "" 27 | enabled: false 28 | name: elasticsearch 29 | repository: http://localhost:8879/charts 30 | tags: null 31 | version: 0.1.0 32 | - condition: "" 33 | enabled: false 34 | name: mysql 35 | repository: http://localhost:8879/charts 36 | tags: null 37 | version: 0.1.0 38 | - condition: "" 39 | enabled: false 40 | name: redis 41 | repository: https://kubernetes-charts.storage.googleapis.com 42 | tags: null 43 | version: 0.4.2 44 | - condition: "" 45 | enabled: false 46 | name: memcached 47 | repository: https://kubernetes-charts.storage.googleapis.com 48 | tags: null 49 | version: 0.4.0 50 | digest: sha256:3869855de14a1a39b3f48d0707d6474c7c0ec6d225e5dc61263c4f08d8d87023 51 | generated: 2017-03-27T16:46:08.353984141-07:00 52 | -------------------------------------------------------------------------------- /kumascript/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: {{ template "fullname" . }} 5 | labels: 6 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | template: 10 | metadata: 11 | labels: 12 | app: {{ template "fullname" . }} 13 | spec: 14 | containers: 15 | - name: {{ template "fullname" . }} 16 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 17 | imagePullPolicy: {{ .Values.image.pullPolicy }} 18 | command: 19 | - node 20 | args: 21 | - run.js 22 | ports: 23 | - containerPort: {{ .Values.service.internalPort }} 24 | env: 25 | - name: log__console 26 | value: "true" 27 | - name: server__template_root_dir 28 | value: macros 29 | - name: server__document_url_template 30 | value: {{block "kumascript_document_url_template" .}}http://{{ printf "%s-%s" .Release.Name "api" | trunc 63 }}/en-US/docs/{path}?raw=1{{end}} 31 | - name: server__memcache__server 32 | value: {{block "kumascript_memcached_servers" .}}{{ printf "%s-%s" .Release.Name "memcached" | trunc 63 }}:11211{{end}} 33 | - name: server__template_class 34 | value: EJSTemplate 35 | - name: server__autorequire__mdn 36 | value: MDN:Common 37 | - name: server__autorequire__Page 38 | value: DekiScript:Page 39 | - name: server__autorequire__String 40 | value: DekiScript:String 41 | - name: server__autorequire__Uri 42 | value: DekiScript:Uri 43 | - name: server__autorequire__Web 44 | value: DekiScript:Web 45 | - name: server__autorequire__Wiki 46 | value: DekiScript:Wiki 47 | resources: 48 | {{ toYaml .Values.resources | indent 12 }} 49 | -------------------------------------------------------------------------------- /mysql/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: {{ template "fullname" . }} 5 | labels: 6 | app: {{ template "fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | release: "{{ .Release.Name }}" 9 | heritage: "{{ .Release.Service }}" 10 | spec: 11 | template: 12 | metadata: 13 | labels: 14 | app: {{ template "fullname" . }} 15 | annotations: 16 | pod.beta.kubernetes.io/init-containers: '[ 17 | { 18 | "name": "remove-lost-found", 19 | "image": "busybox:1.25.0", 20 | "command": ["rm", "-fr", "/var/lib/mysql/lost+found"], 21 | "volumeMounts": [ 22 | { 23 | "name": "data", 24 | "mountPath": "/var/lib/mysql" 25 | } 26 | ], 27 | "imagePullPolicy": {{ .Values.imagePullPolicy | quote }} 28 | } 29 | ]' 30 | spec: 31 | containers: 32 | - name: {{ template "fullname" . }} 33 | image: "quay.io/mozmar/mdn-mysql:{{ .Values.imageTag }}" 34 | imagePullPolicy: {{ .Values.imagePullPolicy | quote }} 35 | resources: 36 | {{ toYaml .Values.resources | indent 10 }} 37 | env: 38 | {{- if .Values.mysqlAllowEmptyPassword }} 39 | - name: MYSQL_ALLOW_EMPTY_PASSWORD 40 | value: "true" 41 | {{- else }} 42 | - name: MYSQL_ROOT_PASSWORD 43 | valueFrom: 44 | secretKeyRef: 45 | name: {{ template "fullname" . }} 46 | key: mysql-root-password 47 | - name: MYSQL_PASSWORD 48 | valueFrom: 49 | secretKeyRef: 50 | name: {{ template "fullname" . }} 51 | key: mysql-password 52 | {{- end }} 53 | - name: MYSQL_USER 54 | value: {{ default "" .Values.mysqlUser | quote }} 55 | - name: MYSQL_DATABASE 56 | value: {{ default "" .Values.mysqlDatabase | quote }} 57 | ports: 58 | - name: mysql 59 | containerPort: 3306 60 | livenessProbe: 61 | exec: 62 | command: 63 | - mysqladmin 64 | - ping 65 | initialDelaySeconds: 30 66 | timeoutSeconds: 5 67 | readinessProbe: 68 | exec: 69 | command: 70 | - mysqladmin 71 | - ping 72 | initialDelaySeconds: 5 73 | timeoutSeconds: 1 74 | volumeMounts: 75 | - name: data 76 | mountPath: /var/lib/mysql 77 | volumes: 78 | - name: data 79 | {{- if .Values.persistence.enabled }} 80 | persistentVolumeClaim: 81 | claimName: {{ template "fullname" . }} 82 | {{- else }} 83 | emptyDir: {} 84 | {{- end -}} 85 | -------------------------------------------------------------------------------- /kuma/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: {{ template "fullname" . }} 5 | labels: 6 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | template: 10 | metadata: 11 | labels: 12 | app: {{ template "fullname" . }} 13 | spec: 14 | containers: 15 | - name: {{ template "fullname" . }} 16 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 17 | imagePullPolicy: {{ .Values.image.pullPolicy }} 18 | command: 19 | - {{ .Values.command | quote }} 20 | args: 21 | {{- range .Values.args }} 22 | - {{ . | quote }} 23 | {{- end }} 24 | ports: 25 | - containerPort: {{ .Values.service.internalPort }} 26 | env: 27 | # Django settings overrides: 28 | - name: ACCOUNT_DEFAULT_HTTP_PROTOCOL 29 | value: http 30 | - name: ALLOWED_HOSTS 31 | value: {{ .Values.allowed_hosts | quote }} 32 | - name: BROKER_URL 33 | value: {{ if .Values.brokerURL }}{{ .Values.brokerURL | quote }}{{ else }}redis://{{ if .Values.brokerPassword }}:{{ .Values.brokerPassword }}@{{ end }}{{ printf "%s-%s" .Release.Name "redis" | trunc 63 }}:6379/0{{ end }} 34 | - name: CELERY_ALWAYS_EAGER 35 | value: "False" 36 | - name: CSRF_COOKIE_SECURE 37 | value: "False" 38 | - name: DATABASE_URL 39 | value: {{ if .Values.databaseURL }}{{ .Values.databaseURL | quote }}{{ else }}mysql://{{ default "root" .Values.databaseUser }}:{{ default "kuma" .Values.databasePassword }}@{{ printf "%s-%s" .Release.Name "mysql" | trunc 63 }}:3306/{{ default "developer_mozilla_org" .Values.databaseName }}{{ end }} 40 | - name: DEBUG 41 | value: {{ .Values.debug | quote }} 42 | - name: DEBUG_TOOLBAR 43 | value: {{ .Values.debug_toolbar | quote }} 44 | - name: DOMAIN 45 | value: {{ template "fullname" . }} 46 | - name: ES_URLS 47 | value: {{ if .Values.elasticsearchURL }}{{ .Values.elasticsearchURL | quote }}{{ else }}{{ printf "%s-%s" .Release.Name "elasticsearch" | trunc 63 }}:9200{{ end }} 48 | - name: KUMASCRIPT_URL_TEMPLATE 49 | value: http://{{ printf "%s-%s" .Release.Name "kumascript" | trunc 63 }}:9080/docs/{path} 50 | - name: MEMCACHE_SERVERS 51 | value: {{ if .Values.memcachedURL }}{{ .Values.memcachedURL }}{{ else }}{{ printf "%s-%s" .Release.Name "memcached" | trunc 63 }}:11211{{ end }} 52 | - name: PROD_DETAILS_DIR 53 | value: /app/product_details_json 54 | - name: PROTOCOL 55 | value: "http://" 56 | - name: SESSION_COOKIE_SECURE 57 | value: "False" 58 | - name: SITE_URL 59 | value: http://{{ template "fullname" . }}{{ if (ne .Values.service.externalPort 80.0) }}:{{ .Values.service.externalPort }}{{ end }} 60 | # Other environment overrides 61 | - name: PYTHONDONTWRITEBYTECODE 62 | value: "1" 63 | - name: PYTHONUNBUFFERED 64 | value: "True" 65 | - name: WEB_CONCURRENCY 66 | value: "4" 67 | - name: MAINTENANCE_MODE 68 | value: {{ .Values.maintenance_mode | quote }} 69 | {{- if .Values.livenessProbe}} 70 | livenessProbe: 71 | {{ toYaml .Values.livenessProbe | indent 12 }} 72 | {{- end}} 73 | {{- if .Values.readinessProbe}} 74 | readinessProbe: 75 | {{ toYaml .Values.readinessProbe | indent 12 }} 76 | {{- end}} 77 | resources: 78 | {{ toYaml .Values.resources | indent 12 -}} 79 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | --------------------------------------------------------------------------------