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

Feature Request: Optionally skip waiting for reconciliation #631

Closed manfredlift closed 2 months ago

manfredlift commented 11 months ago

The waiting for reconciliation feature can be undesirable in a lot of real-world uses of cli-utils. Imagine waiting for a DaemonSet across many nodes to reconcile (where some of the nodes might be unhealthy), in that case the reconciliation might never finish regardless of the wait time. Some users like myself wish to use kapply as a drop-in replacement for kubectl just for the pruning feature and don't need the reconciliation, which makes the tool infeasibly slow to use when using to apply many objects. I do realise that some features like apply-time mutation might not work reliably when used together with this feature -- perhaps we can make the skip reconciliation and apply-time mutation features mutually exclusive or mark the skip reconciliation option as dangerous.

I propose adding support to optionally skip waiting for reconciliation. I've opened a draft PR with a patch that works for myself -- I can obviously add tests etc if the patch looks feasible: https://github.com/kubernetes-sigs/cli-utils/pull/630

manfredlift commented 11 months ago

@karlkfi / @seans3 any thoughts on this?

b1zzu commented 9 months ago

While having a similar problem it would be nice if it's possible to skip reconciliation only for specific resources with a label

config.kubernetes.io/skip-waiting-for-reconciliation: "true"
k8s-triage-robot commented 6 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 5 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 4 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 4 months ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes-sigs/cli-utils/issues/631#issuecomment-2054015347): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ 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.
karlkfi commented 3 months ago

Can you provide some more use cases that explain why you wouldn't want to wait for reconciliation?

Reconciliation is effectively required for the dependency ordering (implicit and explicit) and apply-time-mutation.

I can imagine use cases without apply-time-mutation and without explicit dependencies, but there are still implicit dependencies (ex: CRDs & Namespaces) that need the applier to wait for dependencies to be reconciled.

There are also a lot more cases where deletion & pruning requires reconciliation (aka NotFound) and not just deleted, especially when there are finalizers.

k8s-triage-robot commented 2 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 2 months ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes-sigs/cli-utils/issues/631#issuecomment-2155661283): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ 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-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.