Skip to content
Snippets Groups Projects
Commit 9e892651 authored by Abhilash Pallerlamudi's avatar Abhilash Pallerlamudi
Browse files

fix sync-to-internal-registry.jsonnet

parent 996d5163
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,10 @@ local withImageRepository(repository) = { ...@@ -31,6 +31,10 @@ local withImageRepository(repository) = {
}, },
}; };
{
imageName:: imageName,
}
{ {
withImageRepository:: withImageRepository, withImageRepository:: withImageRepository,
} }
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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment