kubernetes-sigs / cli-utils

This repo contains binaries that built from libraries in cli-runtime.
Apache License 2.0
155 stars 77 forks source link

Add conversion func for status-policy #637

Closed fsommar closed 3 months ago

fsommar commented 5 months ago

Hi 👋

This change is intended for Kpt. We use kpt live apply in our CI/CD pipelines, but we don't need it saving statuses for all resources into the inventory. We want to be able to pass --status-policy=none.

I considered adding support for changing the status-policy flag in kapply as well, but I couldn't think of a way to introduce the flag without introducing it for all subcommands, or copying the description across for the applicable subcommands. Let me know if you want me to implement the flag here too.

k8s-ci-robot commented 5 months ago

Hi @fsommar. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
mortent commented 4 months ago

/ok-to-test

ash2k commented 4 months ago

/unassign

justinsb commented 3 months ago

Thanks @fsommar

/approve /lgtm

(Let's see if I have permissions here!)

tomasaschan commented 3 months ago

/assign seans3

mortent commented 3 months ago

/approve

k8s-ci-robot commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fsommar, justinsb, mortent

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/cli-utils/blob/master/OWNERS)~~ [mortent] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
fsommar commented 3 months ago

Thank you @mortent! Can I get help with creating a tag to be used in https://github.com/kptdev/kpt/pull/4129?

cc @justinsb

karlkfi commented 3 months ago

I'll be doing some other changes for watch filtering soon, so I'll cut a cli-utils release afterwards.

karlkfi commented 3 months ago

As for kapply, I think adding a global flag is probably fine, if you add it and tests to exercise it.

tomasaschan commented 3 months ago

Pending that cli-utils release, will kptdev/kpt#4129 be accepted if it pins cli-utils to the merge commit of this change, even if there is no release that has this change yet?

(We've been blocked on these PRs for over a month, and it doesn't feel like fun to block even more on some other, unrelated, work...)

fsommar commented 3 months ago

There's a v0.36.0 of cli-utils released. I've upgraded to that version in my PR in kptdev/kpt: https://github.com/kptdev/kpt/pull/4129/commits/5c792649490fb69df8acb7d1c2d7104a88369d0a.