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
Max Jonas Werner cbdd71e44e
Make `flux logs` more lenient
UX changes:

- Only print an error when a pod doesn't have a matching container
  instead of exiting early.
- Return a non-zero status code when no pod is found at all.

Details:

In certain situations there might be 3rd-party pods running in the
Flux namespace that cause the command to fail streaming logs, e.g.
when they have multiple containers but none of them is called
`manager` (which all Flux-maintained pods do). An example of such a
situation is when Flux is installed with the 3rd-party Flux extension
on AKS.

The `logs` command is now more forgiving and merely logs an error in
these situations instead of completely bailing out. It still returns a
non-zero exit code.

For the parallel log streaming with `-f` the code is now a little more
complex so that errors are now written to stderr in parallel with all
other logs written to stdout. That's what `asyncCopy` is for.

refs #3944

Signed-off-by: Max Jonas Werner <mail@makk.es>
2 years ago
..
testdata fix: support reconcile recursive source tree hr => chart => repo 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 add a preview note for all non-bootstrap commands 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 Add label selector flag to get cmd 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 add a preview note for all non-bootstrap 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 e2e: update podinfo to version with newer APIs 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 Make `flux logs` more lenient 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 gvk to rest of api type 3 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 Retry oci push operations 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 a preview note for all non-bootstrap commands 2 years ago
resume_alert.go Update CLI commands to Notification API v1beta2 2 years ago
resume_helmrelease.go Add dynamic completion suppport 3 years ago
resume_image.go add a preview note for all non-bootstrap commands 2 years ago
resume_image_repository.go Update image-reflector API to v1beta2 2 years ago
resume_image_updateauto.go Add dynamic completion suppport 3 years ago
resume_kustomization.go Update GitRepository Receiver, and Kustomization to v1 2 years ago
resume_receiver.go Update GitRepository Receiver, and Kustomization to v1 2 years ago
resume_source.go add a preview note for all non-bootstrap commands 2 years ago
resume_source_bucket.go Fix resume source bucket panic 3 years ago
resume_source_chart.go Update Source API to v1beta2 3 years ago
resume_source_git.go Update GitRepository Receiver, and Kustomization to v1 2 years ago
resume_source_helm.go Update Source API to v1beta2 3 years ago
resume_source_oci.go OCI docs improvements 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 a preview note for all non-bootstrap 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