-
Notifications
You must be signed in to change notification settings - Fork 186
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 support for --local for ko #949
Conversation
Hi @yuzp1996. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
DEVELOPMENT.md
Outdated
@@ -230,7 +230,8 @@ If the files in `pkg/apis` are updated we need to run `codegen` scripts | |||
``` | |||
|
|||
### Setup | |||
- Set `KO_DOCKER_ENV` environment variable ([ko#usage](https://github.com/google/ko#usage)) | |||
- Set `KO_DOCKER_REPO` environment variable ([ko#usage](https://github.com/google/ko#usage)) | |||
- If you want to use local image rather than pushing image to registry you can set flags with `KO_FALGS=--local` when you run 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.
- If you want to use local image rather than pushing image to registry you can set flags with `KO_FALGS=--local` when you run operator | |
- If you want to use local image rather than pushing image to registry you can set flags with `KO_FLAGS=--local` when you run operator |
Makefile
Outdated
@@ -97,7 +97,7 @@ get-releases: | | |||
apply: | $(KO) $(KUSTOMIZE) get-releases ; $(info $(M) ko apply on $(TARGET)) @ ## Apply config to the current cluster | |||
@ ## --load-restrictor LoadRestrictionsNone is needed in kustomize build as files which not in child tree of kustomize base are pulled | |||
@ ## https://github.com/kubernetes-sigs/kustomize/issues/766 | |||
$Q $(KUSTOMIZE) build --load-restrictor LoadRestrictionsNone config/$(TARGET)/overlays/default | $(KO) apply $(PLATFORM) -f - | |||
$Q $(KUSTOMIZE) build --load-restrictor LoadRestrictionsNone config/$(TARGET)/overlays/default | $(KO) apply $(KO_FALGS) $(PLATFORM) -f - |
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.
$Q $(KUSTOMIZE) build --load-restrictor LoadRestrictionsNone config/$(TARGET)/overlays/default | $(KO) apply $(KO_FALGS) $(PLATFORM) -f - | |
$Q $(KUSTOMIZE) build --load-restrictor LoadRestrictionsNone config/$(TARGET)/overlays/default | $(KO) apply $(KO_FLAGS) $(PLATFORM) -f - |
Thank you for the PR. 😃 |
When try to run operator with code you must set ENV KO_DOCKER_REPO while it is not convenient for developer. Now adding a flags that will be used by KO when you run `make apply`. So you can add any flags you want to KO now. Signed-off-by: yuzhipeng <yuzp1996@qq.com>
330f25e
to
796eafa
Compare
Thanks for your review! I have changed FALGS to FLAGS. Nice catch! |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: 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 |
/lgtm |
When try to run operator with code you must set ENV KO_DOCKER_REPO
while it is not convenient for developer.
Now adding a flags that will be used by ko when you run
make apply
.So you can add any flags you want to ko now.
Issue: #950
Signed-off-by: yuzhipeng yuzp1996@qq.com
Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lint
before submitting a PRSee the contribution guide for more details.
Release Notes