constants

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package constants provides tanzu cli constants.

Index

Constants

View Source
const (
	TKGProxyCACert                                    = "TKG_PROXY_CA_CERT"
	ConfigVariableCustomImageRepository               = "TKG_CUSTOM_IMAGE_REPOSITORY"
	ConfigVariableCustomImageRepositoryCaCertificate  = "TKG_CUSTOM_IMAGE_REPOSITORY_CA_CERTIFICATE"
	ConfigVariableCustomImageRepositorySkipTLSVerify  = "TKG_CUSTOM_IMAGE_REPOSITORY_SKIP_TLS_VERIFY"
	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"
	ConfigVariablePreReleasePluginRepoImage           = "TANZU_CLI_PRE_RELEASE_REPO_IMAGE"
	ConfigVariablePreReleasePluginRepoImageBypass     = "TEST_BYPASS"
	ConfigVariableAdditionalDiscoveryForTesting       = "ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY"
)

Configuration variable name constants

View Source
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
)
View Source
const (
	// FeatureContextCommand determines whether to surface the context command. This is disabled by default.
	FeatureContextCommand = "features.global.context-target-v2"
	// FeatureDisableCentralRepositoryForTesting determines if the CLI uses the Central Repository of plugins.
	FeatureDisableCentralRepositoryForTesting = "features.global.no-central-repo-test-only"
)

This block is for global feature constants, to allow them to be used more broadly

View Source
const (
	TKGRegistryCertFile                    = "registry_certs"
	TKGRegistryTrustedRootCAFileForWindows = ".registry_trusted_root_certs_win"
)

File name related constants

View Source
const (
	AllowedRegistries = "ALLOWED_REGISTRY"
)
View Source
const (
	ConfigFilePermissions = 0o600
)

ConfigFilePermissions defines the permissions of the config file

View Source
const (
	ProxyCACert = "PROXY_CA_CERT"
)

environment variables for http proxy

Variables

View Source
var (
	DefaultCliFeatureFlags = map[string]bool{
		FeatureContextCommand: true,
	}
)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL