gcp

package
v0.82.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
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

func TruncateLabelValue(v string) string

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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