Documentation
¶
Index ¶
- Constants
- func TruncateLabelValue(v string) string
- type Environment
- func (e *Environment) DefaultGKENodeCount() int
- func (e *Environment) DefaultInstanceType() string
- func (e *Environment) DefaultNetworkName() string
- func (e *Environment) DefaultPrivateKeyPassword() string
- func (e *Environment) DefaultPrivateKeyPath() string
- func (e *Environment) DefaultPublicKeyPath() string
- func (e *Environment) DefaultSubnet() string
- func (e *Environment) DefaultVMServiceAccount() string
- func (e *Environment) EnableNestedVirtualization() bool
- func (e *Environment) GKEAutopilot() bool
- func (e *Environment) GetCommonEnvironment() *config.CommonEnvironment
- func (e *Environment) InternalDockerhubMirror() string
- func (e *Environment) InternalRegistry() string
- func (e *Environment) InternalRegistryFullImagePathExists(_ string) (bool, error)
- func (e *Environment) InternalRegistryImageTagExists(_, _ string) (bool, error)
- func (e *Environment) OpenShiftCPUs() string
- func (e *Environment) OpenShiftDisk() string
- func (e *Environment) OpenShiftMemory() string
- func (e *Environment) OpenShiftPullSecretPath() string
- func (e *Environment) Region() string
- func (e *Environment) Zone() string
Constants ¶
const ( // GCP Infra DDInfraDefaultPublicKeyPath = "gcp/defaultPublicKeyPath" DDInfraDefaultPrivateKeyPath = "gcp/defaultPrivateKeyPath" DDInfraDefaultPrivateKeyPassword = "gcp/defaultPrivateKeyPassword" DDInfraDefaultInstanceTypeParamName = "gcp/defaultInstanceType" DDInfraDefaultNetworkNameParamName = "gcp/defaultNetworkName" DDInfraDefaultSubnetNameParamName = "gcp/defaultSubnet" DDInfraDefaultRegionNameParamName = "gcp/defaultRegion" DDInfraDefaultZoneNameParamName = "gcp/defaultZone" DDInfraDefautVMServiceAccountParamName = "gcp/defaultVMServiceAccount" DDInfraGKEEnableAutopilot = "gcp/gke/enableAutopilot" DDInfraGKENodeCountParamName = "gcp/gke/nodeCount" DDInfraOpenShiftPullSecretPath = "gcp/openshift/pullSecretPath" DDInfraOpenShiftCPUs = "gcp/openshift/cpus" DDInfraOpenShiftMemory = "gcp/openshift/memory" DDInfraOpenShiftDisk = "gcp/openshift/disk" DDInfraEnableNestedVirtualization = "gcp/enableNestedVirtualization" )
const ( // MaxResourceLabelValueLen is the maximum length allowed by GCP for a // resource label value (in bytes). Values longer than this are rejected // by the API with `Resource_labels.value must be less than 63 bytes`. // See https://cloud.google.com/resource-manager/docs/labels-overview. MaxResourceLabelValueLen = 63 )
Variables ¶
This section is empty.
Functions ¶
func TruncateLabelValue ¶
TruncateLabelValue truncates v to at most MaxResourceLabelValueLen bytes without splitting a multi-byte UTF-8 rune. GCP rejects label values longer than MaxResourceLabelValueLen bytes; a naive byte slice could cut through the middle of a rune and make Pulumi send a corrupted value, so any trailing partial rune is dropped.
Types ¶
type Environment ¶
type Environment struct {
*config.CommonEnvironment
Namer namer.Namer
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewEnvironment(ctx *pulumi.Context) (Environment, error)
func (*Environment) DefaultGKENodeCount ¶
func (e *Environment) DefaultGKENodeCount() int
func (*Environment) DefaultInstanceType ¶
func (e *Environment) DefaultInstanceType() string
func (*Environment) DefaultNetworkName ¶
func (e *Environment) DefaultNetworkName() string
func (*Environment) DefaultPrivateKeyPassword ¶
func (e *Environment) DefaultPrivateKeyPassword() string
func (*Environment) DefaultPrivateKeyPath ¶
func (e *Environment) DefaultPrivateKeyPath() string
func (*Environment) DefaultPublicKeyPath ¶
func (e *Environment) DefaultPublicKeyPath() string
func (*Environment) DefaultSubnet ¶
func (e *Environment) DefaultSubnet() string
func (*Environment) DefaultVMServiceAccount ¶
func (e *Environment) DefaultVMServiceAccount() string
func (*Environment) EnableNestedVirtualization ¶
func (e *Environment) EnableNestedVirtualization() bool
EnableNestedVirtualization returns whether to enable nested virtualization
func (*Environment) GKEAutopilot ¶
func (e *Environment) GKEAutopilot() bool
GKEAutopilot Whether to enable GKE Autopilot or not
func (*Environment) GetCommonEnvironment ¶
func (e *Environment) GetCommonEnvironment() *config.CommonEnvironment
func (*Environment) InternalDockerhubMirror ¶
func (e *Environment) InternalDockerhubMirror() string
func (*Environment) InternalRegistry ¶
func (e *Environment) InternalRegistry() string
func (*Environment) InternalRegistryFullImagePathExists ¶
func (e *Environment) InternalRegistryFullImagePathExists(_ string) (bool, error)
func (*Environment) InternalRegistryImageTagExists ¶
func (e *Environment) InternalRegistryImageTagExists(_, _ string) (bool, error)
func (*Environment) OpenShiftCPUs ¶
func (e *Environment) OpenShiftCPUs() string
OpenShiftCPUs returns the number of CPUs to allocate to the CRC cluster (default: 12).
func (*Environment) OpenShiftDisk ¶
func (e *Environment) OpenShiftDisk() string
OpenShiftDisk returns the disk size in GB to allocate to the CRC cluster (default: 100).
func (*Environment) OpenShiftMemory ¶
func (e *Environment) OpenShiftMemory() string
OpenShiftMemory returns the memory in MB to allocate to the CRC cluster (default: 32768).
func (*Environment) OpenShiftPullSecretPath ¶
func (e *Environment) OpenShiftPullSecretPath() string
OpenShiftPullSecretPath returns the path to the OpenShift pull secret file
func (*Environment) Region ¶
func (e *Environment) Region() string
Region returns the default region for the GCP environment
func (*Environment) Zone ¶
func (e *Environment) Zone() string
Zone returns the default zone for the GCP environment