Proposal: only use build-templates
drnic opened this issue · 6 comments
Currently knctl install
does not install any build templates, and both knctl deploy
and knctl build create
do not use them by default (without --template
flag). Instead, they manually construct build steps that mirror an existing template https://github.com/knative/build-templates/tree/master/kaniko
Perhaps we move towards knctl install
preinstalling some/all the known build template CRDs, and knctl deploy
always using one, e.g. --template kaniko
by default.
This would make it easier to explain what the default behavior is - it would show up in knctl deploy --help
as the default value for --template
flag.
This topic ("what are the default steps?") came up in the comments of one of my blog posts https://starkandwayne.com/blog/build-docker-images-inside-kubernetes-with-knative-build/#comment-4189493232
@drnic it's definitely an interesting way. main reason i didnt go that route so far was to avoid figuring out experience of dealing with build templates but may be it's time. also would have to figure out how to inject local source code for -d flag to continue to work.
What do you mean "figure out how to inject source code" with build-templates? Isn't this what we can already do now with --directory=$PWD --template buildpack
?
What do you mean "figure out how to inject source code" with build-templates? Isn't this what we can already do now with --directory=$PWD --template buildpack?
yeah you are right, i forgot that that piece doesnt go into build-template.
Bah, did it again on a new cluster. Forgot to pre-install buildpack template and I sat there waiting until I looked in knative-build
logs and found "msg":"Failed to validate build: buildtemplates.build.knative.dev \"buildpack\" not found"
Can I submit a PR where the buildpack
template is preinstalled during knctl install
?