Replies: 1 comment
-
I've managed to make it work using the [name].digest files produced by container_push(). For anyone who stumbles over this... this is what my files look like now. BUILD CONTAINERS = [
"controller",
"webhook",
"cainjector",
]
[container_image(
name = "{}_image".format(name),
base = "@cert_manager_{}_base//image".format(name),
) for name in CONTAINERS]
[container_push(
name = "{}_image.push".format(name),
image = ":{}_image".format(name),
format = "OCI",
registry = "registry.gitlab.com",
repository = "raeumlich/yog-sothoth/cert-manager-{}".format(name),
) for name in CONTAINERS]
jsonnet_to_json(
name = "prod_manifest",
src = "prod.jsonnet",
outs = [
"prod_manifest.yaml",
],
data = [
"@cert_manager_manifest//file",
":controller_image.push.digest",
":webhook_image.push.digest",
":cainjector_image.push.digest",
],
deps = [
"//pkg/jsonnet/k8s",
"//pkg/jsonnet/k8std",
],
yaml_stream = True,
) Jsonnet local controller_digest = importstr 'platform/cert_manager/controller_image.push.digest';
local webhook_digest = importstr 'platform/cert_manager/webhook_image.push.digest';
local cainjector_digest = importstr 'platform/cert_manager/cainjector_image.push.digest';
... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm having a hard time to get the
[name].digest
file produced by container_image() as input to thedata
attribute of the jsonnet_to_json() rule.I found this issue
and this PR
that suggests, that this should be possible, but the Jsonnet compiler complains that it cannot find the file.
In my WORKSPACE:
My BUILD file
The goal is to have the digest in the resulting Kubernetes manifest file.
The data element
@cert_manager_manifest//file
works fine.Here is the error message I get:
Is there any way to make it work?
Beta Was this translation helpful? Give feedback.
All reactions