Fix adding private repository

`imageRepos` field was removed and the project no longer tries to compose image strings. Now the libraries use `$.values.common.images` to override default images.
This commit is contained in:
paulportela 2021-05-28 17:22:27 -07:00 committed by GitHub
parent e481cbd7c5
commit f7baf1599d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,13 +18,15 @@ local imageName(image) =
// quay.io/coreos/addon-resizer -> $repository/addon-resizer
// grafana/grafana -> grafana $repository/grafana
local withImageRepository(repository) = {
local oldRepos = super._config.imageRepos,
local oldRepos = super.values.common.images,
local substituteRepository(image, repository) =
if repository == null then image else repository + '/' + imageName(image),
values+:: {
imageRepos:: {
[field]: substituteRepository(oldRepos[field], repository)
for field in std.objectFields(oldRepos)
common+:: {
images:: {
[field]: substituteRepository(oldRepos[field], repository)
for field in std.objectFields(oldRepos)
},
},
},
};