-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ko build strategy sample #603
Add ko build strategy sample #603
Conversation
The Travis build uses something like |
11d4aec
to
939e255
Compare
name: ko | ||
spec: | ||
buildSteps: | ||
- name: prepare |
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.
Is that possible to use the single build-and-push
step? Or do we some permission problem when building by ko
with root?
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.
One can probably run as root, I was just keeping it similar to the Buildpacks sample where we run the "real" logic as non-root.
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 keep it similar to the Kaniko?
I think it is better to keep it simple as possible.
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.
@zhangtbj I think is fine to have it like this. The more strategies we have that can run non-root the better. Otherwise users will be constrained to their infra. Similar to buildah in IKS.
939e255
to
5cb806d
Compare
Hi @imjasonh ! Could you please review ? |
/lgtm Thanks for adding this! 👍 |
5cb806d
to
05f38d4
Compare
Updated to ko v0.8.1. |
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
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.
Thank you!
name: ko | ||
kind: ClusterBuildStrategy | ||
output: | ||
image: image-registry.openshift-image-registry.svc:5000/build-examples/build-operator |
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.
.. high time we stop using openshift internal registry URLs in examples ( blame me ). Maybe in a different PR :)
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbose78 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
Based on this inquiry, I am adding the ko sample build strategy that I recently created. I added a big note to the documentation about the creative interpretation of the
contextDir
property.Submitter Checklist
Release Notes