ungleich-k8s/apps/workadventure/v4/templates/pusher-deployment.yaml
2022-10-08 21:45:35 +02:00

74 lines
2.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
name: {{ .Release.Name}}-pusher
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: pusher
strategy:
type: Recreate
template:
metadata:
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: pusher
annotations:
checksum/config: {{ include (print $.Template.BasePath "/waconf.yaml") . | sha256sum }}
spec:
containers:
- command:
- yarn
- run
- runprod
env:
- name: ADMIN_API_TOKEN
- name: API_URL
value: {{ .Release.Name}}-back:50051
- name: DEBUG
value: socket:*
- name: DISABLE_ANONYMOUS
- name: JITSI_ISS
- name: JITSI_URL
- name: OPID_CLIENT_ID
- name: OPID_CLIENT_ISSUER
- name: OPID_CLIENT_REDIRECT_URL
- name: OPID_CLIENT_SECRET
- name: OPID_PROFILE_SCREEN_PROVIDER
- name: SECRET_JITSI_KEY
- name: SECRET_KEY
value: yourSecretKey
- name: STARTUP_COMMAND_1
value: yarn install
- name: STARTUP_COMMAND_2
value: while [ ! -f /usr/src/app/src/Messages/generated/messages_pb.js ]; do sleep 1; done
envFrom:
- configMapRef:
name: {{ .Release.Name }}-wa-con
image: thecodingmachine/workadventure-pusher:{{ .Chart.AppVersion }}
name: pusher
ports:
- containerPort: 8080
securityContext:
runAsUser: 0
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-pusher
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: pusher
spec:
type: ClusterIP
ports:
- port: 80
name: http
targetPort: 8080
selector:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: pusher