2020-06-29 21:58:48 +10:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ include "mastodon.fullname" . }}-streaming
|
|
|
|
labels:
|
|
|
|
{{- include "mastodon.labels" . | nindent 4 }}
|
|
|
|
spec:
|
2022-11-11 09:24:39 +11:00
|
|
|
{{- if not .Values.autoscaling.enabled }}
|
2020-06-29 21:58:48 +10:00
|
|
|
replicas: {{ .Values.replicaCount }}
|
2022-11-11 09:24:39 +11:00
|
|
|
{{- end }}
|
2020-06-29 21:58:48 +10:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "mastodon.selectorLabels" . | nindent 6 }}
|
2022-11-09 03:21:06 +11:00
|
|
|
app.kubernetes.io/component: streaming
|
2020-06-29 21:58:48 +10:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
annotations:
|
2022-11-11 05:10:38 +11:00
|
|
|
{{- with .Values.podAnnotations }}
|
2020-06-29 21:58:48 +10:00
|
|
|
{{- toYaml . | nindent 8 }}
|
2022-11-11 05:10:38 +11:00
|
|
|
{{- end }}
|
|
|
|
# roll the pods to pick up any db migrations or other changes
|
|
|
|
{{- include "mastodon.rollingPodAnnotations" . | nindent 8 }}
|
2020-06-29 21:58:48 +10:00
|
|
|
labels:
|
|
|
|
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
2022-11-09 03:21:06 +11:00
|
|
|
app.kubernetes.io/component: streaming
|
2020-06-29 21:58:48 +10:00
|
|
|
spec:
|
|
|
|
{{- with .Values.imagePullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
serviceAccountName: {{ include "mastodon.serviceAccountName" . }}
|
2022-11-11 09:24:39 +11:00
|
|
|
{{- with .Values.podSecurityContext }}
|
2020-06-29 21:58:48 +10:00
|
|
|
securityContext:
|
2022-11-11 09:24:39 +11:00
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2020-06-29 21:58:48 +10:00
|
|
|
containers:
|
|
|
|
- name: {{ .Chart.Name }}
|
2022-11-11 09:24:39 +11:00
|
|
|
{{- with .Values.securityContext }}
|
2020-06-29 21:58:48 +10:00
|
|
|
securityContext:
|
2022-11-11 09:24:39 +11:00
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
{{- end }}
|
2020-06-29 21:58:48 +10:00
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
|
command:
|
|
|
|
- node
|
|
|
|
- ./streaming
|
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
|
|
|
name: {{ include "mastodon.fullname" . }}-env
|
|
|
|
env:
|
|
|
|
- name: "DB_PASS"
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
2022-08-11 01:12:58 +10:00
|
|
|
name: {{ template "mastodon.postgresql.secretName" . }}
|
2022-11-09 03:18:57 +11:00
|
|
|
key: password
|
2020-06-29 21:58:48 +10:00
|
|
|
- name: "REDIS_PASSWORD"
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
2022-08-11 01:12:58 +10:00
|
|
|
name: {{ template "mastodon.redis.secretName" . }}
|
2020-06-29 21:58:48 +10:00
|
|
|
key: redis-password
|
|
|
|
- name: "PORT"
|
2021-02-15 18:00:54 +11:00
|
|
|
value: {{ .Values.mastodon.streaming.port | quote }}
|
2020-06-29 21:58:48 +10:00
|
|
|
ports:
|
|
|
|
- name: streaming
|
2021-02-15 18:00:54 +11:00
|
|
|
containerPort: {{ .Values.mastodon.streaming.port }}
|
2020-06-29 21:58:48 +10:00
|
|
|
protocol: TCP
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /api/v1/streaming/health
|
|
|
|
port: streaming
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /api/v1/streaming/health
|
|
|
|
port: streaming
|
2022-11-11 09:24:39 +11:00
|
|
|
{{- with .Values.resources }}
|
2020-06-29 21:58:48 +10:00
|
|
|
resources:
|
2022-11-11 09:24:39 +11:00
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
{{- end }}
|
2020-06-29 21:58:48 +10:00
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.affinity }}
|
|
|
|
affinity:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|