Skip to content

Commit 2efdb42

Browse files
authored
Merge pull request #1297 from MinerYang/external_reids__url
fix external redis url
2 parents 7cbed7d + 7ad559a commit 2efdb42

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

templates/_helpers.tpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,40 +168,40 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
168168
{{- end }}
169169
{{- end -}}
170170

171-
/*scheme://[redis:password@]host:port[/master_set]*/
171+
/*scheme://[:password@]host:port[/master_set]*/
172172
{{- define "harbor.redis.url" -}}
173173
{{- with .Values.redis }}
174174
{{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }}
175-
{{- $cred := ternary (printf "redis:%s@" (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }}
175+
{{- $cred := ternary (printf ":%s@" (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }}
176176
{{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) $cred (include "harbor.redis.addr" $) $path -}}
177177
{{- end }}
178178
{{- end -}}
179179

180-
/*scheme://[redis:password@]addr/db_index?idle_timeout_seconds=30*/
180+
/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/
181181
{{- define "harbor.redis.urlForCore" -}}
182182
{{- with .Values.redis }}
183183
{{- $index := ternary "0" .external.coreDatabaseIndex (eq .type "internal") }}
184184
{{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}}
185185
{{- end }}
186186
{{- end -}}
187187

188-
/*scheme://[redis:password@]addr/db_index*/
188+
/*scheme://[:password@]addr/db_index*/
189189
{{- define "harbor.redis.urlForJobservice" -}}
190190
{{- with .Values.redis }}
191191
{{- $index := ternary "1" .external.jobserviceDatabaseIndex (eq .type "internal") }}
192192
{{- printf "%s/%s" (include "harbor.redis.url" $) $index -}}
193193
{{- end }}
194194
{{- end -}}
195195

196-
/*scheme://[redis:password@]addr/db_index?idle_timeout_seconds=30*/
196+
/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/
197197
{{- define "harbor.redis.urlForRegistry" -}}
198198
{{- with .Values.redis }}
199199
{{- $index := ternary "2" .external.registryDatabaseIndex (eq .type "internal") }}
200200
{{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}}
201201
{{- end }}
202202
{{- end -}}
203203

204-
/*scheme://[redis:password@]addr/db_index?idle_timeout_seconds=30*/
204+
/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/
205205
{{- define "harbor.redis.urlForTrivy" -}}
206206
{{- with .Values.redis }}
207207
{{- $index := ternary "5" .external.trivyAdapterIndex (eq .type "internal") }}

0 commit comments

Comments
 (0)