fix sync-to-internal-registry.jsonnet
This commit is contained in:
@@ -31,6 +31,10 @@ local withImageRepository(repository) = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
imageName:: imageName,
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
withImageRepository:: withImageRepository,
|
withImageRepository:: withImageRepository,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
local kp = import 'kube-prometheus/kube-prometheus.libsonnet';
|
local kp = import 'kube-prometheus/main.libsonnet';
|
||||||
local l = import 'kube-prometheus/lib/lib.libsonnet';
|
local l = import 'kube-prometheus/addons/config-mixins.libsonnet';
|
||||||
local config = kp._config;
|
local config = kp.values.common;
|
||||||
|
|
||||||
local makeImages(config) = [
|
local makeImages(config) = [
|
||||||
{
|
{
|
||||||
name: config.imageRepos[image],
|
name: config.images[image],
|
||||||
tag: config.versions[image],
|
|
||||||
}
|
}
|
||||||
for image in std.objectFields(config.imageRepos)
|
for image in std.objectFields(config.images)
|
||||||
];
|
];
|
||||||
|
|
||||||
local upstreamImage(image) = '%s:%s' % [image.name, image.tag];
|
local upstreamImage(image) = '%s' % [image.name];
|
||||||
local downstreamImage(registry, image) = '%s/%s:%s' % [registry, l.imageName(image.name), image.tag];
|
local downstreamImage(registry, image) = '%s/%s' % [registry, l.imageName(image.name)];
|
||||||
|
|
||||||
local pullPush(image, newRegistry) = [
|
local pullPush(image, newRegistry) = [
|
||||||
'docker pull %s' % upstreamImage(image),
|
'docker pull %s' % upstreamImage(image),
|
||||||
|
|||||||
Reference in New Issue
Block a user