-
Notifications
You must be signed in to change notification settings - Fork 594
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
Improve the way --wait
reconciles multiple resources
#3793
Labels
enhancement
New feature or request
Comments
@kingdonb if you could assign me this issue as well :) |
makkes
pushed a commit
to rishinair11/flux2
that referenced
this issue
Jun 29, 2023
This change adds support for running `suspend/resume` on multiple supported resources at the same time. This improves the user experience by converting ``` flux suspend ks operator && \ flux suspend ks database && \ flux suspend ks app ``` to ``` flux suspend ks operator database app ``` This works for all types of resources (Kustomizations, Sources, etc.) since it has been implemented at the `suspend.go` and `resume.go` level. When the `--wait` flag is passed to the `resume` command, then Flux will wait for all resources in parallel within a goroutine each. Each object is only processed once, even if user provided its name more than once. If suspension or resuming fails for one object, it is still carried out for the remaining objects. As a special case, the old behaviour of `resume` is retained, i.e. when only one object name is provided, `resume` waits for the object to become ready even if the `--wait` flag is not provided. In all other cases the `--wait` flag is always considered. closes fluxcd#3746 closes fluxcd#3793 Co-Authored-By: Max Jonas Werner <mail@makk.es> Signed-off-by: Rishikesh Nair <alienware505@gmail.com> Signed-off-by: Max Jonas Werner <mail@makk.es>
makkes
pushed a commit
to rishinair11/flux2
that referenced
this issue
Jun 29, 2023
This change adds support for running `suspend/resume` on multiple supported resources at the same time. This improves the user experience by converting ``` flux suspend ks operator && \ flux suspend ks database && \ flux suspend ks app ``` to ``` flux suspend ks operator database app ``` This works for all types of resources (Kustomizations, Sources, etc.) since it has been implemented at the `suspend.go` and `resume.go` level. When the `--wait` flag is passed to the `resume` command, then Flux will wait for all resources in parallel within a goroutine each. Each object is only processed once, even if user provided its name more than once. If suspension or resuming fails for one object, it is still carried out for the remaining objects. As a special case, the old behaviour of `resume` is retained, i.e. when only one object name is provided, `resume` waits for the object to become ready even if the `--wait` flag is not provided. In all other cases the `--wait` flag is always considered. closes fluxcd#3746 closes fluxcd#3793 Co-Authored-By: Max Jonas Werner <mail@makk.es> Signed-off-by: Rishikesh Nair <alienware505@gmail.com> Signed-off-by: Max Jonas Werner <mail@makk.es>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Follow-up to #3746
Currently, when we run:
flux reconcile ks --all --wait
what happens is,
suspend: true
is set for the first Kustomizationsuspend: true
is set for the next KustomizationThis patch-wait-patch-wait behaviour is not consistent with other tools like
kubectl
where the patching is separated from the waiting, so that we can have a patching phase and a waiting phase where the former would patch all objects and only then we wait for all of them to be reconciled, thus making the overall process faster.Steps to reproduce
N/A
Expected behavior
N/A
Screenshots and recordings
No response
OS / Distro
N/A
Flux version
N/A
Flux check
N/A
Git provider
No response
Container Registry provider
No response
Additional context
This was discussed in this prior pull request and this issue is being created to track the work needed for the same.
Code of Conduct
The text was updated successfully, but these errors were encountered: