-
Notifications
You must be signed in to change notification settings - Fork 10
Parameterize builder and util images in build template #23
Conversation
The builder template is used twice within the build template, as is the util image. We can centralize the definition of the builder image by using a parameter. In general, builds should not override the run or builder image params. It is still useful to parameterize them in order to make it easier for tooling to discover or update the value cluster wide. Refs projectriff#22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
riff-cnb-clusterbuildtemplate.yaml
Outdated
default: projectriff/builder:latest | ||
- name: UTIL_IMAGE | ||
description: The util image provides pack utilities to analyze and export built images. | ||
default: packs/util |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use :latest
or pin to a release, like :v3alpha1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think a tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turns out packs/util is deprecated
- replace util image with builder (packs/util is deprecated) - move cache dir to /layers - manually do what knative-helper did in the helper step - merge riff.toml creation into the prepare step - use flags instead of env vars
Adopted changes shown in https://github.com/knative/build-templates/pull/67/files#diff-21fea67d0c528b683d3f9785c45e38c7
|
If desirable, we could also flatten each pack lifecycle step into a single container. |
Trying this with the latest changes I get
do we need to change projectriff/builder? |
args: | ||
- "-c" | ||
- > | ||
chown -R "${USER_ID}:${GROUP_ID}" "/builder/home" && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment that explains why those 2 first lines are necessary? Never got to tracking that down
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a comment. The packs tasks run as the pack user, and still need to be able to read these files. This behavior used to be packaged up in the /lifecycle/knative-helper
which has since been removed.
The builder template is used twice within the build template, as is the
util image. We can centralize the definition of the builder image by
using a parameter. In general, builds should not override the run or
builder image params. It is still useful to parameterize them in order
to make it easier for tooling to discover or update the value cluster
wide.
Refs #22