Documentation ¶
Overview ¶
Package constants provides TKG constants
Index ¶
Constants ¶
View Source
const ( KindCluster = "Cluster" KindTanzuKubernetesCluster = "TanzuKubernetesCluster" PacificGCMControllerDeployment = "vmware-system-tkg-controller-manager" PacificGCMControllerNamespace = "vmware-system-tkg" // PacificClusterKind vsphere-pacific provider work load cluster kind PacificClusterKind = "TanzuKubernetesCluster" PacificClusterListKind = "TanzuKubernetesClusterList" DefaultPacificClusterAPIVersion = "run.tanzu.vmware.com/v1alpha2" CronJobKind = "CronJob" CeipNamespace = "tkg-system-telemetry" CeipAPIVersion = "batch/v1beta1" CeipJobName = "tkg-telemetry" AntreaDeploymentName = "antrea-controller" AntreaDeploymentNamespace = "kube-system" CalicoDeploymentName = "calico-kube-controllers" CalicoDeploymentNamespace = "kube-system" TanzuRunAPIGroupPath = "/apis/run.tanzu.vmware.com" PinnipedSupervisorNameSpace = "pinniped-supervisor" PinnipedFederationDomainObjectName = "pinniped-federation-domain" PinnipedFederationDomainObjectKind = "FederationDomain" PinnipedFederationDomainObjectAPIVersion = "config.supervisor.pinniped.dev/v1alpha1" PinnipedSupervisorDefaultTLSSecretName = "pinniped-supervisor-default-tls-certificate" // #nosec TkgNamespace = "tkg-system" TkrNamespace = "tkr-system" TkrConfigMapName = "tkr-controller-config" TkgPublicNamespace = "tkg-system-public" TmcNamespace = "vmware-system-tmc" KappControllerNamespace = "tkg-system" KappControllerConfigMapName = "kapp-controller-config" AddonsManagerDeploymentName = "tanzu-addons-controller-manager" KappControllerDeploymentName = "kapp-controller" TkrControllerDeploymentName = "tkr-controller-manager" KappControllerPackageName = "kapp-controller" CoreManagementPluginsPackageName = "tanzu-core-management-plugins" AkoStatefulSetName = "ako" AkoAddonName = "load-balancer-and-ingress-service" AkoNamespace = "avi-system" AkoCleanUpAnnotationKey = "AviObjectDeletionStatus" AkoCleanUpFinishedStatus = "Done" ServiceDNSSuffix = ".svc" ServiceDNSClusterLocalSuffix = ".svc.cluster.local" // TKGDataValueFormatString is required annotations for YTT data value file TKGDataValueFormatString = "#@data/values\n#@overlay/match-child-defaults missing_ok=True\n---\n" )
cluster related constants used internally
View Source
const ( PlanDev = "dev" PlanProd = "prod" )
deployment plan constants
View Source
const ( InfrastructureProviderVSphere = "vsphere" InfrastructureProviderAWS = "aws" InfrastructureProviderAzure = "azure" InfrastructureProviderDocker = "docker" )
infrastructure provider name constants
View Source
const ( VSphereMachineTemplate = "VSphereMachineTemplate" AWSMachineTemplate = "AWSMachineTemplate" AzureMachineTemplate = "AzureMachineTemplate" DockerMachineTemplate = "DockerMachineTemplate" )
machine template name constants
View Source
const ( // InfrastructureRefVSphere is the vSphere infrastructure InfrastructureRefVSphere = "VSphereCluster" // InfrastructureRefAWS is the AWS infrastructure InfrastructureRefAWS = "AWSCluster" // InfrastructureRefAzure is the Azure infrastructure InfrastructureRefAzure = "AzureCluster" )
View Source
const ( IPv4Family = "ipv4" IPv6Family = "ipv6" DualStackPrimaryIPv4Family = "ipv4,ipv6" DualStackPrimaryIPv6Family = "ipv6,ipv4" LocalHost = "localhost" LocalHostIP = "127.0.0.1" LocalHostIPv6 = "::1" LinkLocalAddress = "169.254.0.0/16" AzurePublicVIP = "168.63.129.16" )
networking constants
View Source
const ( // AddonSecretType is the add on Secret type AddonSecretType = "tkg.tanzu.vmware.com/addon" // nolint:gosec // AddonNameLabel is the label on the Secret to indicate the name of addon to be installed AddonNameLabel = "tkg.tanzu.vmware.com/addon-name" // ClusterNameLabel is the label on the Secret to indicate the cluster on which addon is to be installed ClusterNameLabel = "tkg.tanzu.vmware.com/cluster-name" )
addons related constants
View Source
const ( // OverrideFolderKey key for overrides folder to override the default overrides directory($HOME/.cluster-api/overrides) OverrideFolderKey = "overridesFolder" ImagesConfigKey = "images" ReleaseKey = "release" ProvidersConfigKey = "providers" CertManagerConfigKey = "cert-manager" InfrastructureProviderType = "InfrastructureProvider" KeyTkg = "tkg" KeyRegions = "regions" KeyRegionName = "name" KeyCurrentRegionContext = "current-region-context" KeyRegionContext = "context" KeyCertManagerTimeout = "cert-manager-timeout" )
config key name constants
View Source
const ( ConfigVariableDefaultBomFile = "TKG_DEFAULT_BOM" ConfigVariableCustomImageRepository = "TKG_CUSTOM_IMAGE_REPOSITORY" ConfigVariableDevImageRepository = "TKG_DEV_IMAGE_REPOSITORY" ConfigVariableCompatibilityCustomImagePath = "TKG_CUSTOM_COMPATIBILITY_IMAGE_PATH" ConfigVariableCustomImageRepositorySkipTLSVerify = "TKG_CUSTOM_IMAGE_REPOSITORY_SKIP_TLS_VERIFY" ConfigVariableCustomImageRepositoryCaCertificate = "TKG_CUSTOM_IMAGE_REPOSITORY_CA_CERTIFICATE" 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" ConfigVariableAWSRegion = "AWS_REGION" ConfigVariableAWSSecretAccessKey = "AWS_SECRET_ACCESS_KEY" //nolint:gosec ConfigVariableAWSAccessKeyID = "AWS_ACCESS_KEY_ID" //nolint:gosec ConfigVariableAWSSessionToken = "AWS_SESSION_TOKEN" //nolint:gosec ConfigVariableAWSProfile = "AWS_PROFILE" ConfigVariableAWSB64Credentials = "AWS_B64ENCODED_CREDENTIALS" //nolint:gosec ConfigVariableAWSVPCID = "AWS_VPC_ID" ConfigVariableAWSPublicNodeCIDR = "AWS_PUBLIC_NODE_CIDR" ConfigVariableAWSPrivateNodeCIDR = "AWS_PRIVATE_NODE_CIDR" ConfigVariableAWSPublicNodeCIDR1 = "AWS_PUBLIC_NODE_CIDR_1" ConfigVariableAWSPrivateNodeCIDR1 = "AWS_PRIVATE_NODE_CIDR_1" ConfigVariableAWSPublicNodeCIDR2 = "AWS_PUBLIC_NODE_CIDR_2" ConfigVariableAWSPrivateNodeCIDR2 = "AWS_PRIVATE_NODE_CIDR_2" ConfigVariableAWSPublicSubnetID = "AWS_PUBLIC_SUBNET_ID" ConfigVariableAWSPrivateSubnetID = "AWS_PRIVATE_SUBNET_ID" ConfigVariableAWSPublicSubnetID1 = "AWS_PUBLIC_SUBNET_ID_1" ConfigVariableAWSPrivateSubnetID1 = "AWS_PRIVATE_SUBNET_ID_1" ConfigVariableAWSPublicSubnetID2 = "AWS_PUBLIC_SUBNET_ID_2" ConfigVariableAWSPrivateSubnetID2 = "AWS_PRIVATE_SUBNET_ID_2" ConfigVariableAWSVPCCIDR = "AWS_VPC_CIDR" ConfigVariableAWSNodeAz = "AWS_NODE_AZ" ConfigVariableAWSNodeAz1 = "AWS_NODE_AZ_1" ConfigVariableAWSAMIID = "AWS_AMI_ID" ConfigVariableVsphereControlPlaneEndpoint = "VSPHERE_CONTROL_PLANE_ENDPOINT" ConfigVariableVsphereServer = "VSPHERE_SERVER" ConfigVariableVsphereUsername = "VSPHERE_USERNAME" ConfigVariableVspherePassword = "VSPHERE_PASSWORD" ConfigVariableVsphereTLSThumbprint = "VSPHERE_TLS_THUMBPRINT" ConfigVariableVsphereSSHAuthorizedKey = "VSPHERE_SSH_AUTHORIZED_KEY" ConfigVariableVsphereTemplate = "VSPHERE_TEMPLATE" ConfigVariableVsphereDatacenter = "VSPHERE_DATACENTER" ConfigVariableVsphereResourcePool = "VSPHERE_RESOURCE_POOL" ConfigVariableVsphereStoragePolicyID = "VSPHERE_STORAGE_POLICY_ID" ConfigVariableVsphereDatastore = "VSPHERE_DATASTORE" ConfigVariableVsphereFolder = "VSPHERE_FOLDER" ConfigVariableVsphereNumCpus = "VSPHERE_NUM_CPUS" ConfigVariableVsphereMemMib = "VSPHERE_MEM_MIB" ConfigVariableVsphereDiskGib = "VSPHERE_DISK_GIB" ConfigVariableVsphereWorkerNumCpus = "VSPHERE_WORKER_NUM_CPUS" ConfigVariableVsphereWorkerMemMib = "VSPHERE_WORKER_MEM_MIB" ConfigVariableVsphereWorkerDiskGib = "VSPHERE_WORKER_DISK_GIB" ConfigVariableVsphereCPNumCpus = "VSPHERE_CONTROL_PLANE_NUM_CPUS" ConfigVariableVsphereCPMemMib = "VSPHERE_CONTROL_PLANE_MEM_MIB" ConfigVariableVsphereCPDiskGib = "VSPHERE_CONTROL_PLANE_DISK_GIB" ConfigVariableVsphereInsecure = "VSPHERE_INSECURE" // VCInsecure decides if the vc connection will skip the ssl validation or not. ConfigVariableVsphereVersion = "VSPHERE_VERSION" ConfigVariableVsphereNetwork = "VSPHERE_NETWORK" ConfigVariableVsphereHaProvider = "AVI_CONTROL_PLANE_HA_PROVIDER" ConfigVariableAzureLocation = "AZURE_LOCATION" ConfigVariableAzureImageID = "AZURE_IMAGE_ID" ConfigVariableAzureImagePublisher = "AZURE_IMAGE_PUBLISHER" ConfigVariableAzureImageOffer = "AZURE_IMAGE_OFFER" ConfigVariableAzureImageSku = "AZURE_IMAGE_SKU" ConfigVariableAzureImageVersion = "AZURE_IMAGE_VERSION" ConfigVariableAzureImageThirdParty = "AZURE_IMAGE_THIRD_PARTY" ConfigVariableAzureImageResourceGroup = "AZURE_IMAGE_RESOURCE_GROUP" ConfigVariableAzureImageName = "AZURE_IMAGE_NAME" ConfigVariableAzureImageSubscriptionID = "AZURE_IMAGE_SUBSCRIPTION_ID" ConfigVariableAzureImageGallery = "AZURE_IMAGE_GALLERY" ConfigVariableAzureSubscriptionIDB64 = "AZURE_SUBSCRIPTION_ID_B64" ConfigVariableAzureTenantIDB64 = "AZURE_TENANT_ID_B64" ConfigVariableAzureClientSecretB64 = "AZURE_CLIENT_SECRET_B64" //nolint:gosec ConfigVariableAzureClientIDB64 = "AZURE_CLIENT_ID_B64" ConfigVariableAzureSubscriptionID = "AZURE_SUBSCRIPTION_ID" ConfigVariableAzureTenantID = "AZURE_TENANT_ID" ConfigVariableAzureClientSecret = "AZURE_CLIENT_SECRET" //nolint:gosec ConfigVariableAzureClientID = "AZURE_CLIENT_ID" ConfigVariableAzureResourceGroup = "AZURE_RESOURCE_GROUP" ConfigVariableAzureVnetName = "AZURE_VNET_NAME" ConfigVariableAzureVnetResourceGroup = "AZURE_VNET_RESOURCE_GROUP" ConfigVariableAzureVnetCidr = "AZURE_VNET_CIDR" ConfigVariableAzureControlPlaneSubnet = "AZURE_CONTROL_PLANE_SUBNET_NAME" ConfigVariableAzureWorkerSubnet = "AZURE_NODE_SUBNET_NAME" ConfigVariableAzureControlPlaneSubnetCidr = "AZURE_CONTROL_PLANE_SUBNET_CIDR" ConfigVariableAzureWorkerNodeSubnetCidr = "AZURE_NODE_SUBNET_CIDR" ConfigVariableAzureSSHPublicKeyB64 = "AZURE_SSH_PUBLIC_KEY_B64" ConfigVariableAzureCPMachineType = "AZURE_CONTROL_PLANE_MACHINE_TYPE" ConfigVariableAzureNodeMachineType = "AZURE_NODE_MACHINE_TYPE" ConfigVariableAzureEnvironment = "AZURE_ENVIRONMENT" ConfigVariableDockerMachineTemplateImage = "DOCKER_MACHINE_TEMPLATE_IMAGE" ConfigVariablePinnipedSupervisorIssuerURL = "SUPERVISOR_ISSUER_URL" ConfigVariablePinnipedSupervisorIssuerCABundleData = "SUPERVISOR_ISSUER_CA_BUNDLE_DATA_B64" ConfigVariableClusterRole = "TKG_CLUSTER_ROLE" ConfigVariableForceRole = "_TKG_CLUSTER_FORCE_ROLE" ConfigVariableProviderType = "PROVIDER_TYPE" ConfigVariableTKGVersion = "TKG_VERSION" ConfigVariableBuildEdition = "BUILD_EDITION" ConfigVariableFilterByAddonType = "FILTER_BY_ADDON_TYPE" ConfigVaraibleDisableCRSForAddonType = "DISABLE_CRS_FOR_ADDON_TYPE" ConfigVariableEnableAutoscaler = "ENABLE_AUTOSCALER" ConfigVariableDisableTMCCloudPermissions = "DISABLE_TMC_CLOUD_PERMISSIONS" ConfigVariableControlPlaneMachineCount = "CONTROL_PLANE_MACHINE_COUNT" ConfigVariableWorkerMachineCount = "WORKER_MACHINE_COUNT" ConfigVariableWorkerMachineCount0 = "WORKER_MACHINE_COUNT_0" ConfigVariableWorkerMachineCount1 = "WORKER_MACHINE_COUNT_1" ConfigVariableWorkerMachineCount2 = "WORKER_MACHINE_COUNT_2" ConfigVariableNodeMachineType = "NODE_MACHINE_TYPE" ConfigVariableNodeMachineType1 = "NODE_MACHINE_TYPE_1" ConfigVariableNodeMachineType2 = "NODE_MACHINE_TYPE_2" ConfigVariableCPMachineType = "CONTROL_PLANE_MACHINE_TYPE" ConfigVariableNamespace = "NAMESPACE" ConfigVariableEnableClusterOptions = "ENABLE_CLUSTER_OPTIONS" TKGHTTPProxy = "TKG_HTTP_PROXY" TKGHTTPSProxy = "TKG_HTTPS_PROXY" TKGHTTPProxyEnabled = "TKG_HTTP_PROXY_ENABLED" TKGNoProxy = "TKG_NO_PROXY" TKGProxyCACert = "TKG_PROXY_CA_CERT" ConfigVariableOSName = "OS_NAME" ConfigVariableOSVersion = "OS_VERSION" ConfigVariableOSArch = "OS_ARCH" ConfigVariableClusterCIDR = "CLUSTER_CIDR" ConfigVariableServiceCIDR = "SERVICE_CIDR" ConfigVariableCoreDNSIP = "CORE_DNS_IP" ConfigVariableIPFamily = "TKG_IP_FAMILY" ConfigVariableControlPlaneNodeNameservers = "CONTROL_PLANE_NODE_NAMESERVERS" ConfigVariableWorkerNodeNameservers = "WORKER_NODE_NAMESERVERS" ConfigVariableClusterPlan = "CLUSTER_PLAN" ConfigVariableClusterName = "CLUSTER_NAME" ConfigVariableInfraProvider = "INFRASTRUCTURE_PROVIDER" ConfigVariableTkrName = "KUBERNETES_RELEASE" ConfigVariableKubernetesVersion = "KUBERNETES_VERSION" ConfigVariableCNI = "CNI" ConfigVariableEnableCEIPParticipation = "ENABLE_CEIP_PARTICIPATION" ConfigVariableDeployTKGOnVsphere7 = "DEPLOY_TKG_ON_VSPHERE7" ConfigVariableEnableTKGSonVsphere7 = "ENABLE_TKGS_ON_VSPHERE7" ConfigVariableSize = "SIZE" ConfigVariableControlPlaneSize = "CONTROLPLANE_SIZE" ConfigVariableWorkerSize = "WORKER_SIZE" ConfigVariableNsxtPassword = "NSXT_PASSWORD" ConfigVariableAviPassword = "AVI_PASSWORD" ConfigVariableLDAPBindPassword = "LDAP_BIND_PASSWORD" //nolint:gosec ConfigVariableOIDCIdentiryProviderClientSecret = "OIDC_IDENTITY_PROVIDER_CLIENT_SECRET" //nolint:gosec // Config variables for image tags used for provider installation ConfigVariableInternalKubeRBACProxyImageTag = "KUBE_RBAC_PROXY_IMAGE_TAG" ConfigVariableInternalCABPKControllerImageTag = "CABPK_CONTROLLER_IMAGE_TAG" ConfigVariableInternalCAPIControllerImageTag = "CAPI_CONTROLLER_IMAGE_TAG" ConfigVariableInternalKCPControllerImageTag = "KCP_CONTROLLER_IMAGE_TAG" ConfigVariableInternalCAPDManagerImageTag = "CAPD_CONTROLLER_IMAGE_TAG" ConfigVariableInternalCAPAManagerImageTag = "CAPA_CONTROLLER_IMAGE_TAG" ConfigVariableInternalCAPVManagerImageTag = "CAPV_CONTROLLER_IMAGE_TAG" ConfigVariableInternalCAPZManagerImageTag = "CAPZ_CONTROLLER_IMAGE_TAG" ConfigVariableInternalNMIImageTag = "NMI_IMAGE_TAG" ConfigVariablePackageInstallTimeout = "PACKAGE_INSTALL_TIMEOUT" // Windows specific variables ConfigVariableIsWindowsWorkloadCluster = "IS_WINDOWS_WORKLOAD_CLUSTER" // AVI specific variables ConfigVariableAviManagementClusterServiceEngineGroup = "AVI_MANAGEMENT_CLUSTER_SERVICE_ENGINE_GROUP" ConfigVariableAviControlPlaneNetwork = "AVI_CONTROL_PLANE_NETWORK" ConfigVariableAviControlPlaneNetworkCidr = "AVI_CONTROL_PLANE_NETWORK_CIDR" ConfigVariableAviManagementClusterControlPlaneVipNetworkName = "AVI_MANAGEMENT_CLUSTER_CONTROL_PLANE_VIP_NETWORK_NAME" ConfigVariableAviManagementClusterControlPlaneVipNetworkCidr = "AVI_MANAGEMENT_CLUSTER_CONTROL_PLANE_VIP_NETWORK_CIDR" )
Configuration variable name constants
View Source
const ( DefaultCNIType = "antrea" DefaultDevControlPlaneMachineCount = 1 DefaultProdControlPlaneMachineCount = 3 DefaultDevWorkerMachineCount = 1 DefaultProdWorkerMachineCount = 3 DefaultOperationTimeout = 30 * time.Second DefaultLongRunningOperationTimeout = 30 * time.Minute DefaultCertmanagerDeploymentTimeout = 40 * time.Minute DefaultNamespace = "default" // de-facto defaults initially chosen by kops: https://github.com/kubernetes/kops DefaultIPv4ClusterCIDR = "100.96.0.0/11" DefaultIPv4ServiceCIDR = "100.64.0.0/13" // chosen to match our IPv4 defaults // use /48 for cluster CIDR because each node gets a /64 by default in IPv6 DefaultIPv6ClusterCIDR = "fd00:100:96::/48" // use /108 is the max allowed for IPv6 DefaultIPv6ServiceCIDR = "fd00:100:64::/108" // dual stack IPv4,IPv6 defaults DefaultDualStackPrimaryIPv4ClusterCIDR = DefaultIPv4ClusterCIDR + "," + DefaultIPv6ClusterCIDR DefaultDualStackPrimaryIPv4ServiceCIDR = DefaultIPv4ServiceCIDR + "," + DefaultIPv6ServiceCIDR DefaultDualStackPrimaryIPv6ClusterCIDR = DefaultIPv6ClusterCIDR + "," + DefaultIPv4ClusterCIDR DefaultDualStackPrimaryIPv6ServiceCIDR = DefaultIPv6ServiceCIDR + "," + DefaultIPv4ServiceCIDR // DefaultIsWindowsWorkloadCluster is false, indicating that the normal thing to do is, is to make linux clusters. DefaultIsWindowsWorkloadCluster = false )
default value constants
View Source
const ( NoProxy = "NO_PROXY" HTTPProxy = "HTTP_PROXY" HTTPSProxy = "HTTPS_PROXY" ProxyCACert = "PROXY_CA_CERT" )
environment variables for http proxy
View Source
const ( ConfigFilePermissions = 0o600 DefaultDirectoryPermissions = 0o700 )
ConfigFilePermissions defines the permissions of the config file
View Source
const ( LocalProvidersFolderName = "providers" LocalProvidersZipFileName = "providers.zip" LocalTanzuFileLock = ".tanzu.lock" LocalProvidersConfigFileName = "config.yaml" LocalBOMsFolderName = "bom" LocalCompatibilityFolderName = "compatibility" LocalProvidersChecksumFileName = "providers.sha256sum" OverrideFolder = "overrides" TKGKubeconfigDir = ".kube-tkg" TKGKubeconfigFile = "config" TKGKubeconfigTmpDir = "tmp" TKGConfigFileName = "config.yaml" TKGDefaultClusterConfigFileName = "cluster-config.yaml" TKGCompatibilityFileName = "tkg-compatibility.yaml" TKGClusterConfigFileDirForUI = "clusterconfigs" TKGRegistryCertFile = "registry_certs" TKGRegistryTrustedRootCAFileForWindows = ".registry_trusted_root_certs_win" )
File name related constants
View Source
const (
SuppressProvidersUpdate = "SUPPRESS_PROVIDERS_UPDATE"
)
environment variables for internal development use
View Source
const (
TKGRegistryContains = "registry.vmware.com/tkg"
)
registry related constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.