Skip to content

Commit

Permalink
Update the operator-artifacts.jsonnet template to include the version…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
dlbock committed Dec 7, 2020
1 parent ca3619c commit 5391a5e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions olm/operator-resources/operator-artifacts.jsonnet
Expand Up @@ -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";
Expand Down

0 comments on commit 5391a5e

Please sign in to comment.