knctl icon indicating copy to clipboard operation
knctl copied to clipboard

Proposal: only use build-templates

Open drnic opened this issue 7 years ago • 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 avatar Nov 13 '18 06:11 drnic

@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.

cppforlife avatar Nov 13 '18 22:11 cppforlife

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?

drnic avatar Nov 13 '18 23:11 drnic

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.

cppforlife avatar Nov 14 '18 00:11 cppforlife

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?

drnic avatar Nov 27 '18 07:11 drnic

pr sounds good. make sure to grab versioned yaml url.

Sent from my iPhone

On Nov 26, 2018, at 11:23 PM, Dr Nic Williams [email protected] wrote:

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?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

cppforlife avatar Nov 27 '18 18:11 cppforlife

Relates to #46

drnic avatar Nov 28 '18 04:11 drnic