fluxcd-flux2/cmd/flux
Sunny 05c13fe35a check readiness using kstatus
This change replaces all the many functions and ways of calculating
readiness of objects into one unified way that uses kstatus.Compute() to
check if the object is in progress or current. Only the objects that are
current are considered to be ready. This takes advantage of the kstatus
compatibility of Flux's APIs and also makes sure that they remain
kstatus compatible.

The new isObjectReady() function is also aware of static/statusless
objects and knows how to check their readiness using kstatus. This
prepares the CLI for the upcoming static API objects.

All the is*Ready() functions for specific objects have been removed.

This change doesn't affect any of the existing tests results.

Introduce suspend and resume subcommands for alert-provider.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-12-08 19:47:12 +05:30
..
testdata Update dependencies 2023-11-20 15:27:46 +02:00
alert.go Update CLI commands to Notification API v1beta2 2022-12-21 17:14:18 +02:00
alert_provider.go Update CLI commands to Notification API v1beta2 2022-12-21 17:14:18 +02:00
bootstrap.go confirm before overriding installation by another manager 2023-11-01 11:36:13 +01:00
bootstrap_bitbucket_server.go Fix typos in flux bootstrap documentation 2023-12-07 13:03:12 -08:00
bootstrap_git.go confirm before overriding installation by another manager 2023-11-01 11:36:13 +01:00
bootstrap_gitea.go feat: add gitea bootstrapper 2023-11-01 15:46:42 +01:00
bootstrap_github.go confirm before overriding installation by another manager 2023-11-01 11:36:13 +01:00
bootstrap_gitlab.go Fix typos in flux bootstrap documentation 2023-12-07 13:03:12 -08:00
build.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
build_artifact.go fix build_artifact.go typo 2023-11-14 15:02:54 -05:00
build_artifact_test.go tests: only provide template values when used 2023-02-15 13:22:44 +01:00
build_kustomization.go Add the possibility to ignore files with build and diff ks 2023-04-06 11:33:13 +02:00
build_kustomization_test.go Take into account the server-side inventory for local diff 2023-07-11 10:19:12 +02:00
check.go show cluster instance name and version in flux check and flux version 2023-12-06 15:21:55 +01:00
check_test.go Add /v2 suffix to module name in preparation of 2.0.0 release 2023-04-05 16:05:21 +03:00
cluster_info.go show cluster instance name and version in flux check and flux version 2023-12-06 15:21:55 +01:00
cluster_info_test.go show cluster instance name and version in flux check and flux version 2023-12-06 15:21:55 +01:00
completion.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
completion_bash.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
completion_fish.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
completion_powershell.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
completion_zsh.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
create.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_alert.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_alertprovider.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_helmrelease.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_image.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
create_image_policy.go misc: remove unused bits of code 2023-10-17 14:08:09 +02:00
create_image_repository.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
create_image_update.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
create_kustomization.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_receiver.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_secret.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
create_secret_git.go add flag --ca-crt-file to flux create secret git 2023-08-23 14:44:09 +05:30
create_secret_git_test.go add flag --ca-crt-file to flux create secret git 2023-08-23 14:44:09 +05:30
create_secret_helm.go deprecate TLS flags for flux create secret helm 2023-08-23 14:44:09 +05:30
create_secret_helm_test.go Add create oci secret command 2022-08-09 12:44:59 +03:00
create_secret_oci.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
create_secret_oci_test.go Add create oci secret command 2022-08-09 12:44:59 +03:00
create_secret_tls.go add deprecation warning per secret key field and constant 2023-08-23 14:44:09 +05:30
create_secret_tls_test.go add support for Kubernetes TLS keys for flux create secret tls 2023-08-23 14:44:09 +05:30
create_source.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
create_source_bucket.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_source_git.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_source_git_test.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_source_helm.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_source_helm_test.go Add OCI support to create source helm 2022-06-01 15:59:52 +02:00
create_source_oci.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
create_source_oci_test.go Add CLI flag for OCIRepo verify secret 2023-10-17 12:36:35 +01:00
create_tenant.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
create_test.go validate that object name adheres to RFC 1123 for flux create commands 2022-02-16 10:51:03 +01:00
delete.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_alert.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_alertprovider.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_helmrelease.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_image.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_image_policy.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_image_repository.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_image_update.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_kustomization.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_receiver.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_source.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_source_bucket.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_source_git.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_source_helm.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
delete_source_oci.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
diff.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
diff_artifact.go Update Kubernetes to v1.27 and Kustomize to v5.0 2023-05-23 18:49:47 +03:00
diff_artifact_test.go feat: diff artifact capability added 2022-10-20 13:23:50 +03:00
diff_kustomization.go Add the possibility to ignore files with build and diff ks 2023-04-06 11:33:13 +02:00
diff_kustomization_test.go Fix selection of kustomization resource from multi doc yaml 2023-08-07 12:05:29 +02:00
docgen.go Revert "Fix broken "edit this page" links in Flux CLI section" 2022-09-06 15:20:42 +02:00
events.go make flux events work with lowercased kinds 2023-11-17 02:25:17 +01:00
events_test.go bootstrap: provide better error message on timeout 2023-12-08 19:00:01 +05:30
export.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_alert.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_alertprovider.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_helmrelease.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_image.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_image_policy.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_image_repository.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_image_update.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_kustomization.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_receiver.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_secret.go misc: remove unused bits of code 2023-10-17 14:08:09 +02:00
export_source.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_source_bucket.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_source_git.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_source_helm.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_source_oci.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
export_test.go tests: only provide template values when used 2023-02-15 13:22:44 +01:00
get.go Don't log errors with missing CRDs for "get * all" commands 2023-06-22 18:03:38 +02:00
get_alert.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_alertprovider.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
get_all.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
get_helmrelease.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_image.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
get_image_all.go Don't log errors with missing CRDs for "get * all" commands 2023-06-22 18:03:38 +02:00
get_image_policy.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
get_image_repository.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_image_update.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_kustomization.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_receiver.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_source.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
get_source_all.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
get_source_bucket.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_source_chart.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_source_git.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_source_helm.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_source_oci.go misc: address strings.Title deprecation 2023-10-17 14:07:58 +02:00
get_test.go Add label selector flag to get cmd 2023-04-11 17:00:57 +01:00
helmrelease.go Add gvk to rest of api type 2022-02-21 10:40:35 +01:00
helmrelease_test.go e2e: update podinfo to version with newer APIs 2023-03-09 11:43:05 +01:00
image.go Update image-reflector API to v1beta2 2023-02-17 00:32:48 +05:30
image_test.go tests: rename "kubectl" setupTestNamespace 2023-02-15 13:56:55 +01:00
install.go Fix flux install command so it returns an error when unexpected arguments are passed 2023-11-27 13:02:14 -03:00
install_test.go Fix flux install command so it returns an error when unexpected arguments are passed 2023-11-27 13:02:14 -03:00
kustomization.go Update GitRepository Receiver, and Kustomization to v1 2023-04-05 16:05:20 +03:00
kustomization_test.go Add support for passing multiple objects to suspend/resume commands 2023-06-29 08:23:13 +02:00
list.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
list_artifact.go Update Kubernetes to v1.27 and Kustomize to v5.0 2023-05-23 18:49:47 +03:00
log.go Add Warningf to logger interface amd impl 2021-04-08 10:48:27 +03:00
logs.go misc: sinceSeconds -> sinceDuration 2023-10-17 14:08:10 +02:00
logs_e2e_test.go misc: sinceSeconds -> sinceDuration 2023-10-17 14:08:10 +02:00
logs_unit_test.go Make flux logs more lenient 2023-06-05 10:07:38 +02:00
main.go update description of kubeconfig flags 2023-09-18 10:48:08 +01:00
main_e2e_test.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
main_test.go Tweak permissions on created files 2023-11-06 12:33:38 +01:00
main_unit_test.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
manifests.embed.go Add missing copyright headers 2021-10-14 16:14:28 +03:00
object.go Add support for passing multiple objects to suspend/resume commands 2023-06-29 08:23:13 +02:00
pull.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
pull_artifact.go Print artifact source and revision only when available 2023-10-12 16:00:57 +03:00
push.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
push_artifact.go Update dependencies 2023-11-20 15:27:46 +02:00
readiness.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
readiness_test.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
receiver.go Update GitRepository Receiver, and Kustomization to v1 2023-04-05 16:05:20 +03:00
reconcile.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
reconcile_alert.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
reconcile_alertprovider.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
reconcile_helmrelease.go fix: support reconcile recursive source tree hr => chart => repo 2023-05-25 13:40:21 +02:00
reconcile_image.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
reconcile_image_repository.go Fix autocompletion for image repository reconcile 2023-05-08 20:14:19 +08:00
reconcile_image_updateauto.go misc: remove unused bits of code 2023-10-17 14:08:09 +02:00
reconcile_kustomization.go fix: support reconcile recursive source tree hr => chart => repo 2023-05-25 13:40:21 +02:00
reconcile_receiver.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
reconcile_source.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
reconcile_source_bucket.go fix: wait for Source objects observed generation 2022-03-23 12:38:42 +01:00
reconcile_source_chart.go fix autocompletion for helm chart 2023-08-22 14:19:08 +01:00
reconcile_source_git.go Update GitRepository Receiver, and Kustomization to v1 2023-04-05 16:05:20 +03:00
reconcile_source_helm.go Return a different success message for helm oci 2022-06-22 12:03:20 +01:00
reconcile_source_oci.go OCI docs improvements 2022-08-10 12:02:30 +03:00
reconcile_with_source.go misc: address wait.PollImmediate deprecation 2023-10-17 14:08:09 +02:00
resume.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
resume_alert.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
resume_alertprovider.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
resume_helmrelease.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
resume_image.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
resume_image_repository.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
resume_image_updateauto.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
resume_kustomization.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
resume_receiver.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
resume_source.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
resume_source_bucket.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
resume_source_chart.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
resume_source_git.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
resume_source_helm.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
resume_source_oci.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
source.go Update GitRepository Receiver, and Kustomization to v1 2023-04-05 16:05:20 +03:00
source_oci_test.go e2e: update podinfo to version with newer APIs 2023-03-09 11:43:05 +01:00
stats.go Update dependencies 2023-11-20 15:27:46 +02:00
status.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
suspend.go Add support for passing multiple objects to suspend/resume commands 2023-06-29 08:23:13 +02:00
suspend_alert.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
suspend_alertprovider.go check readiness using kstatus 2023-12-08 19:47:12 +05:30
suspend_helmrelease.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
suspend_image.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
suspend_image_repository.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
suspend_image_updateauto.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
suspend_kustomization.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
suspend_receiver.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
suspend_source.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
suspend_source_bucket.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
suspend_source_chart.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
suspend_source_git.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
suspend_source_helm.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
suspend_source_oci.go Add examples for resuming/suspending multiple objects 2023-06-29 12:50:38 +05:30
tag.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
tag_artifact.go Update Kubernetes to v1.27 and Kustomize to v5.0 2023-05-23 18:49:47 +03:00
trace.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
trace_test.go Make flux trace work with OCIRepository 2022-08-10 14:37:28 +02:00
tree.go add a preview note for all non-bootstrap commands 2023-04-05 16:05:21 +03:00
tree_kustomization.go Update dependencies 2023-11-20 15:27:46 +02:00
tree_kustomization_test.go Update Go to v1.17 2022-01-10 16:30:38 +01:00
uninstall.go Display better uninstall prompt if flux is managed by a different tool 2023-11-01 11:36:57 +01:00
version.go show cluster instance name and version in flux check and flux version 2023-12-06 15:21:55 +01:00
version_test.go Fix controller version info 2023-08-22 12:36:58 +03:00
version_utils.go Add /v2 suffix to module name in preparation of 2.0.0 release 2023-04-05 16:05:21 +03:00
version_utils_test.go Update Go to v1.17 2022-01-10 16:30:38 +01:00