From 5391a5e10bf7b6c83f6aaed70338470dc3689b54 Mon Sep 17 00:00:00 2001 From: Dahlia Bock Date: Mon, 7 Dec 2020 17:04:01 -0600 Subject: [PATCH] Update the operator-artifacts.jsonnet template to include the version of the instana/instana-agent-operator image tag in the generated instana-agent-operator.yaml This will help ensure that the latest operator image version does not get pulled if it requires the customer to also update the instana-agent-operator.yaml with the latest changes. --- olm/operator-resources/operator-artifacts.jsonnet | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/olm/operator-resources/operator-artifacts.jsonnet b/olm/operator-resources/operator-artifacts.jsonnet index d9f315e1..ab883090 100644 --- a/olm/operator-resources/operator-artifacts.jsonnet +++ b/olm/operator-resources/operator-artifacts.jsonnet @@ -10,9 +10,15 @@ local operatorResourcesWithVersion = std.map(addVersionToMetadataLabels, operato local addVersionToDeploymentSpec(deployment) = deployment + { spec+: { - template+: { metadata+: { labels+: - super.labels + { "app.kubernetes.io/version": version } - }} + template+: { + metadata+: { + labels+: super.labels + { "app.kubernetes.io/version": version } + }, + spec+: + super.spec + { + containers: std.mapWithIndex(function(i, c) if i == 0 then c + {image: c.image + ":" + version} else c, super.containers) + } + } } }; local isDeployment(res) = res.kind == "Deployment";