You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flux2/cmd/flux
Rishikesh Nair 42607aadc3
Add support for passing multiple objects to suspend/resume commands
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 #3746
closes #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>
2 years ago
..
testdata Add support for passing multiple objects to suspend/resume commands 2 years ago
alert.go Update CLI commands to Notification API v1beta2 2 years ago
alert_provider.go Update CLI commands to Notification API v1beta2 2 years ago
bootstrap.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
bootstrap_bitbucket_server.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
bootstrap_git.go fix some comments 2 years ago
bootstrap_github.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
bootstrap_gitlab.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
build.go add a preview note for all non-bootstrap commands 2 years ago
build_artifact.go Update Kubernetes to v1.27 and Kustomize to v5.0 2 years ago
build_artifact_test.go tests: only provide template values when used 2 years ago
build_kustomization.go Add the possibility to ignore files with build and diff ks 2 years ago
build_kustomization_test.go Add the possibility to ignore files with build and diff ks 2 years ago
check.go Set minimum supported version to Kubernetes 1.24.0 2 years ago
check_test.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
completion.go add a preview note for all non-bootstrap commands 2 years ago
completion_bash.go add a preview note for all non-bootstrap commands 2 years ago
completion_fish.go add a preview note for all non-bootstrap commands 2 years ago
completion_powershell.go add a preview note for all non-bootstrap commands 2 years ago
completion_zsh.go add a preview note for all non-bootstrap commands 2 years ago
create.go add a preview note for all non-bootstrap commands 2 years ago
create_alert.go add a preview note for all non-bootstrap commands 2 years ago
create_alertprovider.go add a preview note for all non-bootstrap commands 2 years ago
create_helmrelease.go Fix break lines in create helmrelease and source 2 years ago
create_image.go add a preview note for all non-bootstrap commands 2 years ago
create_image_policy.go add a preview note for all non-bootstrap commands 2 years ago
create_image_repository.go add a preview note for all non-bootstrap commands 2 years ago
create_image_update.go add a preview note for all non-bootstrap commands 2 years ago
create_kustomization.go add a preview note for all non-bootstrap commands 2 years ago
create_receiver.go Update toolkit components 2 years ago
create_secret.go add a preview note for all non-bootstrap commands 2 years ago
create_secret_git.go add a preview note for all non-bootstrap commands 2 years ago
create_secret_git_test.go Create secret with bearer-token 2 years ago
create_secret_helm.go add a preview note for all non-bootstrap commands 2 years ago
create_secret_helm_test.go Add create oci secret command 2 years ago
create_secret_oci.go add a preview note for all non-bootstrap commands 2 years ago
create_secret_oci_test.go Add create oci secret command 2 years ago
create_secret_tls.go add a preview note for all non-bootstrap commands 2 years ago
create_secret_tls_test.go validate that object name adheres to RFC 1123 for flux create commands 3 years ago
create_source.go add a preview note for all non-bootstrap commands 2 years ago
create_source_bucket.go add a preview note for all non-bootstrap commands 2 years ago
create_source_git.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
create_source_git_test.go Update GitRepository Receiver, and Kustomization to v1 2 years ago
create_source_helm.go Fix break lines in create helmrelease and source 2 years ago
create_source_helm_test.go Add OCI support to `create source helm` 3 years ago
create_source_oci.go add a preview note for all non-bootstrap commands 2 years ago
create_source_oci_test.go e2e: update podinfo to version with newer APIs 2 years ago
create_tenant.go add a preview note for all non-bootstrap commands 2 years ago
create_test.go validate that object name adheres to RFC 1123 for flux create commands 3 years ago
delete.go add a preview note for all non-bootstrap commands 2 years ago
delete_alert.go add a preview note for all non-bootstrap commands 2 years ago
delete_alertprovider.go add a preview note for all non-bootstrap commands 2 years ago
delete_helmrelease.go add a preview note for all non-bootstrap commands 2 years ago
delete_image.go add a preview note for all non-bootstrap commands 2 years ago
delete_image_policy.go add a preview note for all non-bootstrap commands 2 years ago
delete_image_repository.go add a preview note for all non-bootstrap commands 2 years ago
delete_image_update.go add a preview note for all non-bootstrap commands 2 years ago
delete_kustomization.go add a preview note for all non-bootstrap commands 2 years ago
delete_receiver.go add a preview note for all non-bootstrap commands 2 years ago
delete_source.go add a preview note for all non-bootstrap commands 2 years ago
delete_source_bucket.go add a preview note for all non-bootstrap commands 2 years ago
delete_source_git.go add a preview note for all non-bootstrap commands 2 years ago
delete_source_helm.go add a preview note for all non-bootstrap commands 2 years ago
delete_source_oci.go add a preview note for all non-bootstrap commands 2 years ago
diff.go add a preview note for all non-bootstrap commands 2 years ago
diff_artifact.go Update Kubernetes to v1.27 and Kustomize to v5.0 2 years ago
diff_artifact_test.go feat: diff artifact capability added 2 years ago
diff_kustomization.go Add the possibility to ignore files with build and diff ks 2 years ago
diff_kustomization_test.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
docgen.go Revert "Fix broken "edit this page" links in Flux CLI section" 2 years ago
events.go add a preview note for all non-bootstrap commands 2 years ago
events_test.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
export.go add a preview note for all non-bootstrap commands 2 years ago
export_alert.go add a preview note for all non-bootstrap commands 2 years ago
export_alertprovider.go add a preview note for all non-bootstrap commands 2 years ago
export_helmrelease.go add a preview note for all non-bootstrap commands 2 years ago
export_image.go add a preview note for all non-bootstrap commands 2 years ago
export_image_policy.go add a preview note for all non-bootstrap commands 2 years ago
export_image_repository.go add a preview note for all non-bootstrap commands 2 years ago
export_image_update.go add a preview note for all non-bootstrap commands 2 years ago
export_kustomization.go add a preview note for all non-bootstrap commands 2 years ago
export_receiver.go add a preview note for all non-bootstrap commands 2 years ago
export_secret.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
export_source.go add a preview note for all non-bootstrap commands 2 years ago
export_source_bucket.go add a preview note for all non-bootstrap commands 2 years ago
export_source_git.go add a preview note for all non-bootstrap commands 2 years ago
export_source_helm.go add a preview note for all non-bootstrap commands 2 years ago
export_source_oci.go add a preview note for all non-bootstrap commands 2 years ago
export_test.go tests: only provide template values when used 2 years ago
get.go Don't log errors with missing CRDs for "get * all" commands 2 years ago
get_alert.go add a preview note for all non-bootstrap commands 2 years ago
get_alertprovider.go add a preview note for all non-bootstrap commands 2 years ago
get_all.go add a preview note for all non-bootstrap commands 2 years ago
get_helmrelease.go add a preview note for all non-bootstrap commands 2 years ago
get_image.go add a preview note for all non-bootstrap commands 2 years ago
get_image_all.go Don't log errors with missing CRDs for "get * all" commands 2 years ago
get_image_policy.go add a preview note for all non-bootstrap commands 2 years ago
get_image_repository.go add a preview note for all non-bootstrap commands 2 years ago
get_image_update.go add a preview note for all non-bootstrap commands 2 years ago
get_kustomization.go add a preview note for all non-bootstrap commands 2 years ago
get_receiver.go add a preview note for all non-bootstrap commands 2 years ago
get_source.go add a preview note for all non-bootstrap commands 2 years ago
get_source_all.go add a preview note for all non-bootstrap commands 2 years ago
get_source_bucket.go add a preview note for all non-bootstrap commands 2 years ago
get_source_chart.go add a preview note for all non-bootstrap commands 2 years ago
get_source_git.go add a preview note for all non-bootstrap commands 2 years ago
get_source_helm.go add a preview note for all non-bootstrap commands 2 years ago
get_source_oci.go add a preview note for all non-bootstrap commands 2 years ago
get_test.go Add label selector flag to get cmd 2 years ago
helmrelease.go Add gvk to rest of api type 3 years ago
helmrelease_test.go e2e: update podinfo to version with newer APIs 2 years ago
image.go Update image-reflector API to v1beta2 2 years ago
image_test.go tests: rename "kubectl" `setupTestNamespace` 2 years ago
install.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
install_test.go tests: only provide template values when used 2 years ago
kustomization.go Update GitRepository Receiver, and Kustomization to v1 2 years ago
kustomization_test.go Add support for passing multiple objects to suspend/resume commands 2 years ago
list.go add a preview note for all non-bootstrap commands 2 years ago
list_artifact.go Update Kubernetes to v1.27 and Kustomize to v5.0 2 years ago
log.go Add Warningf to logger interface amd impl 4 years ago
logs.go Make `flux logs` more lenient 2 years ago
logs_e2e_test.go Make `flux logs` more lenient 2 years ago
logs_unit_test.go Make `flux logs` more lenient 2 years ago
main.go set controller-runtime logger to a null logger 2 years ago
main_e2e_test.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
main_test.go Add support for passing multiple objects to suspend/resume commands 2 years ago
main_unit_test.go Update Go to v1.17 3 years ago
manifests.embed.go Add missing copyright headers 3 years ago
object.go Add support for passing multiple objects to suspend/resume commands 2 years ago
pull.go add a preview note for all non-bootstrap commands 2 years ago
pull_artifact.go Update Kubernetes to v1.27 and Kustomize to v5.0 2 years ago
push.go add a preview note for all non-bootstrap commands 2 years ago
push_artifact.go Fix the `flux push` example for ECR 2 years ago
receiver.go Update GitRepository Receiver, and Kustomization to v1 2 years ago
reconcile.go add a preview note for all non-bootstrap commands 2 years ago
reconcile_alert.go Update CLI commands to Notification API v1beta2 2 years ago
reconcile_alertprovider.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
reconcile_helmrelease.go fix: support reconcile recursive source tree hr => chart => repo 2 years ago
reconcile_image.go add a preview note for all non-bootstrap commands 2 years ago
reconcile_image_repository.go Fix autocompletion for image repository reconcile 2 years ago
reconcile_image_updateauto.go Add dynamic completion suppport 3 years ago
reconcile_kustomization.go fix: support reconcile recursive source tree hr => chart => repo 2 years ago
reconcile_receiver.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
reconcile_source.go add a preview note for all non-bootstrap commands 2 years ago
reconcile_source_bucket.go fix: wait for Source objects observed generation 3 years ago
reconcile_source_chart.go fix: support reconcile recursive source tree hr => chart => repo 2 years ago
reconcile_source_git.go Update GitRepository Receiver, and Kustomization to v1 2 years ago
reconcile_source_helm.go Return a different success message for helm oci 3 years ago
reconcile_source_oci.go OCI docs improvements 2 years ago
reconcile_with_source.go fix: support reconcile recursive source tree hr => chart => repo 2 years ago
resume.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_alert.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_helmrelease.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_image.go add a preview note for all non-bootstrap commands 2 years ago
resume_image_repository.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_image_updateauto.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_kustomization.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_receiver.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_source.go add a preview note for all non-bootstrap commands 2 years ago
resume_source_bucket.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_source_chart.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_source_git.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_source_helm.go Add support for passing multiple objects to suspend/resume commands 2 years ago
resume_source_oci.go Add support for passing multiple objects to suspend/resume commands 2 years ago
source.go Update GitRepository Receiver, and Kustomization to v1 2 years ago
source_oci_test.go e2e: update podinfo to version with newer APIs 2 years ago
stats.go add a preview note for all non-bootstrap commands 2 years ago
status.go Update Source API to v1beta2 3 years ago
suspend.go Add support for passing multiple objects to suspend/resume commands 2 years ago
suspend_alert.go add a preview note for all non-bootstrap commands 2 years ago
suspend_helmrelease.go add a preview note for all non-bootstrap commands 2 years ago
suspend_image.go add a preview note for all non-bootstrap commands 2 years ago
suspend_image_repository.go add a preview note for all non-bootstrap commands 2 years ago
suspend_image_updateauto.go add a preview note for all non-bootstrap commands 2 years ago
suspend_kustomization.go add a preview note for all non-bootstrap commands 2 years ago
suspend_receiver.go add a preview note for all non-bootstrap commands 2 years ago
suspend_source.go add a preview note for all non-bootstrap commands 2 years ago
suspend_source_bucket.go add a preview note for all non-bootstrap commands 2 years ago
suspend_source_chart.go add a preview note for all non-bootstrap commands 2 years ago
suspend_source_git.go add a preview note for all non-bootstrap commands 2 years ago
suspend_source_helm.go add a preview note for all non-bootstrap commands 2 years ago
suspend_source_oci.go add a preview note for all non-bootstrap commands 2 years ago
tag.go add a preview note for all non-bootstrap commands 2 years ago
tag_artifact.go Update Kubernetes to v1.27 and Kustomize to v5.0 2 years ago
trace.go add a preview note for all non-bootstrap commands 2 years ago
trace_test.go Make `flux trace` work with OCIRepository 2 years ago
tree.go add a preview note for all non-bootstrap commands 2 years ago
tree_kustomization.go add a preview note for all non-bootstrap commands 2 years ago
tree_kustomization_test.go Update Go to v1.17 3 years ago
uninstall.go add a preview note for all non-bootstrap commands 2 years ago
version.go add a preview note for all non-bootstrap commands 2 years ago
version_utils.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
version_utils_test.go Update Go to v1.17 3 years ago