Commit d2a9babd authored by Mark Harding's avatar Mark Harding

(feat): support socket servers

No related merge requests found
......@@ -266,8 +266,8 @@ data:
// Sockets configuration
$CONFIG->set('sockets-jwt-secret', '{{ .Values.sockets.jwt.secret }}');
$CONFIG->set('sockets-jwt-domain', '{{ .Values.sockets.jwt.domain }}');
$CONFIG->set('sockets-server-uri', '{{ .Values.sockets.uri }}');
$CONFIG->set('sockets-jwt-domain', '{{ .Values.domain }}');
$CONFIG->set('sockets-server-uri', '{{ .Values.domain }}');
// Twillio configuration
$CONFIG->set('twilio', [
......
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 }}
......@@ -31,6 +31,19 @@ nginx:
requests:
cpu: 200m
sockets:
image:
repository: registry.gitlab.com/minds/sockets
tag: v0.0.1
pullPolicy: IfNotPresent
ingress:
enabled: false
replicas: 1
jwt:
secret: changeme
domain:
uri:
runners:
image:
repository: registry.gitlab.com/minds/engine/runners
......@@ -169,12 +182,6 @@ rabbitmq:
cockroachdb:
Replicas: 1
sockets:
jwt:
secret:
domain:
uri:
twilio:
sid:
secret:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment