File tree Expand file tree Collapse file tree 11 files changed +194
-1
lines changed Expand file tree Collapse file tree 11 files changed +194
-1
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,36 @@ Get the redis secret.
171
171
{ {- end -} }
172
172
{ {- end -} }
173
173
174
+ { {/*
175
+ Get the redis secret (sidekiq).
176
+ */} }
177
+ { {- define " mastodon.redis.sidekiq.secretName" -} }
178
+ { {- if .Values.redis.sidekiq.auth.existingSecret } }
179
+ { {- printf " %s" (tpl .Values.redis.sidekiq.auth.existingSecret $) -} }
180
+ { {- else if .Values.redis.auth.existingSecret } }
181
+ { {- printf " %s" (tpl .Values.redis.auth.existingSecret $) -} }
182
+ { {- else if .Values.redis.existingSecret } }
183
+ { {- printf " %s" (tpl .Values.redis.existingSecret $) -} }
184
+ { {- else -} }
185
+ { {- printf " %s-redis" (tpl .Release.Name $) -} }
186
+ { {- end -} }
187
+ { {- end -} }
188
+
189
+ { {/*
190
+ Get the redis secret (cache).
191
+ */} }
192
+ { {- define " mastodon.redis.cache.secretName" -} }
193
+ { {- if .Values.redis.cache.auth.existingSecret } }
194
+ { {- printf " %s" (tpl .Values.redis.cache.auth.existingSecret $) -} }
195
+ { {- else if .Values.redis.auth.existingSecret } }
196
+ { {- printf " %s" (tpl .Values.redis.auth.existingSecret $) -} }
197
+ { {- else if .Values.redis.existingSecret } }
198
+ { {- printf " %s" (tpl .Values.redis.existingSecret $) -} }
199
+ { {- else -} }
200
+ { {- printf " %s-redis" (tpl .Release.Name $) -} }
201
+ { {- end -} }
202
+ { {- end -} }
203
+
174
204
{ {/*
175
205
Return true if a mastodon secret object should be created
176
206
*/} }
Original file line number Diff line number Diff line change 72
72
REDIS_HOST : {{ required "When the redis chart is disabled .Values.redis.hostname is required" .Values.redis.hostname }}
73
73
{{- end }}
74
74
REDIS_PORT : {{ .Values.redis.port | default "6379" | quote }}
75
+ {{- if .Values.redis.sidekiq.enabled }}
76
+ {{- if .Values.redis.sidekiq.hostname }}
77
+ SIDEKIQ_REDIS_HOST : {{ .Values.redis.sidekiq.hostname }}
78
+ {{- else }}
79
+ SIDEKIQ_REDIS_HOST : {{ .Values.redis.hostname }}
80
+ {{- end }}
81
+ {{- if .Values.redis.sidekiq.port }}
82
+ SIDEKIQ_REDIS_PORT : {{ .Values.redis.sidekiq.port | quote }}
83
+ {{- else }}
84
+ SIDEKIQ_REDIS_PORT : {{ .Values.redis.port | default "6379" | quote }}
85
+ {{- end }}
86
+ {{- end }}
87
+ {{- if .Values.redis.cache.enabled }}
88
+ {{- if .Values.redis.cache.hostname }}
89
+ CACHE_REDIS_HOST : {{ .Values.redis.cache.hostname }}
90
+ {{- else }}
91
+ CACHE_REDIS_HOST : {{ .Values.redis.hostname}}
92
+ {{- end }}
93
+ {{- if .Values.redis.cache.port }}
94
+ CACHE_REDIS_PORT : {{ .Values.redis.cache.port | quote }}
95
+ {{- else }}
96
+ CACHE_REDIS_PORT : {{ .Values.redis.port | default "6379" | quote }}
97
+ {{- end }}
98
+ {{- end }}
75
99
{{- if .Values.mastodon.s3.enabled }}
76
100
S3_BUCKET : {{ .Values.mastodon.s3.bucket }}
77
101
S3_ENABLED : " true"
@@ -389,4 +413,3 @@ data:
389
413
{{- with .Values.timezone }}
390
414
TZ : {{ . | quote }}
391
415
{{- end }}
392
-
Original file line number Diff line number Diff line change 65
65
secretKeyRef :
66
66
name : {{ template "mastodon.redis.secretName" . }}
67
67
key : redis-password
68
+ {{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
69
+ - name : " SIDEKIQ_REDIS_PASSWORD"
70
+ valueFrom :
71
+ secretKeyRef :
72
+ name : {{ template "mastodon.redis.sidekiq.secretName" . }}
73
+ key : redis-password
74
+ {{- end }}
75
+ {{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
76
+ - name : " CACHE_REDIS_PASSWORD"
77
+ valueFrom :
78
+ secretKeyRef :
79
+ name : {{ template "mastodon.redis.cache.secretName" . }}
80
+ key : redis-password
81
+ {{- end }}
68
82
{{- if and .Values.elasticsearch.existingSecret (or .Values.elasticsearch.enabled .Values.elasticsearch.hostname) }}
69
83
- name : " ES_PASS"
70
84
valueFrom :
Original file line number Diff line number Diff line change @@ -126,6 +126,20 @@ spec:
126
126
secretKeyRef :
127
127
name : {{ template "mastodon.redis.secretName" $context }}
128
128
key : redis-password
129
+ {{- if and $context.Values.redis.sidekiq.enabled $context.Values.redis.sidekiq.auth.existingSecret }}
130
+ - name : " SIDEKIQ_REDIS_PASSWORD"
131
+ valueFrom :
132
+ secretKeyRef :
133
+ name : {{ template "mastodon.redis.sidekiq.secretName" $context }}
134
+ key : redis-password
135
+ {{- end }}
136
+ {{- if and $context.Values.redis.cache.enabled $context.Values.redis.cache.auth.existingSecret }}
137
+ - name : " CACHE_REDIS_PASSWORD"
138
+ valueFrom :
139
+ secretKeyRef :
140
+ name : {{ template "mastodon.redis.cache.secretName" $context }}
141
+ key : redis-password
142
+ {{- end }}
129
143
{{- if and $context.Values.elasticsearch.existingSecret (or $context.Values.elasticsearch.enabled $context.Values.elasticsearch.hostname) }}
130
144
- name : " ES_PASS"
131
145
valueFrom :
Original file line number Diff line number Diff line change @@ -103,6 +103,20 @@ spec:
103
103
secretKeyRef :
104
104
name : {{ template "mastodon.redis.secretName" . }}
105
105
key : redis-password
106
+ {{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
107
+ - name : " SIDEKIQ_REDIS_PASSWORD"
108
+ valueFrom :
109
+ secretKeyRef :
110
+ name : {{ template "mastodon.redis.sidekiq.secretName" . }}
111
+ key : redis-password
112
+ {{- end }}
113
+ {{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
114
+ - name : " CACHE_REDIS_PASSWORD"
115
+ valueFrom :
116
+ secretKeyRef :
117
+ name : {{ template "mastodon.redis.cache.secretName" . }}
118
+ key : redis-password
119
+ {{- end }}
106
120
- name : " PORT"
107
121
value : {{ .Values.mastodon.streaming.port | quote }}
108
122
ports :
Original file line number Diff line number Diff line change @@ -101,6 +101,20 @@ spec:
101
101
secretKeyRef :
102
102
name : {{ template "mastodon.redis.secretName" . }}
103
103
key : redis-password
104
+ {{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
105
+ - name : " SIDEKIQ_REDIS_PASSWORD"
106
+ valueFrom :
107
+ secretKeyRef :
108
+ name : {{ template "mastodon.redis.sidekiq.secretName" . }}
109
+ key : redis-password
110
+ {{- end }}
111
+ {{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
112
+ - name : " CACHE_REDIS_PASSWORD"
113
+ valueFrom :
114
+ secretKeyRef :
115
+ name : {{ template "mastodon.redis.cache.secretName" . }}
116
+ key : redis-password
117
+ {{- end }}
104
118
{{- if and .Values.elasticsearch.existingSecret (or .Values.elasticsearch.enabled .Values.elasticsearch.hostname) }}
105
119
- name : " ES_PASS"
106
120
valueFrom :
Original file line number Diff line number Diff line change 67
67
secretKeyRef :
68
68
name : {{ template "mastodon.redis.secretName" . }}
69
69
key : redis-password
70
+ {{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
71
+ - name : " SIDEKIQ_REDIS_PASSWORD"
72
+ valueFrom :
73
+ secretKeyRef :
74
+ name : {{ template "mastodon.redis.sidekiq.secretName" . }}
75
+ key : redis-password
76
+ {{- end }}
77
+ {{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
78
+ - name : " CACHE_REDIS_PASSWORD"
79
+ valueFrom :
80
+ secretKeyRef :
81
+ name : {{ template "mastodon.redis.cache.secretName" . }}
82
+ key : redis-password
83
+ {{- end }}
70
84
- name : " PORT"
71
85
value : {{ .Values.mastodon.web.port | quote }}
72
86
{{- if (not .Values.mastodon.s3.enabled) }}
Original file line number Diff line number Diff line change 67
67
secretKeyRef :
68
68
name : {{ template "mastodon.redis.secretName" . }}
69
69
key : redis-password
70
+ {{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
71
+ - name : " SIDEKIQ_REDIS_PASSWORD"
72
+ valueFrom :
73
+ secretKeyRef :
74
+ name : {{ template "mastodon.redis.sidekiq.secretName" . }}
75
+ key : redis-password
76
+ {{- end }}
77
+ {{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
78
+ - name : " CACHE_REDIS_PASSWORD"
79
+ valueFrom :
80
+ secretKeyRef :
81
+ name : {{ template "mastodon.redis.cache.secretName" . }}
82
+ key : redis-password
83
+ {{- end }}
70
84
{{- if and .Values.elasticsearch.existingSecret (or .Values.elasticsearch.enabled .Values.elasticsearch.hostname) }}
71
85
- name : " ES_PASS"
72
86
valueFrom :
Original file line number Diff line number Diff line change 72
72
secretKeyRef :
73
73
name : {{ template "mastodon.redis.secretName" . }}
74
74
key : redis-password
75
+ {{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
76
+ - name : " SIDEKIQ_REDIS_PASSWORD"
77
+ valueFrom :
78
+ secretKeyRef :
79
+ name : {{ template "mastodon.redis.sidekiq.secretName" . }}
80
+ key : redis-password
81
+ {{- end }}
82
+ {{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
83
+ - name : " CACHE_REDIS_PASSWORD"
84
+ valueFrom :
85
+ secretKeyRef :
86
+ name : {{ template "mastodon.redis.cache.secretName" . }}
87
+ key : redis-password
88
+ {{- end }}
75
89
- name : " PORT"
76
90
value : {{ .Values.mastodon.web.port | quote }}
77
91
{{- if (not .Values.mastodon.s3.enabled) }}
Original file line number Diff line number Diff line change 67
67
secretKeyRef :
68
68
name : {{ template "mastodon.redis.secretName" . }}
69
69
key : redis-password
70
+ {{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
71
+ - name : " SIDEKIQ_REDIS_PASSWORD"
72
+ valueFrom :
73
+ secretKeyRef :
74
+ name : {{ template "mastodon.redis.sidekiq.secretName" . }}
75
+ key : redis-password
76
+ {{- end }}
77
+ {{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
78
+ - name : " CACHE_REDIS_PASSWORD"
79
+ valueFrom :
80
+ secretKeyRef :
81
+ name : {{ template "mastodon.redis.cache.secretName" . }}
82
+ key : redis-password
83
+ {{- end }}
70
84
- name : " PORT"
71
85
value : {{ .Values.mastodon.web.port | quote }}
72
86
{{- if (not .Values.mastodon.s3.enabled) }}
You can’t perform that action at this time.
0 commit comments