Skip to content

Commit b4a4acd

Browse files
committed
update streaming to match upstream mastodon chart
1 parent b8dd68f commit b4a4acd

File tree

1 file changed

+44
-8
lines changed

1 file changed

+44
-8
lines changed

charts/mastodon/templates/deployment-streaming.yaml

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ metadata:
44
name: {{ include "mastodon.fullname" . }}-streaming
55
labels:
66
{{- include "mastodon.labels" . | nindent 4 }}
7+
{{- with .Values.mastodon.streaming.labels }}
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}
710
annotations:
8-
{{- with (default .Values.deploymentAnnotations .Values.mastodon.streaming.deploymentAnnotations) }}
11+
{{- with .Values.deploymentAnnotations }}
12+
{{- toYaml . | nindent 4 }}
13+
{{- end }}
14+
{{- with .Values.mastodon.streaming.annotations }}
915
{{- toYaml . | nindent 4 }}
1016
{{- end }}
1117
spec:
@@ -23,13 +29,23 @@ spec:
2329
template:
2430
metadata:
2531
annotations:
26-
{{- with (default .Values.podAnnotations .Values.mastodon.streaming.podAnnotations) }}
32+
{{- with .Values.podAnnotations }}
33+
{{- toYaml . | nindent 8 }}
34+
{{- end }}
35+
{{- with .Values.mastodon.streaming.podAnnotations }}
2736
{{- toYaml . | nindent 8 }}
2837
{{- end }}
2938
# roll the pods to pick up any db migrations or other changes
3039
{{- include "mastodon.rollingPodAnnotations" . | nindent 8 }}
3140
labels:
41+
{{- include "mastodon.globalLabels" . | nindent 8 }}
3242
{{- include "mastodon.selectorLabels" . | nindent 8 }}
43+
{{- with .Values.mastodon.podLabels }}
44+
{{- toYaml . | nindent 8 }}
45+
{{- end }}
46+
{{- with .Values.mastodon.streaming.podLabels }}
47+
{{- toYaml . | nindent 8 }}
48+
{{- end }}
3349
app.kubernetes.io/component: streaming
3450
spec:
3551
{{- with .Values.imagePullSecrets }}
@@ -41,10 +57,19 @@ spec:
4157
securityContext:
4258
{{- toYaml . | nindent 8 }}
4359
{{- end }}
44-
{{- if .Values.mastodon.extraVolumes }}
60+
{{- if or .Values.mastodon.extraVolumes .Values.mastodon.streaming.extraCerts }}
4561
volumes:
46-
{{- if gt (len .Values.mastodon.extraVolumes) 0 }}
47-
{{ toYaml .Values.mastodon.extraVolumes | nindent 8}}
62+
{{- with .Values.mastodon.extraVolumes }}
63+
{{ toYaml . | nindent 8}}
64+
{{- end }}
65+
{{- with .Values.mastodon.streaming.extraCerts }}
66+
{{- $name := .name | default "extra-certs" }}
67+
- name: {{ $name }}
68+
secret:
69+
secretName: {{ .existingSecret }}
70+
items:
71+
- key: ca.crt
72+
path: trusted-ca.crt
4873
{{- end }}
4974
{{- end }}
5075
containers:
@@ -66,6 +91,10 @@ spec:
6691
name: {{ .Values.mastodon.extraEnvFrom }}
6792
{{- end}}
6893
env:
94+
{{- with .Values.mastodon.streaming.extraCerts }}
95+
- name: "NODE_EXTRA_CA_CERTS"
96+
value: "/usr/local/share/ca-certificates/trusted-ca.crt"
97+
{{- end }}
6998
- name: "DB_PASS"
7099
valueFrom:
71100
secretKeyRef:
@@ -95,11 +124,14 @@ spec:
95124
{{- with .Values.mastodon.extraEnvVars }}
96125
{{- toYaml . | nindent 12 }}
97126
{{- end }}
98-
{{- if or .Values.mastodon.extraVolumeMounts }}
99127
volumeMounts:
100-
{{- if gt (len .Values.mastodon.extraVolumeMounts) 0 }}
101-
{{- toYaml .Values.mastodon.extraVolumeMounts | nindent 12 }}
128+
{{- with .Values.mastodon.extraVolumeMounts }}
129+
{{- toYaml . | nindent 12 }}
102130
{{- end }}
131+
{{- with .Values.mastodon.streaming.extraCerts }}
132+
{{- $name := .name | default "extra-certs" }}
133+
- name: {{ $name }}
134+
mountPath: "/usr/local/share/ca-certificates"
103135
{{- end }}
104136
ports:
105137
- name: streaming
@@ -132,6 +164,10 @@ spec:
132164
affinity:
133165
{{- toYaml . | nindent 8 }}
134166
{{- end }}
167+
{{- with (default .Values.topologySpreadConstraints .Values.mastodon.streaming.topologySpreadConstraints) }}
168+
topologySpreadConstraints:
169+
{{- toYaml . | nindent 8 }}
170+
{{- end }}
135171
{{- with .Values.tolerations }}
136172
tolerations:
137173
{{- toYaml . | nindent 8 }}

0 commit comments

Comments
 (0)