File tree Expand file tree Collapse file tree 4 files changed +25
-3
lines changed
cf-common-test/tests/deployment Expand file tree Collapse file tree 4 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -221,3 +221,16 @@ tests:
221221 - equal :
222222 path : spec.template.spec.containers[0].image
223223 value : someprivatregistry.local/codefresh/cf-api:master
224+
225+ # For backward compatibility (onprem with private docker registry)
226+ - it : Test main container with private docker registry prefix
227+ values :
228+ - values.yaml
229+ set :
230+ global :
231+ privateRegistry : true
232+ dockerRegistry : myregistry.io/ # / suffix is intentional here
233+ asserts :
234+ - equal :
235+ path : spec.template.spec.containers[0].image
236+ value : myregistry.io/codefresh/cf-api:master
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v2
22appVersion : v0.0.0
33description : Codefresh library chart
44name : cf-common
5- version : 0.0.4
5+ version : 0.0.5
66type : library
77keywords :
88 - codefresh
Original file line number Diff line number Diff line change 22
33Codefresh library chart
44
5- ![ Version: 0.0.4 ] ( https://img.shields.io/badge/Version-0.0.4 -informational?style=flat-square ) ![ Type: library] ( https://img.shields.io/badge/Type-library-informational?style=flat-square ) ![ AppVersion: v0.0.0] ( https://img.shields.io/badge/AppVersion-v0.0.0-informational?style=flat-square )
5+ ![ Version: 0.0.5 ] ( https://img.shields.io/badge/Version-0.0.5 -informational?style=flat-square ) ![ Type: library] ( https://img.shields.io/badge/Type-library-informational?style=flat-square ) ![ AppVersion: v0.0.0] ( https://img.shields.io/badge/AppVersion-v0.0.0-informational?style=flat-square )
66
77## Installing the Chart
88
@@ -18,7 +18,7 @@ Include this chart as a dependency in your `Chart.yaml` e.g.
1818# Chart.yaml
1919dependencies :
2020- name : cf-common
21- version : 0.0.4
21+ version : 0.0.5
2222 repository : https://chartmuseum.codefresh.io/cf-common
2323` ` `
2424
Original file line number Diff line number Diff line change @@ -18,6 +18,15 @@ Usage:
1818 { {- end -} }
1919{ {- end -} }
2020
21+ { {- /*
22+ For backward compatibility (onprem with private docker registry)
23+ */} }
24+ { {- if $.Values.global -} }
25+ { {- if and $.Values.global.privateRegistry $.Values.global.dockerRegistry -} }
26+ { { $registryName = $.Values.global.dockerRegistry | trimSuffix " /" } }
27+ { {- end -} }
28+ { {- end -} }
29+
2130{ {- printf " %s/%s:%s" $registryName $repositoryName $imageTag -} }
2231
2332{ {- end -} }
You can’t perform that action at this time.
0 commit comments