Documentation ¶
Overview ¶
Package constants provides tanzu cli constants.
Index ¶
Constants ¶
const ( ConfigVariableCustomImageRepository = "TKG_CUSTOM_IMAGE_REPOSITORY" ConfigVariableDefaultStandaloneDiscoveryImagePath = "TKG_DEFAULT_STANDALONE_DISCOVERY_IMAGE_PATH" ConfigVariableDefaultStandaloneDiscoveryImageTag = "TKG_DEFAULT_STANDALONE_DISCOVERY_IMAGE_TAG" ConfigVariableDefaultStandaloneDiscoveryType = "TKG_DEFAULT_STANDALONE_DISCOVERY_TYPE" ConfigVariableDefaultStandaloneDiscoveryLocalPath = "TKG_DEFAULT_STANDALONE_DISCOVERY_LOCAL_PATH" )
Configuration variable name constants
const ( // TanzuCLISystemNamespace is the namespace for tanzu cli resources TanzuCLISystemNamespace = "tanzu-cli-system" // CLIPluginImageRepositoryOverrideLabel is the label on the configmap which specifies CLIPlugin image repository override CLIPluginImageRepositoryOverrideLabel = "cli.tanzu.vmware.com/cliplugin-image-repository-override" // DefaultQPS is the default maximum query per second for the rest config DefaultQPS = 200 // DefaultBurst is the default maximum burst for throttle for the rest config DefaultBurst = 200 // TanzuCLIDefaultCentralPluginDiscoveryImage defines the default discovery image // from where the CLI will discover the plugins TanzuCLIDefaultCentralPluginDiscoveryImage = "projects.packages.broadcom.com/tanzu_cli/plugins/plugin-inventory:latest" // TanzuCLIOldCentralPluginDiscoveryImage defines the old discovery image // from where the CLI used to discover the plugins TanzuCLIOldCentralPluginDiscoveryImage = "projects.registry.vmware.com/tanzu_cli/plugins/plugin-inventory:latest" // DefaultCLIEssentialsPluginGroupName name of the essentials plugin group which is used to install essential plugins DefaultCLIEssentialsPluginGroupName = "vmware-tanzucli/essentials" // TanzuContextPluginDiscoveryEndpointPath specifies the default plugin discovery endpoint path // Note: This path value needs to be updated once the Tanzu context backend support the context-scoped // plugin discovery and the endpoint value gets finalized // Until then for testing purpose, user can overwrite this path using `TANZU_CLI_PLUGIN_DISCOVERY_PATH_FOR_TANZU_CONTEXT` // environment variable TanzuContextPluginDiscoveryEndpointPath = "/discovery" // CentralConfigFileName is the name of the central config file CentralConfigFileName = "central_config.yaml" )
const ( AllowedRegistries = "ALLOWED_REGISTRY" ConfigVariableAdditionalDiscoveryForTesting = "TANZU_CLI_ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY" ConfigVariableAdditionalPrivateDiscoveryImages = "TANZU_CLI_PRIVATE_PLUGIN_DISCOVERY_IMAGES" ConfigVariableIncludeDeactivatedPluginsForTesting = "TANZU_CLI_INCLUDE_DEACTIVATED_PLUGINS_TEST_ONLY" ConfigVariableStandaloneOverContextPlugins = "TANZU_CLI_STANDALONE_OVER_CONTEXT_PLUGINS" // PluginDiscoveryImageSignatureVerificationSkipList is a comma separated list of discovery image urls PluginDiscoveryImageSignatureVerificationSkipList = "TANZU_CLI_PLUGIN_DISCOVERY_IMAGE_SIGNATURE_VERIFICATION_SKIP_LIST" PublicKeyPathForPluginDiscoveryImageSignature = "TANZU_CLI_PLUGIN_DISCOVERY_IMAGE_SIGNATURE_PUBLIC_KEY_PATH" SuppressSkipSignatureVerificationWarning = "TANZU_CLI_SUPPRESS_SKIP_SIGNATURE_VERIFICATION_WARNING" CEIPOptInUserPromptAnswer = "TANZU_CLI_CEIP_OPT_IN_PROMPT_ANSWER" EULAPromptAnswer = "TANZU_CLI_EULA_PROMPT_ANSWER" // Environment variable to indicate that the CLI is running in E2E test environment E2ETestEnvironment = "TANZU_CLI_E2E_TEST_ENVIRONMENT" ShowTelemetryConsoleLogs = "TANZU_CLI_SHOW_TELEMETRY_CONSOLE_LOGS" TelemetrySuperColliderEnvironment = "TANZU_CLI_SUPERCOLLIDER_ENVIRONMENT" // TanzuCLIEssentialsPluginGroupName is used to override and customize the default essentials plugin group name TanzuCLIEssentialsPluginGroupName = "TANZU_CLI_ESSENTIALS_PLUGIN_GROUP_NAME" // TanzuCLIEssentialsPluginGroupVersion is used to override and customize what version of essentials plugin group should be installed TanzuCLIEssentialsPluginGroupVersion = "TANZU_CLI_ESSENTIALS_PLUGIN_GROUP_VERSION" // TanzuCLIShowPluginInstallationLogs is used to enable or disable the logs for essential plugin group installation process // Possible values "True" or "False" // by default logs are enabled TanzuCLIShowPluginInstallationLogs = "TANZU_CLI_SHOW_PLUGIN_INSTALLATION_LOGS" // Suppress updating the current context of the kubeconfig referenced in // the CLI Context being activated. SkipUpdateKubeconfigOnContextUse = "TANZU_CLI_SKIP_UPDATE_KUBECONFIG_ON_CONTEXT_USE" // Control the different ActiveHelp options // If set to 0, Cobra will automatically deactivate all ActiveHelp for the CLI ConfigVariableActiveHelp = "TANZU_ACTIVE_HELP" // Change the default value of the plugin inventory cache TTL ConfigVariablePluginDBCacheTTLSeconds = "TANZU_CLI_PLUGIN_DB_CACHE_TTL_SECONDS" // ConfigVariablePluginDBCacheRefreshThresholdSeconds Change the default value of db cache refresh threshold ConfigVariablePluginDBCacheRefreshThresholdSeconds = "TANZU_CLI_PLUGIN_DB_CACHE_REFRESH_THRESHOLD_SECONDS" // ConfigVariableRecommendVersionDelayDays Change the default value of the delay between printing a recommended version message ConfigVariableRecommendVersionDelayDays = "TANZU_CLI_RECOMMEND_VERSION_DELAY_DAYS" // CSPLoginOrgID overrides the CSP default OrgID to which the user logs into, using CLI interactive login flow // Note: More information regarding the CSP organizations can be found at // https://docs.vmware.com/en/VMware-Cloud-services/services/Using-VMware-Cloud-Services/GUID-CF9E9318-B811-48CF-8499-9419997DC1F8.html CSPLoginOrgID = "TANZU_CLI_CLOUD_SERVICES_ORGANIZATION_ID" // UaaLoginOrgID overrides OrgID associated with the UAA based endpoint // This may not be necessary or could be discoverable in the future, at which point this will be ignored. UAALoginOrgID = "TANZU_CLI_SM_ORGANIZATION_ID" // UaaLoginOrgName overrides name of the Org associated with the UAA based endpoint // This may not be necessary or could be discoverable in the future, at which point this will be ignored. UAALoginOrgName = "TANZU_CLI_SM_ORGANIZATION_NAME" // UAAUseAlternateClient allows use of an alternate UAA client for non-interactive logins UAAUseAlternateClient = "TANZU_CLI_USE_ALTERNATE_UAA_CLIENT" // UAANoClientSecret skips setting of OAuth Client Secret UAANoClientSecret = "TANZU_CLI_NO_UAA_CLIENT_SECRET" //nolint:gosec // TanzuCLIOAuthLocalListenerPort is the port to be used by local listener for OAuth authorization flow TanzuCLIOAuthLocalListenerPort = "TANZU_CLI_OAUTH_LOCAL_LISTENER_PORT" // TanzuPluginDiscoveryPathforTanzuContext specifies the custom endpoint path to use with the kubeconfig when talking // to the tanzu context to get the recommended plugins by querying CLIPlugin resources // If environment variable 'TANZU_CLI_PLUGIN_DISCOVERY_PATH_FOR_TANZU_CONTEXT' is not configured // default discovery endpoint configured with TanzuContextPluginDiscoveryEndpointPath will be used TanzuPluginDiscoveryPathforTanzuContext = "TANZU_CLI_PLUGIN_DISCOVERY_PATH_FOR_TANZU_CONTEXT" // SkipPluginGroupVerificationOnPublish skips the plugin group verification of whether the plugins specified // in the plugin-group are available in the database or not. // Note: THIS SHOULD ONLY BE USED FOR TEST AND NON PRODUCTION ENVIRONMENTS. SkipPluginGroupVerificationOnPublish = "TANZU_CLI_SKIP_PLUGIN_GROUP_VERIFICATION_ON_PUBLISH" // SkipAutoInstallOfContextRecommendedPlugins skips the auto-installation of the context recommended plugins // on `tanzu context create` or `tanzu context use` SkipAutoInstallOfContextRecommendedPlugins = "TANZU_CLI_SKIP_CONTEXT_RECOMMENDED_PLUGIN_INSTALLATION" // SkipTAPScopesValidationOnTanzuContext skips the TAP scopes validation on the token acquired while creating "tanzu" // context using tanzu login or tanzu context create command SkipTAPScopesValidationOnTanzuContext = "TANZU_CLI_SKIP_TAP_SCOPES_VALIDATION_ON_TANZU_CONTEXT" // AuthenticatedRegistry provides a comma separated list of registry hosts that requires authentication // to pull images. Tanzu CLI will use default docker auth to communicate to these registries AuthenticatedRegistry = "TANZU_CLI_AUTHENTICATED_REGISTRY" // UseStableKubeContextNameForTanzuContext uses the stable kube context name associated with tanzu context. // CLI would not change the context name when the TAP resource pointed by the CLI context is changed. UseStableKubeContextNameForTanzuContext = "TANZU_CLI_USE_STABLE_KUBE_CONTEXT_NAME" // ActivatePluginsOnPluginGroupPublish activates all the plugins specified within the plugin group // as part of the plugin group publishing ActivatePluginsOnPluginGroupPublish = "TANZU_CLI_ACTIVATE_PLUGINS_ON_PLUGIN_GROUP_PUBLISH" // UseTanzuCSP uses the Tanzu CSP while login/context creation UseTanzuCSP = "TANZU_CLI_USE_TANZU_CLOUD_SERVICE_PROVIDER" // TPKubernetesOpsEndpoint specifies kubernetes ops endpoint for the Tanzu Platform // This will be used as part of `tanzu login` TPKubernetesOpsEndpoint = "TANZU_CLI_K8S_OPS_ENDPOINT" // TPHubEndpoint specifies hub endpoint for the Tanzu Platform // This will be used as part of `tanzu login` TPHubEndpoint = "TANZU_CLI_HUB_ENDPOINT" // TPUCPEndpoint specifies UCP endpoint for the Tanzu Platform // This will be used as part of `tanzu login` TPUCPEndpoint = "TANZU_CLI_UCP_ENDPOINT" )
const ( // FeatureContextCommand determines whether to surface the context command. This is disabled by default. // This feature flag is no longer used. However, we keep it defined so that it can be used to know // if an older CLI (< 1.3.0) was last executed. FeatureContextCommand = "features.global.context-target-v2" // FeaturePluginDiscoveryForTanzuContext determines whether to enable context-scoped plugin discovery for Tanzu context. // This is disabled by default FeaturePluginDiscoveryForTanzuContext = "features.global.plugin-discovery-for-tanzu-context" // FeaturePluginOverrideOnActiveContextType determines whether a plugin-level mapping that potentially // overrides an existing CLI command group should be conditional on the active context type or not. // When false, the mapping will be unconditionally applied. FeaturePluginOverrideOnActiveContextType = "features.global.plugin-override-on-active-context-type" )
This block is for global feature constants, to allow them to be used more broadly
const ( TKGRegistryCertFile = "registry_certs" TKGRegistryTrustedRootCAFileForWindows = ".registry_trusted_root_certs_win" )
File name related constants
const ( InstallEssentialPluginGroupsMsg = "The tanzu cli essential plugins have not been installed and are being installed now. The install may take a few seconds." UpgradeEssentialPluginGroupsMsg = "The tanzu cli essential plugins are outdated and are being updated now. The update may take a few seconds." )
const (
ConfigFilePermissions = 0o600
)
ConfigFilePermissions defines the permissions of the config file
const (
ProxyCACert = "PROXY_CA_CERT"
)
environment variables for http proxy
Variables ¶
var (
DefaultCliFeatureFlags = map[string]bool{}
)
DefaultCliFeatureFlags is used to populate an initially empty config file with default values for feature flags. The keys MUST be in the format "features.global.<feature>" or initialization will fail
If a developer expects that their feature will be ready to release, they should create an entry here with a true value. If a developer has a beta feature they want to expose, but leave turned off by default, they should create an entry here with a false value. WE HIGHLY RECOMMEND the use of a SEPARATE flag for beta use; one that ends in "-beta". Thus, if you plan to eventually release a feature with a flag named "features.global.foo-bar", you should consider releasing the beta version with "features.global.foo-bar-beta". This will make it much easier when it comes time for mainstreaming the feature (with a default true value) under the flag name "features.global.foo-bar", as there will be no conflict with previous installs (that have a false value for the entry "features.global.foo-bar-beta").
Functions ¶
This section is empty.
Types ¶
This section is empty.