Skip to content
Commits on Source (28)
......@@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: minds
version: 0.1.0
version: 0.1.1
......@@ -6,13 +6,10 @@ dependencies:
repository: http://storage.googleapis.com/kubernetes-charts-incubator/
version: 0.10.3
- name: elasticsearch
repository: https://kubernetes-charts.storage.googleapis.com/
version: 1.17.0
repository: https://helm.elastic.co
version: 7.1.1
- name: rabbitmq
repository: https://kubernetes-charts.storage.googleapis.com/
version: 4.1.0
- name: cockroachdb
repository: https://kubernetes-charts.storage.googleapis.com/
version: 2.0.10
digest: sha256:63a4911f2e38badede16e2e72207da7f5ffab7bcd2e754d86820f47f542502fb
generated: 2019-01-28T15:04:42.543869-07:00
digest: sha256:ff418def7167baa3fed1de190fda4170719280a110d9f14fe24bef5c6e2f9c85
generated: "2019-06-28T21:26:42.061018+01:00"
......@@ -2,17 +2,15 @@ dependencies:
- name: redis
version: 0.9.0
repository: https://kubernetes-charts.storage.googleapis.com/
#condition: production
condition: redis.deploy
- name: cassandra
version: 0.10.3
repository: http://storage.googleapis.com/kubernetes-charts-incubator/
condition: cassandra.deploy
- name: elasticsearch
version: 1.17.0
repository: https://kubernetes-charts.storage.googleapis.com/
condition: useElasticSearch
version: 7.1.1
repository: https://helm.elastic.co
condition: elasticsearch.deploy
- name: rabbitmq
version: 4.1.0
repository: https://kubernetes-charts.storage.googleapis.com/
- name: cockroachdb
version: 2.0.10
repository: https://kubernetes-charts.storage.googleapis.com/
\ No newline at end of file
......@@ -36,7 +36,7 @@ spec:
initialDelaySeconds: 10
timeoutSeconds: 5
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.phpfpm.resources | nindent 12 }}
volumeMounts:
- name: front
mountPath: /var/www/Minds/front
......@@ -60,7 +60,7 @@ spec:
containerPort: 80
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.nginx.resources | nindent 12 }}
volumeMounts:
- name: front
mountPath: /var/www/Minds/front
......
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "minds.fullname" . }}-runners
labels:
app.kubernetes.io/name: {{ include "minds.name" . }}
helm.sh/chart: {{ include "minds.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: {{ .Values.runners.replicas }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "minds.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.minds.io/name: {{ template "minds.fullname" . }}-runners
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "minds.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.minds.io/name: {{ template "minds.fullname" . }}-runners
app.minds.io/lastChanged: "1"
spec:
containers:
- name: {{ .Chart.Name }}-runners
image: "{{ .Values.runners.image.repository }}:{{ .Values.runners.image.tag }}"
imagePullPolicy: {{ .Values.runners.image.pullPolicy }}
resources:
{{- toYaml .Values.runners.resources | nindent 12 }}
volumeMounts:
- name: settings
mountPath: /var/www/Minds/engine/settings.php
subPath: settings.php
- name: runners
mountPath: /etc/supervisor/conf.d/minds.conf
subPath: runners.conf
- name: secure-certs
mountPath: /var/secure/
readOnly: true
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: settings
configMap:
name: {{ template "minds.fullname" . }}
- name: php-config
configMap:
name: {{ template "minds.fullname" . }}
- name: runners
configMap:
name: {{ template "minds.fullname" . }}
- name: secure-certs
secret:
secretName: {{ template "minds.fullname" . }}-certs
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "minds.fullname" . }}-sockets
labels:
app.kubernetes.io/name: {{ include "minds.name" . }}
helm.sh/chart: {{ include "minds.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: {{ .Values.sockets.replicas }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "minds.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.minds.io/name: {{ template "minds.fullname" . }}-sockets
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "minds.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.minds.io/name: {{ template "minds.fullname" . }}-sockets
app.minds.io/lastChanged: "1"
spec:
containers:
- name: {{ .Chart.Name }}-sockets
image: "{{ .Values.sockets.image.repository }}:{{ .Values.sockets.image.tag }}"
imagePullPolicy: {{ .Values.sockets.image.pullPolicy }}
ports:
- name: sockets
containerPort: 8010
protocol: TCP
readinessProbe:
tcpSocket:
port: 8010
initialDelaySeconds: 10
timeoutSeconds: 5
env:
- name: PORT
value: "8010"
- name: REDIS_HOST
value: "redis-master"
- name: REDIS_PORT
value: "6379"
- name: CASSANDRA_SERVERS
value: "cassandra"
- name: CASSANDRA_KEYSPACE
value: "minds"
- name: MULTI
value: "false"
- name: JWT_SECRET
value: {{ .Values.sockets.jwt.secret }}
resources:
{{- toYaml .Values.sockets.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "minds.fullname" . }}-sockets
labels:
app.kubernetes.io/name: {{ include "minds.name" . }}
helm.sh/chart: {{ include "minds.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: 8010
targetPort: 8010
protocol: TCP
name: ws
selector:
app.minds.io/name: {{ template "minds.fullname" . }}-sockets
......@@ -20,4 +20,8 @@ spec:
- backend:
serviceName: {{ template "minds.fullname" . }}-app
servicePort: http
- path: /socket.io
backend:
serviceName: {{ template "minds.fullname" . }}-sockets
servicePort: ws
{{- end }}
......@@ -11,11 +11,11 @@ metadata:
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
"helm.sh/hook": post-install
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": hook-succeeded,hook-failed
"helm.sh/hook-weight": "5"
"helm.sh/hook-delete-policy": before-hook-creation
spec:
backoffLimit: 5
activeDeadlineSeconds: 100
backoffLimit: 1
activeDeadlineSeconds: 1000
template:
spec:
containers:
......@@ -25,7 +25,6 @@ spec:
"sh", "-c",
"cd /var/www/Minds/engine
&& php ./cli.php install --only=cassandra --use-existing-settings=true
&& php ./cli.php install --only=cockroach --use-existing-settings=true
&& php ./cli.php install --only=site --use-existing-settings=true \
--password='Pa$$w0rd' \
--username=minds \
......
......@@ -15,3 +15,5 @@ data:
phonenumber-private-key.pem: {{ .Files.Get "certs/phonenumber-private-key.pem" | b64enc | quote }}
sessions-public-key.pem: {{ .Files.Get "certs/sessions-public-key.pem" | b64enc | quote }}
sessions-private-key.pem: {{ .Files.Get "certs/sessions-private-key.pem" | b64enc | quote }}
oauth-priv.key: {{ .Files.Get "certs/sessions-private-key.pem" | b64enc | quote }}
oauth-pub.key: {{ .Files.Get "certs/sessions-public-key.pem" | b64enc | quote }}