From 54c2ae185f2888474885c6319c978fe42438f1c7 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Wed, 3 Jul 2024 03:58:15 +0530 Subject: [PATCH] feat: add --config flag as an alternative to ZARF_CONFIG --- site/src/content/docs/commands/zarf.md | 1 + .../content/docs/commands/zarf_completion.md | 1 + .../docs/commands/zarf_completion_bash.md | 1 + .../docs/commands/zarf_completion_fish.md | 1 + .../commands/zarf_completion_powershell.md | 1 + .../docs/commands/zarf_completion_zsh.md | 1 + .../src/content/docs/commands/zarf_connect.md | 1 + .../docs/commands/zarf_connect_list.md | 1 + .../src/content/docs/commands/zarf_destroy.md | 1 + site/src/content/docs/commands/zarf_dev.md | 1 + .../content/docs/commands/zarf_dev_deploy.md | 1 + .../docs/commands/zarf_dev_find-images.md | 1 + .../docs/commands/zarf_dev_generate-config.md | 1 + .../docs/commands/zarf_dev_generate.md | 1 + .../content/docs/commands/zarf_dev_lint.md | 1 + .../docs/commands/zarf_dev_patch-git.md | 1 + .../docs/commands/zarf_dev_sha256sum.md | 1 + site/src/content/docs/commands/zarf_init.md | 1 + .../src/content/docs/commands/zarf_package.md | 1 + .../docs/commands/zarf_package_create.md | 1 + .../docs/commands/zarf_package_deploy.md | 1 + .../docs/commands/zarf_package_inspect.md | 1 + .../docs/commands/zarf_package_list.md | 1 + .../commands/zarf_package_mirror-resources.md | 1 + .../docs/commands/zarf_package_publish.md | 1 + .../docs/commands/zarf_package_pull.md | 1 + .../docs/commands/zarf_package_remove.md | 1 + site/src/content/docs/commands/zarf_tools.md | 1 + .../docs/commands/zarf_tools_archiver.md | 1 + .../commands/zarf_tools_archiver_compress.md | 1 + .../zarf_tools_archiver_decompress.md | 1 + .../commands/zarf_tools_archiver_version.md | 1 + .../docs/commands/zarf_tools_clear-cache.md | 1 + .../docs/commands/zarf_tools_download-init.md | 1 + .../docs/commands/zarf_tools_gen-key.md | 1 + .../docs/commands/zarf_tools_gen-pki.md | 1 + .../docs/commands/zarf_tools_get-creds.md | 1 + .../content/docs/commands/zarf_tools_helm.md | 6 ++++ .../commands/zarf_tools_helm_dependency.md | 1 + .../zarf_tools_helm_dependency_build.md | 1 + .../zarf_tools_helm_dependency_list.md | 1 + .../zarf_tools_helm_dependency_update.md | 1 + .../docs/commands/zarf_tools_helm_repo.md | 1 + .../docs/commands/zarf_tools_helm_repo_add.md | 1 + .../commands/zarf_tools_helm_repo_index.md | 1 + .../commands/zarf_tools_helm_repo_list.md | 1 + .../commands/zarf_tools_helm_repo_remove.md | 1 + .../commands/zarf_tools_helm_repo_update.md | 1 + .../docs/commands/zarf_tools_helm_version.md | 1 + .../docs/commands/zarf_tools_kubectl.md | 6 ++++ .../docs/commands/zarf_tools_monitor.md | 6 ++++ .../docs/commands/zarf_tools_registry.md | 6 ++++ .../commands/zarf_tools_registry_catalog.md | 1 + .../docs/commands/zarf_tools_registry_copy.md | 1 + .../commands/zarf_tools_registry_delete.md | 1 + .../commands/zarf_tools_registry_digest.md | 1 + .../commands/zarf_tools_registry_login.md | 1 + .../docs/commands/zarf_tools_registry_ls.md | 1 + .../commands/zarf_tools_registry_prune.md | 1 + .../docs/commands/zarf_tools_registry_pull.md | 1 + .../docs/commands/zarf_tools_registry_push.md | 1 + .../commands/zarf_tools_registry_version.md | 1 + .../content/docs/commands/zarf_tools_sbom.md | 6 ++++ .../docs/commands/zarf_tools_sbom_attest.md | 7 ++-- .../docs/commands/zarf_tools_sbom_convert.md | 7 ++-- .../docs/commands/zarf_tools_sbom_login.md | 7 ++-- .../docs/commands/zarf_tools_sbom_scan.md | 7 ++-- .../docs/commands/zarf_tools_sbom_version.md | 7 ++-- .../docs/commands/zarf_tools_update-creds.md | 3 +- .../docs/commands/zarf_tools_wait-for.md | 6 ++++ .../content/docs/commands/zarf_tools_yq.md | 6 ++++ .../docs/commands/zarf_tools_yq_eval-all.md | 1 + .../docs/commands/zarf_tools_yq_eval.md | 1 + .../src/content/docs/commands/zarf_version.md | 1 + src/cmd/common/setup.go | 2 ++ src/cmd/common/viper.go | 29 ++++++++++++++++ src/cmd/internal.go | 1 + src/cmd/root.go | 1 + src/config/lang/english.go | 4 ++- src/test/e2e/29_config_file_test.go | 33 ++++++++++++++----- src/types/runtime.go | 1 + 81 files changed, 186 insertions(+), 26 deletions(-) diff --git a/site/src/content/docs/commands/zarf.md b/site/src/content/docs/commands/zarf.md index a72d554da9..911f85b2b1 100644 --- a/site/src/content/docs/commands/zarf.md +++ b/site/src/content/docs/commands/zarf.md @@ -23,6 +23,7 @@ zarf COMMAND [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use -h, --help help for zarf --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") diff --git a/site/src/content/docs/commands/zarf_completion.md b/site/src/content/docs/commands/zarf_completion.md index 151c7d9198..8f46db4dd5 100644 --- a/site/src/content/docs/commands/zarf_completion.md +++ b/site/src/content/docs/commands/zarf_completion.md @@ -26,6 +26,7 @@ See each sub-command's help for details on how to use the generated script. ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_completion_bash.md b/site/src/content/docs/commands/zarf_completion_bash.md index dce8642c87..c35f60364e 100644 --- a/site/src/content/docs/commands/zarf_completion_bash.md +++ b/site/src/content/docs/commands/zarf_completion_bash.md @@ -49,6 +49,7 @@ zarf completion bash ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_completion_fish.md b/site/src/content/docs/commands/zarf_completion_fish.md index f8cb9f27ed..dd886b6a5e 100644 --- a/site/src/content/docs/commands/zarf_completion_fish.md +++ b/site/src/content/docs/commands/zarf_completion_fish.md @@ -40,6 +40,7 @@ zarf completion fish [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_completion_powershell.md b/site/src/content/docs/commands/zarf_completion_powershell.md index 26ed47298c..fe79efa5a2 100644 --- a/site/src/content/docs/commands/zarf_completion_powershell.md +++ b/site/src/content/docs/commands/zarf_completion_powershell.md @@ -37,6 +37,7 @@ zarf completion powershell [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_completion_zsh.md b/site/src/content/docs/commands/zarf_completion_zsh.md index 9b6af13363..944a9894d9 100644 --- a/site/src/content/docs/commands/zarf_completion_zsh.md +++ b/site/src/content/docs/commands/zarf_completion_zsh.md @@ -51,6 +51,7 @@ zarf completion zsh [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_connect.md b/site/src/content/docs/commands/zarf_connect.md index 88f519d332..2a34e836fc 100644 --- a/site/src/content/docs/commands/zarf_connect.md +++ b/site/src/content/docs/commands/zarf_connect.md @@ -40,6 +40,7 @@ zarf connect { REGISTRY | GIT | connect-name } [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_connect_list.md b/site/src/content/docs/commands/zarf_connect_list.md index 5767cf2176..dee42ccd07 100644 --- a/site/src/content/docs/commands/zarf_connect_list.md +++ b/site/src/content/docs/commands/zarf_connect_list.md @@ -24,6 +24,7 @@ zarf connect list [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_destroy.md b/site/src/content/docs/commands/zarf_destroy.md index 1e61fb0d70..2ff58be0bf 100644 --- a/site/src/content/docs/commands/zarf_destroy.md +++ b/site/src/content/docs/commands/zarf_destroy.md @@ -36,6 +36,7 @@ zarf destroy --confirm [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_dev.md b/site/src/content/docs/commands/zarf_dev.md index a12090183d..a66effa6ae 100644 --- a/site/src/content/docs/commands/zarf_dev.md +++ b/site/src/content/docs/commands/zarf_dev.md @@ -20,6 +20,7 @@ Commands useful for developing packages ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_dev_deploy.md b/site/src/content/docs/commands/zarf_dev_deploy.md index 29293c1d9a..35bede13ef 100644 --- a/site/src/content/docs/commands/zarf_dev_deploy.md +++ b/site/src/content/docs/commands/zarf_dev_deploy.md @@ -38,6 +38,7 @@ zarf dev deploy [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_dev_find-images.md b/site/src/content/docs/commands/zarf_dev_find-images.md index d1dcf31ea0..c5abdbf878 100644 --- a/site/src/content/docs/commands/zarf_dev_find-images.md +++ b/site/src/content/docs/commands/zarf_dev_find-images.md @@ -38,6 +38,7 @@ zarf dev find-images [ PACKAGE ] [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_dev_generate-config.md b/site/src/content/docs/commands/zarf_dev_generate-config.md index 9610b0e593..f07807feb2 100644 --- a/site/src/content/docs/commands/zarf_dev_generate-config.md +++ b/site/src/content/docs/commands/zarf_dev_generate-config.md @@ -33,6 +33,7 @@ zarf dev generate-config [ FILENAME ] [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_dev_generate.md b/site/src/content/docs/commands/zarf_dev_generate.md index c311b0973f..7dd58836e7 100644 --- a/site/src/content/docs/commands/zarf_dev_generate.md +++ b/site/src/content/docs/commands/zarf_dev_generate.md @@ -35,6 +35,7 @@ zarf dev generate podinfo --url https://github.com/stefanprodan/podinfo.git --ve ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_dev_lint.md b/site/src/content/docs/commands/zarf_dev_lint.md index 91d446cbc3..85b20031c0 100644 --- a/site/src/content/docs/commands/zarf_dev_lint.md +++ b/site/src/content/docs/commands/zarf_dev_lint.md @@ -30,6 +30,7 @@ zarf dev lint [ DIRECTORY ] [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_dev_patch-git.md b/site/src/content/docs/commands/zarf_dev_patch-git.md index bbb3933f39..20b92a8c83 100644 --- a/site/src/content/docs/commands/zarf_dev_patch-git.md +++ b/site/src/content/docs/commands/zarf_dev_patch-git.md @@ -26,6 +26,7 @@ zarf dev patch-git HOST FILE [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_dev_sha256sum.md b/site/src/content/docs/commands/zarf_dev_sha256sum.md index 6c910106b4..b9ecc5ee9a 100644 --- a/site/src/content/docs/commands/zarf_dev_sha256sum.md +++ b/site/src/content/docs/commands/zarf_dev_sha256sum.md @@ -25,6 +25,7 @@ zarf dev sha256sum { FILE | URL } [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_init.md b/site/src/content/docs/commands/zarf_init.md index 8fc88244c3..550899ea81 100644 --- a/site/src/content/docs/commands/zarf_init.md +++ b/site/src/content/docs/commands/zarf_init.md @@ -85,6 +85,7 @@ $ zarf init --artifact-push-password={PASSWORD} --artifact-push-username={USERNA ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_package.md b/site/src/content/docs/commands/zarf_package.md index 0727c57793..28a6d46f3a 100644 --- a/site/src/content/docs/commands/zarf_package.md +++ b/site/src/content/docs/commands/zarf_package.md @@ -22,6 +22,7 @@ Zarf package commands for creating, deploying, and inspecting packages ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_package_create.md b/site/src/content/docs/commands/zarf_package_create.md index 0a8057bf38..53bc23d9a2 100644 --- a/site/src/content/docs/commands/zarf_package_create.md +++ b/site/src/content/docs/commands/zarf_package_create.md @@ -43,6 +43,7 @@ zarf package create [ DIRECTORY ] [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_package_deploy.md b/site/src/content/docs/commands/zarf_package_deploy.md index 07f2fa46de..566acc1ca4 100644 --- a/site/src/content/docs/commands/zarf_package_deploy.md +++ b/site/src/content/docs/commands/zarf_package_deploy.md @@ -37,6 +37,7 @@ zarf package deploy [ PACKAGE_SOURCE ] [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -k, --key string Path to public key file for validating signed packages -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") diff --git a/site/src/content/docs/commands/zarf_package_inspect.md b/site/src/content/docs/commands/zarf_package_inspect.md index 7a27daff9f..f24e9e04ad 100644 --- a/site/src/content/docs/commands/zarf_package_inspect.md +++ b/site/src/content/docs/commands/zarf_package_inspect.md @@ -31,6 +31,7 @@ zarf package inspect [ PACKAGE_SOURCE ] [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -k, --key string Path to public key file for validating signed packages -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") diff --git a/site/src/content/docs/commands/zarf_package_list.md b/site/src/content/docs/commands/zarf_package_list.md index b8f215ade3..4c76094295 100644 --- a/site/src/content/docs/commands/zarf_package_list.md +++ b/site/src/content/docs/commands/zarf_package_list.md @@ -24,6 +24,7 @@ zarf package list [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -k, --key string Path to public key file for validating signed packages -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") diff --git a/site/src/content/docs/commands/zarf_package_mirror-resources.md b/site/src/content/docs/commands/zarf_package_mirror-resources.md index 1b6abb8fd9..80644fcbb7 100644 --- a/site/src/content/docs/commands/zarf_package_mirror-resources.md +++ b/site/src/content/docs/commands/zarf_package_mirror-resources.md @@ -63,6 +63,7 @@ $ zarf package mirror-resources \ ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -k, --key string Path to public key file for validating signed packages -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") diff --git a/site/src/content/docs/commands/zarf_package_publish.md b/site/src/content/docs/commands/zarf_package_publish.md index 1507c83e0a..6719241bb0 100644 --- a/site/src/content/docs/commands/zarf_package_publish.md +++ b/site/src/content/docs/commands/zarf_package_publish.md @@ -38,6 +38,7 @@ $ zarf package publish ./path/to/dir oci://my-registry.com/my-namespace ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -k, --key string Path to public key file for validating signed packages -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") diff --git a/site/src/content/docs/commands/zarf_package_pull.md b/site/src/content/docs/commands/zarf_package_pull.md index 2bb98e5742..b1da376e11 100644 --- a/site/src/content/docs/commands/zarf_package_pull.md +++ b/site/src/content/docs/commands/zarf_package_pull.md @@ -39,6 +39,7 @@ $ zarf package pull oci://ghcr.io/defenseunicorns/packages/dos-games:1.0.0 -a sk ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -k, --key string Path to public key file for validating signed packages -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") diff --git a/site/src/content/docs/commands/zarf_package_remove.md b/site/src/content/docs/commands/zarf_package_remove.md index 34cd131c32..18ac7f8242 100644 --- a/site/src/content/docs/commands/zarf_package_remove.md +++ b/site/src/content/docs/commands/zarf_package_remove.md @@ -26,6 +26,7 @@ zarf package remove { PACKAGE_SOURCE | PACKAGE_NAME } --confirm [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -k, --key string Path to public key file for validating signed packages -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") diff --git a/site/src/content/docs/commands/zarf_tools.md b/site/src/content/docs/commands/zarf_tools.md index ea4d9548da..5725677f8c 100644 --- a/site/src/content/docs/commands/zarf_tools.md +++ b/site/src/content/docs/commands/zarf_tools.md @@ -20,6 +20,7 @@ Collection of additional tools to make airgap easier ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_archiver.md b/site/src/content/docs/commands/zarf_tools_archiver.md index 8f35492acb..221e999c70 100644 --- a/site/src/content/docs/commands/zarf_tools_archiver.md +++ b/site/src/content/docs/commands/zarf_tools_archiver.md @@ -20,6 +20,7 @@ Compresses/Decompresses generic archives, including Zarf packages ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_archiver_compress.md b/site/src/content/docs/commands/zarf_tools_archiver_compress.md index bf79a91511..349f0af8af 100644 --- a/site/src/content/docs/commands/zarf_tools_archiver_compress.md +++ b/site/src/content/docs/commands/zarf_tools_archiver_compress.md @@ -24,6 +24,7 @@ zarf tools archiver compress SOURCES ARCHIVE [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_archiver_decompress.md b/site/src/content/docs/commands/zarf_tools_archiver_decompress.md index 8c2cb441fa..5fc9451e1e 100644 --- a/site/src/content/docs/commands/zarf_tools_archiver_decompress.md +++ b/site/src/content/docs/commands/zarf_tools_archiver_decompress.md @@ -25,6 +25,7 @@ zarf tools archiver decompress ARCHIVE DESTINATION [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_archiver_version.md b/site/src/content/docs/commands/zarf_tools_archiver_version.md index 0dd240f9eb..e3d9ab4bd2 100644 --- a/site/src/content/docs/commands/zarf_tools_archiver_version.md +++ b/site/src/content/docs/commands/zarf_tools_archiver_version.md @@ -24,6 +24,7 @@ zarf tools archiver version [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_clear-cache.md b/site/src/content/docs/commands/zarf_tools_clear-cache.md index e0031b87d5..aa91b53a96 100644 --- a/site/src/content/docs/commands/zarf_tools_clear-cache.md +++ b/site/src/content/docs/commands/zarf_tools_clear-cache.md @@ -25,6 +25,7 @@ zarf tools clear-cache [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_download-init.md b/site/src/content/docs/commands/zarf_tools_download-init.md index adfc4ab508..1a15532858 100644 --- a/site/src/content/docs/commands/zarf_tools_download-init.md +++ b/site/src/content/docs/commands/zarf_tools_download-init.md @@ -25,6 +25,7 @@ zarf tools download-init [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_gen-key.md b/site/src/content/docs/commands/zarf_tools_gen-key.md index 9a15bab77a..493908992b 100644 --- a/site/src/content/docs/commands/zarf_tools_gen-key.md +++ b/site/src/content/docs/commands/zarf_tools_gen-key.md @@ -24,6 +24,7 @@ zarf tools gen-key [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_gen-pki.md b/site/src/content/docs/commands/zarf_tools_gen-pki.md index 8500adc10b..9e5cc1df8b 100644 --- a/site/src/content/docs/commands/zarf_tools_gen-pki.md +++ b/site/src/content/docs/commands/zarf_tools_gen-pki.md @@ -25,6 +25,7 @@ zarf tools gen-pki HOST [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_get-creds.md b/site/src/content/docs/commands/zarf_tools_get-creds.md index 4d56b4e2b8..17f3f9308a 100644 --- a/site/src/content/docs/commands/zarf_tools_get-creds.md +++ b/site/src/content/docs/commands/zarf_tools_get-creds.md @@ -44,6 +44,7 @@ $ zarf tools get-creds artifact ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_helm.md b/site/src/content/docs/commands/zarf_tools_helm.md index 44932c83f3..a516202484 100644 --- a/site/src/content/docs/commands/zarf_tools_helm.md +++ b/site/src/content/docs/commands/zarf_tools_helm.md @@ -36,6 +36,12 @@ Subset of the Helm CLI that includes the repo and dependency commands for managi --repository-config string path to the file containing repository names and URLs ``` +### Options inherited from parent commands + +``` + --config-path string Specify the path of the configuration file to use +``` + ### SEE ALSO * [zarf tools](/commands/zarf_tools/) - Collection of additional tools to make airgap easier diff --git a/site/src/content/docs/commands/zarf_tools_helm_dependency.md b/site/src/content/docs/commands/zarf_tools_helm_dependency.md index 034b077242..3fe6fda97a 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_dependency.md +++ b/site/src/content/docs/commands/zarf_tools_helm_dependency.md @@ -70,6 +70,7 @@ for this case. ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_helm_dependency_build.md b/site/src/content/docs/commands/zarf_tools_helm_dependency_build.md index 4721f010ba..cffdc534b5 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_dependency_build.md +++ b/site/src/content/docs/commands/zarf_tools_helm_dependency_build.md @@ -40,6 +40,7 @@ zarf tools helm dependency build CHART [flags] ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_helm_dependency_list.md b/site/src/content/docs/commands/zarf_tools_helm_dependency_list.md index afea96a40e..dfe62d937d 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_dependency_list.md +++ b/site/src/content/docs/commands/zarf_tools_helm_dependency_list.md @@ -36,6 +36,7 @@ zarf tools helm dependency list CHART [flags] ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_helm_dependency_update.md b/site/src/content/docs/commands/zarf_tools_helm_dependency_update.md index 845bba70e2..48f33408f6 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_dependency_update.md +++ b/site/src/content/docs/commands/zarf_tools_helm_dependency_update.md @@ -44,6 +44,7 @@ zarf tools helm dependency update CHART [flags] ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_helm_repo.md b/site/src/content/docs/commands/zarf_tools_helm_repo.md index cc51f6c4db..1269b27906 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_repo.md +++ b/site/src/content/docs/commands/zarf_tools_helm_repo.md @@ -28,6 +28,7 @@ It can be used to add, remove, list, and index chart repositories. ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_helm_repo_add.md b/site/src/content/docs/commands/zarf_tools_helm_repo_add.md index c6226e3137..4200b316db 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_repo_add.md +++ b/site/src/content/docs/commands/zarf_tools_helm_repo_add.md @@ -35,6 +35,7 @@ zarf tools helm repo add [NAME] [URL] [flags] ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_helm_repo_index.md b/site/src/content/docs/commands/zarf_tools_helm_repo_index.md index 62db97073b..5fb63e810e 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_repo_index.md +++ b/site/src/content/docs/commands/zarf_tools_helm_repo_index.md @@ -39,6 +39,7 @@ zarf tools helm repo index [DIR] [flags] ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_helm_repo_list.md b/site/src/content/docs/commands/zarf_tools_helm_repo_list.md index 4e548393ca..9845f7d3b7 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_repo_list.md +++ b/site/src/content/docs/commands/zarf_tools_helm_repo_list.md @@ -25,6 +25,7 @@ zarf tools helm repo list [flags] ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_helm_repo_remove.md b/site/src/content/docs/commands/zarf_tools_helm_repo_remove.md index ca042bdb1c..1a55865342 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_repo_remove.md +++ b/site/src/content/docs/commands/zarf_tools_helm_repo_remove.md @@ -24,6 +24,7 @@ zarf tools helm repo remove [REPO1 [REPO2 ...]] [flags] ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_helm_repo_update.md b/site/src/content/docs/commands/zarf_tools_helm_repo_update.md index 87b19a94da..cbac077435 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_repo_update.md +++ b/site/src/content/docs/commands/zarf_tools_helm_repo_update.md @@ -36,6 +36,7 @@ zarf tools helm repo update [REPO1 [REPO2 ...]] [flags] ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_helm_version.md b/site/src/content/docs/commands/zarf_tools_helm_version.md index c34e4c17c8..8f32f481ed 100644 --- a/site/src/content/docs/commands/zarf_tools_helm_version.md +++ b/site/src/content/docs/commands/zarf_tools_helm_version.md @@ -24,6 +24,7 @@ zarf tools helm version [flags] ``` --burst-limit int client-side default throttling limit (default 100) + --config-path string Specify the path of the configuration file to use --debug enable verbose output --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. diff --git a/site/src/content/docs/commands/zarf_tools_kubectl.md b/site/src/content/docs/commands/zarf_tools_kubectl.md index 18128b35e3..1fec8f8fea 100644 --- a/site/src/content/docs/commands/zarf_tools_kubectl.md +++ b/site/src/content/docs/commands/zarf_tools_kubectl.md @@ -20,6 +20,12 @@ zarf tools kubectl [flags] -h, --help help for kubectl ``` +### Options inherited from parent commands + +``` + --config-path string Specify the path of the configuration file to use +``` + ### SEE ALSO * [zarf tools](/commands/zarf_tools/) - Collection of additional tools to make airgap easier diff --git a/site/src/content/docs/commands/zarf_tools_monitor.md b/site/src/content/docs/commands/zarf_tools_monitor.md index 73c8d766be..a5b86dfba6 100644 --- a/site/src/content/docs/commands/zarf_tools_monitor.md +++ b/site/src/content/docs/commands/zarf_tools_monitor.md @@ -44,6 +44,12 @@ zarf tools monitor [flags] --write Sets write mode by overriding the readOnly configuration setting ``` +### Options inherited from parent commands + +``` + --config-path string Specify the path of the configuration file to use +``` + ### SEE ALSO * [zarf tools](/commands/zarf_tools/) - Collection of additional tools to make airgap easier diff --git a/site/src/content/docs/commands/zarf_tools_registry.md b/site/src/content/docs/commands/zarf_tools_registry.md index 67b56aa34f..a04e280b1f 100644 --- a/site/src/content/docs/commands/zarf_tools_registry.md +++ b/site/src/content/docs/commands/zarf_tools_registry.md @@ -20,6 +20,12 @@ Tools for working with container registries using go-containertools -v, --verbose Enable debug logs ``` +### Options inherited from parent commands + +``` + --config-path string Specify the path of the configuration file to use +``` + ### SEE ALSO * [zarf tools](/commands/zarf_tools/) - Collection of additional tools to make airgap easier diff --git a/site/src/content/docs/commands/zarf_tools_registry_catalog.md b/site/src/content/docs/commands/zarf_tools_registry_catalog.md index 5b01ae2d43..4c5bfd0ba0 100644 --- a/site/src/content/docs/commands/zarf_tools_registry_catalog.md +++ b/site/src/content/docs/commands/zarf_tools_registry_catalog.md @@ -37,6 +37,7 @@ $ zarf tools registry catalog reg.example.com ``` --allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers + --config-path string Specify the path of the configuration file to use --insecure Allow image references to be fetched without TLS --platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") -v, --verbose Enable debug logs diff --git a/site/src/content/docs/commands/zarf_tools_registry_copy.md b/site/src/content/docs/commands/zarf_tools_registry_copy.md index 4c975d811d..8bcc9f0601 100644 --- a/site/src/content/docs/commands/zarf_tools_registry_copy.md +++ b/site/src/content/docs/commands/zarf_tools_registry_copy.md @@ -27,6 +27,7 @@ zarf tools registry copy SRC DST [flags] ``` --allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers + --config-path string Specify the path of the configuration file to use --insecure Allow image references to be fetched without TLS --platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") -v, --verbose Enable debug logs diff --git a/site/src/content/docs/commands/zarf_tools_registry_delete.md b/site/src/content/docs/commands/zarf_tools_registry_delete.md index 02f234e0f5..296d3d2995 100644 --- a/site/src/content/docs/commands/zarf_tools_registry_delete.md +++ b/site/src/content/docs/commands/zarf_tools_registry_delete.md @@ -36,6 +36,7 @@ $ zarf tools registry delete reg.example.com/stefanprodan/podinfo@sha256:57a654a ``` --allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers + --config-path string Specify the path of the configuration file to use --insecure Allow image references to be fetched without TLS --platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") -v, --verbose Enable debug logs diff --git a/site/src/content/docs/commands/zarf_tools_registry_digest.md b/site/src/content/docs/commands/zarf_tools_registry_digest.md index b2754a6d65..d8b9e89048 100644 --- a/site/src/content/docs/commands/zarf_tools_registry_digest.md +++ b/site/src/content/docs/commands/zarf_tools_registry_digest.md @@ -38,6 +38,7 @@ $ zarf tools registry digest reg.example.com/stefanprodan/podinfo:6.4.0 ``` --allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers + --config-path string Specify the path of the configuration file to use --insecure Allow image references to be fetched without TLS --platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") -v, --verbose Enable debug logs diff --git a/site/src/content/docs/commands/zarf_tools_registry_login.md b/site/src/content/docs/commands/zarf_tools_registry_login.md index 72d7ac95d7..858f82e406 100644 --- a/site/src/content/docs/commands/zarf_tools_registry_login.md +++ b/site/src/content/docs/commands/zarf_tools_registry_login.md @@ -27,6 +27,7 @@ zarf tools registry login [OPTIONS] [SERVER] [flags] ``` --allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers + --config-path string Specify the path of the configuration file to use --insecure Allow image references to be fetched without TLS --platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") -v, --verbose Enable debug logs diff --git a/site/src/content/docs/commands/zarf_tools_registry_ls.md b/site/src/content/docs/commands/zarf_tools_registry_ls.md index 262a676377..f9fb4b792f 100644 --- a/site/src/content/docs/commands/zarf_tools_registry_ls.md +++ b/site/src/content/docs/commands/zarf_tools_registry_ls.md @@ -38,6 +38,7 @@ $ zarf tools registry ls reg.example.com/stefanprodan/podinfo ``` --allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers + --config-path string Specify the path of the configuration file to use --insecure Allow image references to be fetched without TLS --platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") -v, --verbose Enable debug logs diff --git a/site/src/content/docs/commands/zarf_tools_registry_prune.md b/site/src/content/docs/commands/zarf_tools_registry_prune.md index 77fb9bf04a..b1d0953a53 100644 --- a/site/src/content/docs/commands/zarf_tools_registry_prune.md +++ b/site/src/content/docs/commands/zarf_tools_registry_prune.md @@ -25,6 +25,7 @@ zarf tools registry prune [flags] ``` --allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers + --config-path string Specify the path of the configuration file to use --insecure Allow image references to be fetched without TLS --platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") -v, --verbose Enable debug logs diff --git a/site/src/content/docs/commands/zarf_tools_registry_pull.md b/site/src/content/docs/commands/zarf_tools_registry_pull.md index cb2e467f23..a2aad688dd 100644 --- a/site/src/content/docs/commands/zarf_tools_registry_pull.md +++ b/site/src/content/docs/commands/zarf_tools_registry_pull.md @@ -39,6 +39,7 @@ $ zarf tools registry pull reg.example.com/stefanprodan/podinfo:6.4.0 image.tar ``` --allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers + --config-path string Specify the path of the configuration file to use --insecure Allow image references to be fetched without TLS --platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") -v, --verbose Enable debug logs diff --git a/site/src/content/docs/commands/zarf_tools_registry_push.md b/site/src/content/docs/commands/zarf_tools_registry_push.md index beb58ad1f1..83143fd475 100644 --- a/site/src/content/docs/commands/zarf_tools_registry_push.md +++ b/site/src/content/docs/commands/zarf_tools_registry_push.md @@ -42,6 +42,7 @@ $ zarf tools registry push image.tar reg.example.com/stefanprodan/podinfo:6.4.0 ``` --allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers + --config-path string Specify the path of the configuration file to use --insecure Allow image references to be fetched without TLS --platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") -v, --verbose Enable debug logs diff --git a/site/src/content/docs/commands/zarf_tools_registry_version.md b/site/src/content/docs/commands/zarf_tools_registry_version.md index aca0c7176f..b1d2364aa8 100644 --- a/site/src/content/docs/commands/zarf_tools_registry_version.md +++ b/site/src/content/docs/commands/zarf_tools_registry_version.md @@ -31,6 +31,7 @@ zarf tools registry version [flags] ``` --allow-nondistributable-artifacts Allow pushing non-distributable (foreign) layers + --config-path string Specify the path of the configuration file to use --insecure Allow image references to be fetched without TLS --platform string Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64). (default "all") -v, --verbose Enable debug logs diff --git a/site/src/content/docs/commands/zarf_tools_sbom.md b/site/src/content/docs/commands/zarf_tools_sbom.md index b6a733f6ff..3599379b10 100644 --- a/site/src/content/docs/commands/zarf_tools_sbom.md +++ b/site/src/content/docs/commands/zarf_tools_sbom.md @@ -38,6 +38,12 @@ zarf tools sbom [flags] -v, --verbose count increase verbosity (-v = info, -vv = debug) ``` +### Options inherited from parent commands + +``` + --config-path string Specify the path of the configuration file to use +``` + ### SEE ALSO * [zarf tools](/commands/zarf_tools/) - Collection of additional tools to make airgap easier diff --git a/site/src/content/docs/commands/zarf_tools_sbom_attest.md b/site/src/content/docs/commands/zarf_tools_sbom_attest.md index 89c673210f..282a5c0a18 100644 --- a/site/src/content/docs/commands/zarf_tools_sbom_attest.md +++ b/site/src/content/docs/commands/zarf_tools_sbom_attest.md @@ -36,9 +36,10 @@ zarf tools sbom attest --output [FORMAT] [flags] ### Options inherited from parent commands ``` - -c, --config string syft configuration file - -q, --quiet suppress all logging output - -v, --verbose count increase verbosity (-v = info, -vv = debug) + -c, --config string syft configuration file + --config-path string Specify the path of the configuration file to use + -q, --quiet suppress all logging output + -v, --verbose count increase verbosity (-v = info, -vv = debug) ``` ### SEE ALSO diff --git a/site/src/content/docs/commands/zarf_tools_sbom_convert.md b/site/src/content/docs/commands/zarf_tools_sbom_convert.md index 96936399a7..fd3734e03c 100644 --- a/site/src/content/docs/commands/zarf_tools_sbom_convert.md +++ b/site/src/content/docs/commands/zarf_tools_sbom_convert.md @@ -30,9 +30,10 @@ zarf tools sbom convert [SOURCE-SBOM] -o [FORMAT] [flags] ### Options inherited from parent commands ``` - -c, --config string syft configuration file - -q, --quiet suppress all logging output - -v, --verbose count increase verbosity (-v = info, -vv = debug) + -c, --config string syft configuration file + --config-path string Specify the path of the configuration file to use + -q, --quiet suppress all logging output + -v, --verbose count increase verbosity (-v = info, -vv = debug) ``` ### SEE ALSO diff --git a/site/src/content/docs/commands/zarf_tools_sbom_login.md b/site/src/content/docs/commands/zarf_tools_sbom_login.md index a5995424a3..e8810b8b87 100644 --- a/site/src/content/docs/commands/zarf_tools_sbom_login.md +++ b/site/src/content/docs/commands/zarf_tools_sbom_login.md @@ -26,9 +26,10 @@ zarf tools sbom login [OPTIONS] [SERVER] [flags] ### Options inherited from parent commands ``` - -c, --config string syft configuration file - -q, --quiet suppress all logging output - -v, --verbose count increase verbosity (-v = info, -vv = debug) + -c, --config string syft configuration file + --config-path string Specify the path of the configuration file to use + -q, --quiet suppress all logging output + -v, --verbose count increase verbosity (-v = info, -vv = debug) ``` ### SEE ALSO diff --git a/site/src/content/docs/commands/zarf_tools_sbom_scan.md b/site/src/content/docs/commands/zarf_tools_sbom_scan.md index 4c25172c0e..dc9060dce6 100644 --- a/site/src/content/docs/commands/zarf_tools_sbom_scan.md +++ b/site/src/content/docs/commands/zarf_tools_sbom_scan.md @@ -38,9 +38,10 @@ zarf tools sbom scan [SOURCE] [flags] ### Options inherited from parent commands ``` - -c, --config string syft configuration file - -q, --quiet suppress all logging output - -v, --verbose count increase verbosity (-v = info, -vv = debug) + -c, --config string syft configuration file + --config-path string Specify the path of the configuration file to use + -q, --quiet suppress all logging output + -v, --verbose count increase verbosity (-v = info, -vv = debug) ``` ### SEE ALSO diff --git a/site/src/content/docs/commands/zarf_tools_sbom_version.md b/site/src/content/docs/commands/zarf_tools_sbom_version.md index 2d141d1f12..204d7cc9bc 100644 --- a/site/src/content/docs/commands/zarf_tools_sbom_version.md +++ b/site/src/content/docs/commands/zarf_tools_sbom_version.md @@ -24,9 +24,10 @@ zarf tools sbom version [flags] ### Options inherited from parent commands ``` - -c, --config string syft configuration file - -q, --quiet suppress all logging output - -v, --verbose count increase verbosity (-v = info, -vv = debug) + -c, --config string syft configuration file + --config-path string Specify the path of the configuration file to use + -q, --quiet suppress all logging output + -v, --verbose count increase verbosity (-v = info, -vv = debug) ``` ### SEE ALSO diff --git a/site/src/content/docs/commands/zarf_tools_update-creds.md b/site/src/content/docs/commands/zarf_tools_update-creds.md index b023dc0c56..c60470635b 100644 --- a/site/src/content/docs/commands/zarf_tools_update-creds.md +++ b/site/src/content/docs/commands/zarf_tools_update-creds.md @@ -38,7 +38,7 @@ $ zarf tools update-creds \ --artifact-push-username={USERNAME} --artifact-push-token={PASSWORD} # NOTE: Any credentials omitted from flags without a service key specified will be autogenerated - URLs will only change if specified. -# Config options can also be set with the 'init' section of a Zarf config file. +# ConfigPath options can also be set with the 'init' section of a Zarf config file. # Update specific Zarf credentials w/external services: $ zarf tools update-creds registry --registry-push-username={USERNAME} --registry-push-password={PASSWORD} @@ -73,6 +73,7 @@ $ zarf tools update-creds artifact --artifact-push-username={USERNAME} --artifac ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/site/src/content/docs/commands/zarf_tools_wait-for.md b/site/src/content/docs/commands/zarf_tools_wait-for.md index 747db896f1..b907a2d277 100644 --- a/site/src/content/docs/commands/zarf_tools_wait-for.md +++ b/site/src/content/docs/commands/zarf_tools_wait-for.md @@ -54,6 +54,12 @@ $ zarf tools wait-for http google.com success # wait --timeout string Specify the timeout duration for the wait command. (default "5m") ``` +### Options inherited from parent commands + +``` + --config-path string Specify the path of the configuration file to use +``` + ### SEE ALSO * [zarf tools](/commands/zarf_tools/) - Collection of additional tools to make airgap easier diff --git a/site/src/content/docs/commands/zarf_tools_yq.md b/site/src/content/docs/commands/zarf_tools_yq.md index 1ab66ec79f..98280d81a0 100644 --- a/site/src/content/docs/commands/zarf_tools_yq.md +++ b/site/src/content/docs/commands/zarf_tools_yq.md @@ -81,6 +81,12 @@ zarf tools yq -P sample.json --xml-strict-mode enables strict parsing of XML. See https://pkg.go.dev/encoding/xml for more details. ``` +### Options inherited from parent commands + +``` + --config-path string Specify the path of the configuration file to use +``` + ### SEE ALSO * [zarf tools](/commands/zarf_tools/) - Collection of additional tools to make airgap easier diff --git a/site/src/content/docs/commands/zarf_tools_yq_eval-all.md b/site/src/content/docs/commands/zarf_tools_yq_eval-all.md index 29d8b065fa..5cd1d6e0fb 100644 --- a/site/src/content/docs/commands/zarf_tools_yq_eval-all.md +++ b/site/src/content/docs/commands/zarf_tools_yq_eval-all.md @@ -54,6 +54,7 @@ cat file2.yml | zarf tools yq ea '.a.b' file1.yml - file3.yml ``` -C, --colors force print with colors + --config-path string Specify the path of the configuration file to use --csv-auto-parse parse CSV YAML/JSON values (default true) --csv-separator char CSV Separator character (default ,) -e, --exit-status set exit status if there are no matches or null or false is returned diff --git a/site/src/content/docs/commands/zarf_tools_yq_eval.md b/site/src/content/docs/commands/zarf_tools_yq_eval.md index 215184cf00..82435dc672 100644 --- a/site/src/content/docs/commands/zarf_tools_yq_eval.md +++ b/site/src/content/docs/commands/zarf_tools_yq_eval.md @@ -56,6 +56,7 @@ zarf tools yq e '.a.b = "cool"' -i file.yaml ``` -C, --colors force print with colors + --config-path string Specify the path of the configuration file to use --csv-auto-parse parse CSV YAML/JSON values (default true) --csv-separator char CSV Separator character (default ,) -e, --exit-status set exit status if there are no matches or null or false is returned diff --git a/site/src/content/docs/commands/zarf_version.md b/site/src/content/docs/commands/zarf_version.md index 2bffaa5403..c0a76eff5f 100644 --- a/site/src/content/docs/commands/zarf_version.md +++ b/site/src/content/docs/commands/zarf_version.md @@ -29,6 +29,7 @@ zarf version [flags] ``` -a, --architecture string Architecture for OCI images and Zarf packages + --config-path string Specify the path of the configuration file to use --insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture. -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") --no-color Disable colors in output diff --git a/src/cmd/common/setup.go b/src/cmd/common/setup.go index 6fab6e134b..bb879894f2 100644 --- a/src/cmd/common/setup.go +++ b/src/cmd/common/setup.go @@ -32,6 +32,8 @@ func SetupCLI() { message.DisableColor() } + SetViperConfigFilePath(config.CommonOptions.ConfigPath) + printViperConfigUsed() // No log level set, so use the default diff --git a/src/cmd/common/viper.go b/src/cmd/common/viper.go index b852800611..4d51500198 100644 --- a/src/cmd/common/viper.go +++ b/src/cmd/common/viper.go @@ -124,6 +124,17 @@ func InitViper() *viper.Viper { // Specify an alternate config file cfgFile := os.Getenv("ZARF_CONFIG") + if !argsConfigPathIsPresent() { + if cfgFile != "" { + // Use config file from the flag. + v.SetConfigFile(cfgFile) + } else { + // Search config paths in the current directory and $HOME/.zarf. + v.AddConfigPath(".") + v.AddConfigPath("$HOME/.zarf") + v.SetConfigName("zarf-config") + } + } // Don't forget to read config either from cfgFile or from home directory! if cfgFile != "" { @@ -150,6 +161,24 @@ func InitViper() *viper.Viper { return v } +func argsConfigPathIsPresent() bool { + args := os.Args + //check if the config path is set in the args + for _, arg := range args { + if arg == "--config" { + return true + } + } + return false +} + +func SetViperConfigFilePath(vcfgFilePath string) { + if vcfgFilePath != "" { + v.SetConfigFile(config.CommonOptions.ConfigPath) + vConfigError = v.ReadInConfig() + } +} + // GetViper returns the viper singleton func GetViper() *viper.Viper { return v diff --git a/src/cmd/internal.go b/src/cmd/internal.go index b385564151..721f8dcb09 100644 --- a/src/cmd/internal.go +++ b/src/cmd/internal.go @@ -82,6 +82,7 @@ var genCLIDocs = &cobra.Command{ addHiddenDummyFlag(toolCmd, "tmpdir") addHiddenDummyFlag(toolCmd, "insecure") addHiddenDummyFlag(toolCmd, "no-color") + addHiddenDummyFlag(toolCmd, "config-path") } // Remove the default values from all of the helm commands during the CLI command doc generation diff --git a/src/cmd/root.go b/src/cmd/root.go index ee40254fe0..fcc76bddd4 100644 --- a/src/cmd/root.go +++ b/src/cmd/root.go @@ -97,4 +97,5 @@ func init() { rootCmd.PersistentFlags().StringVar(&config.CommonOptions.CachePath, "zarf-cache", v.GetString(common.VZarfCache), lang.RootCmdFlagCachePath) rootCmd.PersistentFlags().StringVar(&config.CommonOptions.TempDirectory, "tmpdir", v.GetString(common.VTmpDir), lang.RootCmdFlagTempDir) rootCmd.PersistentFlags().BoolVar(&config.CommonOptions.Insecure, "insecure", v.GetBool(common.VInsecure), lang.RootCmdFlagInsecure) + rootCmd.PersistentFlags().StringVar(&config.CommonOptions.ConfigPath, "config-path", "", lang.RootCmdFlagConfigPath) } diff --git a/src/config/lang/english.go b/src/config/lang/english.go index df39428f48..80f239abae 100644 --- a/src/config/lang/english.go +++ b/src/config/lang/english.go @@ -54,6 +54,7 @@ const ( RootCmdFlagCachePath = "Specify the location of the Zarf cache directory" RootCmdFlagTempDir = "Specify the temporary directory to use for intermediate files" RootCmdFlagInsecure = "Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture." + RootCmdFlagConfigPath = "Specify the path of the configuration file to use" RootCmdDeprecatedDeploy = "Deprecated: Please use \"zarf package deploy %s\" to deploy this package. This warning will be removed in Zarf v1.0.0." RootCmdDeprecatedCreate = "Deprecated: Please use \"zarf package create\" to create this package. This warning will be removed in Zarf v1.0.0." @@ -570,7 +571,7 @@ $ zarf tools update-creds \ --artifact-push-username={USERNAME} --artifact-push-token={PASSWORD} # NOTE: Any credentials omitted from flags without a service key specified will be autogenerated - URLs will only change if specified. -# Config options can also be set with the 'init' section of a Zarf config file. +# ConfigPath options can also be set with the 'init' section of a Zarf config file. # Update specific Zarf credentials w/external services: $ zarf tools update-creds registry --registry-push-username={USERNAME} --registry-push-password={PASSWORD} @@ -598,6 +599,7 @@ $ zarf tools update-creds artifact --artifact-push-username={USERNAME} --artifac // cmd viper setup CmdViperErrLoadingConfigFile = "failed to load config file: %s" CmdViperInfoUsingConfigFile = "Using config file %s" + CmdViperNoConfigFileProvided = "No config file found" ) // Zarf Agent messages diff --git a/src/test/e2e/29_config_file_test.go b/src/test/e2e/29_config_file_test.go index 5095efa91f..abf0e48e44 100644 --- a/src/test/e2e/29_config_file_test.go +++ b/src/test/e2e/29_config_file_test.go @@ -18,17 +18,23 @@ func TestConfigFile(t *testing.T) { e2e.SetupWithCluster(t) var ( - path = fmt.Sprintf("zarf-package-config-file-%s.tar.zst", e2e.Arch) - dir = "examples/config-file" - config = "zarf-config.toml" + path = fmt.Sprintf("zarf-package-config-file-%s.tar.zst", e2e.Arch) + dir = "examples/config-file" + config = "zarf-config.toml" + configPath = filepath.Join(dir, config) ) + // defer unsetting the ZARF_CONFIG so that we can test w/ the env var and w/ the flag both + defer os.Unsetenv("ZARF_CONFIG") e2e.CleanFiles(path) + // Test the config file flag + os.Unsetenv("ZARF_CONFIG") + configFileTests(t, dir, path, configPath) + // Test the config file environment variable - t.Setenv("ZARF_CONFIG", filepath.Join(dir, config)) - defer os.Unsetenv("ZARF_CONFIG") - configFileTests(t, dir, path) + t.Setenv("ZARF_CONFIG", configPath) + configFileTests(t, dir, path, "") configFileDefaultTests(t) @@ -38,15 +44,17 @@ func TestConfigFile(t *testing.T) { e2e.CleanFiles(path) } -func configFileTests(t *testing.T, dir, path string) { +func configFileTests(t *testing.T, dir, path string, configPath string) { t.Helper() - _, stdErr, err := e2e.Zarf("package", "create", dir, "--confirm") + args := addConfigIfPresent([]string{"package", "create", dir, "--confirm"}, configPath) + _, stdErr, err := e2e.Zarf(args...) require.NoError(t, err) require.Contains(t, string(stdErr), "This is a zebra and they have stripes") require.Contains(t, string(stdErr), "This is a leopard and they have spots") - _, stdErr, err = e2e.Zarf("package", "deploy", path, "--confirm") + args = addConfigIfPresent([]string{"package", "deploy", path, "--confirm"}, configPath) + _, stdErr, err = e2e.Zarf(args...) require.NoError(t, err) require.Contains(t, string(stdErr), "📦 LION COMPONENT") require.NotContains(t, string(stdErr), "📦 LEOPARD COMPONENT") @@ -166,3 +174,10 @@ func configFileDefaultTests(t *testing.T) { require.Contains(t, string(stdOut), test) } } + +func addConfigIfPresent(args []string, value string) []string { + if value != "" { + return append(args, fmt.Sprintf("--config-path=%s", value)) + } + return args +} diff --git a/src/types/runtime.go b/src/types/runtime.go index b4a7d44ad2..3e3cb47d99 100644 --- a/src/types/runtime.go +++ b/src/types/runtime.go @@ -23,6 +23,7 @@ type ZarfCommonOptions struct { CachePath string `json:"cachePath" jsonschema:"description=Path to use to cache images and git repos on package create"` TempDirectory string `json:"tempDirectory" jsonschema:"description=Location Zarf should use as a staging ground when managing files and images for package creation and deployment"` OCIConcurrency int `jsonschema:"description=Number of concurrent layer operations to perform when interacting with a remote package"` + ConfigPath string `json:"configPath" jsonschema:"description=Location of the Zarf configuration file"` } // ZarfPackageOptions tracks the user-defined preferences during common package operations.