File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,5 +125,7 @@ jobs:
125125 TEST_LABEL : ${{ matrix.cases_subset }}
126126 INGRESS_VERSION : v1beta1
127127 TEST_ENV : CI
128+ POSTGRESQL_IMAGE_REGISTRY : docker.m.daocloud.io
129+ POSTGRESQL_IMAGE_REPOSITORY : bitnami/postgresql
128130 run : |
129131 make e2e-test
Original file line number Diff line number Diff line change @@ -33,15 +33,24 @@ import (
3333)
3434
3535var (
36- valuesTemplate * template.Template
37- _db string
36+ valuesTemplate * template.Template
37+ _db string
38+ postgresImageRegistry string
39+ postgresImageRepository string
3840)
3941
4042func init () {
4143 _db = os .Getenv ("DB" )
4244 if _db == "" {
4345 _db = postgres
4446 }
47+
48+ postgresImageRegistry = os .Getenv ("POSTGRESQL_IMAGE_REGISTRY" )
49+ postgresImageRepository = os .Getenv ("POSTGRESQL_IMAGE_REPOSITORY" )
50+ if postgresImageRegistry != "" && postgresImageRepository == "" {
51+ postgresImageRepository = "bitnami/postgresql"
52+ }
53+
4554 tmpl , err := template .New ("values.yaml" ).Parse (`
4655dashboard:
4756 image:
@@ -209,9 +218,11 @@ postgresql:
209218{{- if ne .DB "postgres" }}
210219 builtin: false
211220{{- end }}
221+ {{- if .PostgresImageRegistry }}
212222 image:
213- registry: docker.m.daocloud.io
214- repository: bitnami/postgresql
223+ registry: {{ .PostgresImageRegistry }}
224+ repository: {{ .PostgresImageRepository }}
225+ {{- end }}
215226 primary:
216227 containerSecurityContext:
217228 enabled: false
Original file line number Diff line number Diff line change @@ -138,9 +138,11 @@ func (f *Framework) deploy() {
138138
139139 buf := bytes .NewBuffer (nil )
140140 _ = valuesTemplate .Execute (buf , map [string ]any {
141- "DB" : _db ,
142- "DSN" : getDSN (),
143- "Tag" : dashboardVersion ,
141+ "DB" : _db ,
142+ "DSN" : getDSN (),
143+ "Tag" : dashboardVersion ,
144+ "PostgresImageRegistry" : postgresImageRegistry ,
145+ "PostgresImageRepository" : postgresImageRepository ,
144146 })
145147
146148 f .Logf ("values: %s" , buf .String ())
You can’t perform that action at this time.
0 commit comments