fluxcd-flux2/cmd/flux
Carlos Nunez 45a00a0170
Maintain original scheme when using --token-auth
If you're using an HTTP-based Git server with Flux, you need to provide `--token-auth` to avoid triggering an SSH host key check (see [here](https://github.com/fluxcd/flux2/issues/2825#issuecomment-1151355914)). Unfortunately, doing this forces the URL in the `GitRepository` resource created during bootstrapping to always use `https`. This will cause Kustomization reconcile errors for servers that do not have HTTPS enabled or do not have the appropriate certs installed or available.

This pull request fixes this by keeping the repository URL scheme intact when using `--token-auth`.

Signed-off-by: Carlos Nunez <75340335+carlosonunez-vmw@users.noreply.github.com>
2022-09-27 22:14:29 -05:00
..
testdata Add provider to Helm OCI tests 2022-08-29 14:09:42 +03:00
alert.go Add gvk to rest of api type 2022-02-21 10:40:35 +01:00
alert_provider.go Add gvk to rest of api type 2022-02-21 10:40:35 +01:00
bootstrap.go modify tmp dir generation to be absolute on all OSes 2022-05-04 15:13:39 +05:30
bootstrap_bitbucket_server.go modify tmp dir generation to be absolute on all OSes 2022-05-04 15:13:39 +05:30
bootstrap_git.go Maintain original scheme when using --token-auth 2022-09-27 22:14:29 -05:00
bootstrap_github.go modify tmp dir generation to be absolute on all OSes 2022-05-04 15:13:39 +05:30
bootstrap_gitlab.go modify tmp dir generation to be absolute on all OSes 2022-05-04 15:13:39 +05:30
build.go Add a build kustomization feature 2022-01-20 11:51:56 +01:00
build_artifact.go Exclude VCS files by default from OCI artifacts 2022-08-17 13:49:38 +03:00
build_kustomization.go Add an option to diff with a local kustomization file 2022-04-05 17:21:11 +02:00
build_kustomization_test.go Add an option to diff with a local kustomization file 2022-04-05 17:21:11 +02:00
check.go Fail check if no controllers or crds are found 2022-06-09 09:27:27 +03:00
check_test.go trim prefix from server version 2022-05-18 17:08:50 +02:00
completion.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
completion_bash.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
completion_fish.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
completion_powershell.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
completion_zsh.go Fix flux completion zsh to work with source only 2021-09-17 17:49:47 +09:00
create.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
create_alert.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
create_alertprovider.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
create_helmrelease.go Accept multiple valuesFrom for create_helmrelease 2022-06-23 09:09:22 +01:00
create_image.go Tidy up command descriptions 2021-03-26 10:20:42 +01:00
create_image_policy.go Remove validation from sub-commands 2022-02-16 11:04:05 +01:00
create_image_repository.go Remove validation from sub-commands 2022-02-16 11:04:05 +01:00
create_image_update.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
create_kustomization.go Implement OCIRepository commands 2022-08-09 12:44:57 +03:00
create_receiver.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
create_secret.go Add sourcesecret and kustomization manifestgen 2021-02-26 16:58:41 +01:00
create_secret_git.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
create_secret_git_test.go validate that object name adheres to RFC 1123 for flux create commands 2022-02-16 10:51:03 +01:00
create_secret_helm.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
create_secret_helm_test.go Add create oci secret command 2022-08-09 12:44:59 +03:00
create_secret_oci.go OCI docs improvements 2022-08-10 12:02:30 +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 the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
create_secret_tls_test.go validate that object name adheres to RFC 1123 for flux create commands 2022-02-16 10:51:03 +01:00
create_source.go Add fetch timeout arg to create source commands 2021-11-01 15:37:58 +02:00
create_source_bucket.go feat: add --ignore-paths flag to flux create source (git|bucket) 2022-05-27 09:45:25 -07:00
create_source_git.go add branch to basic auth example 2022-06-27 21:08:48 +01:00
create_source_git_test.go feat: add --ignore-paths flag to flux create source (git|bucket) 2022-05-27 09:45:25 -07:00
create_source_helm.go Add OCI support to create source helm 2022-06-01 15:59:52 +02:00
create_source_helm_test.go Add OCI support to create source helm 2022-06-01 15:59:52 +02:00
create_source_oci.go Add insecure flag to flux create source oci 2022-09-12 14:31:03 +03:00
create_source_oci_test.go Add oci:// prefix 2022-08-09 12:44:58 +03:00
create_tenant.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01: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 the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
delete_alert.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
delete_alertprovider.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
delete_helmrelease.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
delete_image.go Rename flux delete auto to flux delete image 2021-02-04 11:57:40 +00:00
delete_image_policy.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
delete_image_repository.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
delete_image_update.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
delete_kustomization.go add detail to delete docs 2022-04-07 08:29:57 -04:00
delete_receiver.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
delete_source.go Rename gotk binary to flux 2020-10-29 16:25:16 +01:00
delete_source_bucket.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
delete_source_git.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
delete_source_helm.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
delete_source_oci.go OCI docs improvements 2022-08-10 12:02:30 +03:00
diff.go Add contextual error code for flux diff kustomization 2022-02-03 13:41:57 +01:00
diff_kustomization.go Add an option to diff with a local kustomization file 2022-04-05 17:21:11 +02:00
diff_kustomization_test.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
docgen.go Revert "Fix broken "edit this page" links in Flux CLI section" 2022-09-06 15:20:42 +02:00
export.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
export_alert.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
export_alertprovider.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
export_helmrelease.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
export_image.go Rename "auto" subcommands to "image" 2020-12-11 16:34:18 +00:00
export_image_policy.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
export_image_repository.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
export_image_update.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
export_kustomization.go Update kustomize-controller API to v1beta2 2021-10-08 21:11:06 +03:00
export_receiver.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
export_secret.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
export_source.go Rename gotk binary to flux 2020-10-29 16:25:16 +01:00
export_source_bucket.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
export_source_git.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
export_source_helm.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
export_source_oci.go Implement OCIRepository commands 2022-08-09 12:44:57 +03:00
export_test.go Update Go to v1.17 2022-01-10 16:30:38 +01:00
get.go Improve error message in get cmd 2022-08-24 11:35:46 +01:00
get_alert.go Move MESSAGE to the end of get subcommand output 2022-02-24 04:21:47 +05:30
get_alertprovider.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
get_all.go Update kustomize-controller API to v1beta2 2021-10-08 21:11:06 +03:00
get_helmrelease.go Move MESSAGE to the end of get subcommand output 2022-02-24 04:21:47 +05:30
get_image.go Output Usage for flux get <sources|images> 2022-01-26 16:03:22 -07:00
get_image_all.go Adds a watch flag to the get command 2021-08-06 13:44:06 +02:00
get_image_policy.go Move MESSAGE to the end of get subcommand output 2022-02-24 04:21:47 +05:30
get_image_repository.go Move MESSAGE to the end of get subcommand output 2022-02-24 04:21:47 +05:30
get_image_update.go Move MESSAGE to the end of get subcommand output 2022-02-24 04:21:47 +05:30
get_kustomization.go Move MESSAGE to the end of get subcommand output 2022-02-24 04:21:47 +05:30
get_receiver.go Move MESSAGE to the end of get subcommand output 2022-02-24 04:21:47 +05:30
get_source.go Output Usage for flux get <sources|images> 2022-01-26 16:03:22 -07:00
get_source_all.go Implement OCIRepository commands 2022-08-09 12:44:57 +03:00
get_source_bucket.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
get_source_chart.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
get_source_git.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
get_source_helm.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
get_source_oci.go OCI docs improvements 2022-08-10 12:02:30 +03:00
helmrelease.go Add gvk to rest of api type 2022-02-21 10:40:35 +01:00
helmrelease_test.go Update Go to v1.17 2022-01-10 16:30:38 +01:00
image.go Add gvk to rest of api type 2022-02-21 10:40:35 +01:00
image_test.go Add tests for source oci command 2022-08-09 12:44:58 +03:00
install.go Ensure proper FS root is set while bootstrapping 2022-05-24 12:14:21 +02:00
install_test.go add validation to namespace flag 2022-08-08 12:52:02 +01:00
kustomization.go Add gvk to rest of api type 2022-02-21 10:40:35 +01:00
kustomization_test.go Update Go to v1.17 2022-01-10 16:30:38 +01:00
list.go OCI docs improvements 2022-08-10 12:02:30 +03:00
list_artifact.go Support logging in directly to the provider when pushing OCI artifacts 2022-09-12 12:08:47 +02:00
log.go Add Warningf to logger interface amd impl 2021-04-08 10:48:27 +03:00
logs.go Update flux logs to accomodate the new format 2022-08-31 17:58:43 +01:00
logs_test.go Update flux logs to accomodate the new format 2022-08-31 17:58:43 +01:00
main.go add validation to namespace flag 2022-08-08 12:52:02 +01:00
main_e2e_test.go Update Go to v1.17 2022-01-10 16:30:38 +01:00
main_test.go reset cmd flags 2022-08-12 10:49:00 +01:00
main_unit_test.go Update Go to v1.17 2022-01-10 16:30:38 +01:00
manifests.embed.go Add missing copyright headers 2021-10-14 16:14:28 +03:00
object.go Add gvk to rest of api type 2022-02-21 10:40:35 +01:00
pull.go Add artifact commands 2022-08-09 12:44:57 +03:00
pull_artifact.go Support logging in directly to the provider when pushing OCI artifacts 2022-09-12 12:08:47 +02:00
push.go OCI docs improvements 2022-08-10 12:02:30 +03:00
push_artifact.go Support logging in directly to the provider when pushing OCI artifacts 2022-09-12 12:08:47 +02:00
receiver.go Add gvk to rest of api type 2022-02-21 10:40:35 +01:00
reconcile.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
reconcile_alert.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
reconcile_alertprovider.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
reconcile_helmrelease.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
reconcile_image.go Rename "auto" subcommands to "image" 2020-12-11 16:34:18 +00:00
reconcile_image_repository.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
reconcile_image_updateauto.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
reconcile_kustomization.go Implement OCIRepository commands 2022-08-09 12:44:57 +03:00
reconcile_receiver.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
reconcile_source.go Rename gotk binary to flux 2020-10-29 16:25:16 +01:00
reconcile_source_bucket.go fix: wait for Source objects observed generation 2022-03-23 12:38:42 +01:00
reconcile_source_git.go Update Source API to v1beta2 2022-03-23 11:33:35 +01: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 Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
resume.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
resume_alert.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
resume_helmrelease.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
resume_image.go Rename "auto" subcommands to "image" 2020-12-11 16:34:18 +00:00
resume_image_repository.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
resume_image_updateauto.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
resume_kustomization.go Update kustomize-controller API to v1beta2 2021-10-08 21:11:06 +03:00
resume_receiver.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
resume_source.go Add resume source commands 2020-11-26 16:40:54 +02:00
resume_source_bucket.go Fix resume source bucket panic 2022-03-23 15:33:57 +02:00
resume_source_chart.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
resume_source_git.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
resume_source_helm.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
resume_source_oci.go OCI docs improvements 2022-08-10 12:02:30 +03:00
source.go Implement OCIRepository commands 2022-08-09 12:44:57 +03:00
source_oci_test.go Add oci:// prefix 2022-08-09 12:44:58 +03:00
status.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
suspend.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
suspend_alert.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
suspend_helmrelease.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
suspend_image.go Rename "auto" subcommands to "image" 2020-12-11 16:34:18 +00:00
suspend_image_repository.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
suspend_image_updateauto.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
suspend_kustomization.go Update kustomize-controller API to v1beta2 2021-10-08 21:11:06 +03:00
suspend_receiver.go Add dynamic completion suppport 2021-09-18 17:27:47 +09:00
suspend_source.go Add suspend source commands 2020-11-26 16:22:47 +02:00
suspend_source_bucket.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
suspend_source_chart.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
suspend_source_git.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
suspend_source_helm.go Update Source API to v1beta2 2022-03-23 11:33:35 +01:00
suspend_source_oci.go OCI docs improvements 2022-08-10 12:02:30 +03:00
tag.go OCI docs improvements 2022-08-10 12:02:30 +03:00
tag_artifact.go Support logging in directly to the provider when pushing OCI artifacts 2022-09-12 12:08:47 +02:00
trace.go Make flux trace work with OCIRepository 2022-08-10 14:37:28 +02:00
trace_test.go Make flux trace work with OCIRepository 2022-08-10 14:37:28 +02:00
tree.go Add flux tree command 2021-10-25 13:45:13 +03:00
tree_kustomization.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
tree_kustomization_test.go Update Go to v1.17 2022-01-10 16:30:38 +01:00
uninstall.go remove finalizers for notification controllers 2022-09-11 13:16:53 +01:00
version.go Add the kube client qps and burst to the global args 2022-03-25 10:43:59 +01:00
version_utils.go Add version validation to install commands 2022-08-24 11:58:29 +03:00
version_utils_test.go Update Go to v1.17 2022-01-10 16:30:38 +01:00