gcp

package
v1.4.21-pre Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: Apache-2.0 Imports: 5 Imported by: 29

Documentation

Overview

Package gcp contains GCP-specific structures for installer configuration and management. +k8s:deepcopy-gen=package

Index

Constants

View Source
const (
	// PDSSD is the constant string representation for persistent disk ssd disk types.
	PDSSD = "pd-ssd"
	// PDStandard is the constant string representation for persistent disk standard disk types.
	PDStandard = "pd-standard"
	// PDBalanced is the constant string representation for persistent disk balanced disk types.
	PDBalanced = "pd-balanced"
	// HyperDiskBalanced is the constant string representation for hyperdisk balanced disk types.
	HyperDiskBalanced = "hyperdisk-balanced"
)
View Source
const (
	// EnabledFeature indicates that the feature is configured as enabled.
	EnabledFeature FeatureSwitch = "Enabled"

	// DisabledFeature indicates that the feature is configured as disabled.
	DisabledFeature FeatureSwitch = "Disabled"

	// OnHostMaintenanceMigrate is the default, and it indicates that the OnHostMaintenance feature is set to Migrate.
	OnHostMaintenanceMigrate OnHostMaintenanceType = "Migrate"

	// OnHostMaintenanceTerminate indicates that the OnHostMaintenance feature is set to Terminate.
	OnHostMaintenanceTerminate OnHostMaintenanceType = "Terminate"

	// ConfidentialComputePolicySEV indicates that the ConfidentialCompute feature is set to AMDEncryptedVirtualization.
	ConfidentialComputePolicySEV ConfidentialComputePolicy = "AMDEncryptedVirtualization"

	// ConfidentialComputePolicySEVSNP indicates that the ConfidentialCompute feature is set to AMDEncryptedVirtualizationNestedPaging.
	ConfidentialComputePolicySEVSNP ConfidentialComputePolicy = "AMDEncryptedVirtualizationNestedPaging"

	// ConfidentialComputePolicyTDX indicates that the ConfidentialCompute feature is set to IntelTrustedDomainExtensions.
	ConfidentialComputePolicyTDX ConfidentialComputePolicy = "IntelTrustedDomainExtensions"
)
View Source
const (
	// ServiceComputeEngineAPI is the GCE service URL
	ServiceComputeEngineAPI = "compute.googleapis.com"
	// ServiceIAMAPI is the IAM service URL
	ServiceIAMAPI = "iam.googleapis.com"
)
View Source
const Name string = "gcp"

Name is name for the gcp platform.

Variables

View Source
var (
	// ControlPlaneSupportedDisks contains the supported disk types for control plane nodes.
	ControlPlaneSupportedDisks = sets.New(HyperDiskBalanced, PDBalanced, PDSSD)

	// ComputeSupportedDisks contains the supported disk types for control plane nodes.
	ComputeSupportedDisks = sets.New(HyperDiskBalanced, PDBalanced, PDSSD, PDStandard)

	// DefaultCustomInstanceType is the default instance type on the GCP server side. The default custom
	// instance type can be changed on the client side with gcloud.
	DefaultCustomInstanceType = "n1"

	// InstanceTypeToDiskTypeMap contains a map where the key is the Instance Type, and the
	// values are a list of disk types that are supported by the installer and correlate to the Instance Type.
	InstanceTypeToDiskTypeMap = map[string][]string{
		"a2":  {PDStandard, PDSSD, PDBalanced},
		"a3":  {PDSSD, PDBalanced},
		"c2":  {PDStandard, PDSSD, PDBalanced},
		"c2d": {PDStandard, PDSSD, PDBalanced},
		"c3":  {PDSSD, PDBalanced, HyperDiskBalanced},
		"c3d": {PDSSD, PDBalanced, HyperDiskBalanced},
		"c4":  {HyperDiskBalanced},
		"c4a": {HyperDiskBalanced},
		"e2":  {PDStandard, PDSSD, PDBalanced},
		"g2":  {PDStandard, PDSSD, PDBalanced},
		"m1":  {PDSSD, PDBalanced, HyperDiskBalanced},
		"n1":  {PDStandard, PDSSD, PDBalanced},
		"n2":  {PDStandard, PDSSD, PDBalanced},
		"n2d": {PDStandard, PDSSD, PDBalanced},
		"n4":  {HyperDiskBalanced},
		"t2a": {PDStandard, PDSSD, PDBalanced},
		"t2d": {PDStandard, PDSSD, PDBalanced},
	}
)
View Source
var (
	// ConfidentialComputePolicyToSupportedInstanceType is a map containing machine types and the list of confidential computing technologies each of them support.
	ConfidentialComputePolicyToSupportedInstanceType = map[ConfidentialComputePolicy][]string{
		ConfidentialComputePolicySEV:    {"c2d", "n2d", "c3d"},
		ConfidentialComputePolicySEVSNP: {"n2d"},
		ConfidentialComputePolicyTDX:    {"c3"},
	}
)

Functions

func CloudControllerUID

func CloudControllerUID(infraID string) string

CloudControllerUID generates a UID used by the GCP cloud controller provider to generate certain load balancing resources

func DefaultSubnetName added in v0.90.0

func DefaultSubnetName(infraID, role string) string

DefaultSubnetName sets a default name for the subnet.

func GetConfiguredServiceAccount added in v0.90.17

func GetConfiguredServiceAccount(platform *Platform, mpool *MachinePool) string

GetConfiguredServiceAccount returns the service account email from a configured service account for a control plane or compute node. Returns empty string if not configured.

func GetDefaultServiceAccount added in v0.90.17

func GetDefaultServiceAccount(platform *Platform, clusterID string, role string) string

GetDefaultServiceAccount returns the default service account email to use based on role. The default should be used when an existing service account is not configured.

func ShouldUseEndpointForInstaller

func ShouldUseEndpointForInstaller(endpoint *PSCEndpoint) bool

ShouldUseEndpointForInstaller returns true when the endpoint should be used for GCP api endpoint overrides in the installer.

Types

type AuthorizationMode

type AuthorizationMode string

AuthorizationMode is the mode or type of authentication indicated in the google credentials struct.

const (
	// AuthorizedUserMode indicates that an authorized user without a service account has been used
	// for authentication with the gcloud.
	AuthorizedUserMode AuthorizationMode = "authorized_user"

	// ServiceAccountMode indicates that a service account has been used for authentication with
	// the gcloud.
	ServiceAccountMode AuthorizationMode = "service_account"

	// ExternalAccountMode indicates that an external user such as AWS, Azure, etc. has been used for
	// authentication with gcloud.
	ExternalAccountMode AuthorizationMode = "external_account"
)

type ConfidentialComputePolicy

type ConfidentialComputePolicy string

ConfidentialComputePolicy indicates the setting for the ConfidentialCompute feature.

type DNS

type DNS struct {
	// PrivateZone contains the information for a private DNS zone. The Private DNS Zone can
	// only be supplied during Shared VPC (XPN) installs. The PrivateZone can exist or be
	// created in a second service project; a project other than the one matching projectID
	// or networkProjectID.
	// +optional
	PrivateZone *DNSZone `json:"privateZone,omitempty"`
}

DNS contains the gcp dns zone information for the cluster.

func (*DNS) DeepCopy

func (in *DNS) DeepCopy() *DNS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNS.

func (*DNS) DeepCopyInto

func (in *DNS) DeepCopyInto(out *DNS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DNSZone added in v1.4.12

type DNSZone struct {
	// ProjectID is the project where the zone resides.
	// +optional
	ProjectID string `json:"projectID,omitempty"`

	// Name is the name of the dns-managed zone.
	Name string `json:"name"`
}

DNSZone contains the information about a specific DNS public or private zone.

func (*DNSZone) DeepCopy

func (in *DNSZone) DeepCopy() *DNSZone

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSZone.

func (*DNSZone) DeepCopyInto

func (in *DNSZone) DeepCopyInto(out *DNSZone)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DNSZoneParams

type DNSZoneParams struct {
	// Name is the name of the DNS zone. When provided, the name will be
	// used for the search. When empty any zone matching the other
	// parameters will be returned. Note that either `Name` or `BaseDomain`
	// must be provided.
	Name string

	// Project is the project of the DNS zone.
	Project string

	// IsPublic is true if the DNS zone is public.
	IsPublic bool

	// BaseDomain is the base domain of the DNS zone.
	// Note that either `Name` or `BaseDomain` must be provided.
	BaseDomain string

	// InstallerCreated is true when the DNS zone should be created
	// by the OpenShift Installer (and will be owned by the
	// OpenShift Installer).
	InstallerCreated bool
}

DNSZoneParams is a set of parameters used to find a DNS zone.

func (*DNSZoneParams) DeepCopy

func (in *DNSZoneParams) DeepCopy() *DNSZoneParams

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSZoneParams.

func (*DNSZoneParams) DeepCopyInto

func (in *DNSZoneParams) DeepCopyInto(out *DNSZoneParams)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EncryptionKeyReference

type EncryptionKeyReference struct {
	// KMSKey is a reference to a KMS Key to use for the encryption.
	//
	// +optional
	KMSKey *KMSKeyReference `json:"kmsKey,omitempty"`

	// KMSKeyServiceAccount is the service account being used for the
	// encryption request for the given KMS key. If absent, the Compute
	// Engine default service account is used.
	// See https://cloud.google.com/compute/docs/access/service-accounts#compute_engine_service_account
	// for details on the default service account.
	//
	// +optional
	KMSKeyServiceAccount string `json:"kmsKeyServiceAccount,omitempty"`
}

EncryptionKeyReference describes the encryptionKey to use for a disk's encryption.

func (*EncryptionKeyReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionKeyReference.

func (*EncryptionKeyReference) DeepCopyInto

func (in *EncryptionKeyReference) DeepCopyInto(out *EncryptionKeyReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EncryptionKeyReference) Set

Set sets the values from `required` to `e`.

type FeatureSwitch added in v0.90.0

type FeatureSwitch string

FeatureSwitch indicates whether the feature is enabled or disabled.

type FirewallRulesManagementPolicy

type FirewallRulesManagementPolicy string

FirewallRulesManagementPolicy defines the management policy for firewall rules in the cluster. +kubebuilder:validation:Enum:="Managed";"Unmanaged"

const (
	// ManagedFirewallRules indicates that the firewall rules should be managed by the cluster.
	ManagedFirewallRules FirewallRulesManagementPolicy = "Managed"

	// UnmanagedFirewallRules indicates that the firewall rules should be managed by the user. The
	// firewall rules should exist prior to the installation occurs.
	UnmanagedFirewallRules FirewallRulesManagementPolicy = "Unmanaged"
)

type KMSKeyReference

type KMSKeyReference struct {
	// Name is the name of the customer managed encryption key to be used for the disk encryption.
	Name string `json:"name"`

	// KeyRing is the name of the KMS Key Ring which the KMS Key belongs to.
	KeyRing string `json:"keyRing"`

	// ProjectID is the ID of the Project in which the KMS Key Ring exists.
	// Defaults to the VM ProjectID if not set.
	//
	// +optional
	ProjectID string `json:"projectID,omitempty"`

	// Location is the GCP location in which the Key Ring exists.
	Location string `json:"location"`
}

KMSKeyReference gathers required fields for looking up a GCP KMS Key

func (*KMSKeyReference) DeepCopy

func (in *KMSKeyReference) DeepCopy() *KMSKeyReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSKeyReference.

func (*KMSKeyReference) DeepCopyInto

func (in *KMSKeyReference) DeepCopyInto(out *KMSKeyReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KMSKeyReference) Set

func (k *KMSKeyReference) Set(required *KMSKeyReference)

Set sets the values from `required` to `k`.

type MachinePool

type MachinePool struct {
	// Zones is list of availability zones that can be used.
	//
	// +optional
	Zones []string `json:"zones,omitempty"`

	// InstanceType defines the GCP instance type.
	// eg. n1-standard-4
	//
	// +optional
	InstanceType string `json:"type"`

	// OSDisk defines the storage for instance.
	//
	// +optional
	OSDisk `json:"osDisk"`

	// OSImage defines a custom image for instance.
	//
	// +optional
	OSImage *OSImage `json:"osImage,omitempty"`

	// Tags defines a set of network tags which will be added to instances in the machineset
	//
	// +optional
	Tags []string `json:"tags,omitempty"`

	// SecureBoot Defines whether the instance should have secure boot enabled.
	// secure boot Verify the digital signature of all boot components, and halt the boot process if signature verification fails.
	// If omitted, the platform chooses a default, which is subject to change over time, currently that default is false.
	// +kubebuilder:validation:Enum=Enabled;Disabled
	// +optional
	SecureBoot string `json:"secureBoot,omitempty"`

	// OnHostMaintenance determines the behavior when a maintenance event occurs that might cause the instance to reboot.
	// Allowed values are "Migrate" and "Terminate".
	// If omitted, the platform chooses a default, which is subject to change over time, currently that default is "Migrate".
	// +kubebuilder:default="Migrate"
	// +default="Migrate"
	// +kubebuilder:validation:Enum=Migrate;Terminate;
	// +optional
	OnHostMaintenance string `json:"onHostMaintenance,omitempty"`

	// confidentialCompute is an optional field defining whether the instance should have
	// Confidential Computing enabled or not, and the Confidential Computing technology of choice.
	//     With Disabled, Confidential Computing is disabled.
	//     With Enabled, Confidential Computing is enabled with no preference on the
	// Confidential Computing technology. The platform chooses a default i.e. AMD SEV,
	// which is subject to change over time.
	//     With AMDEncryptedVirtualization, Confidential Computing is enabled with
	// AMD Secure Encrypted Virtualization (AMD SEV).
	//     With AMDEncryptedVirtualizationNestedPaging, Confidential Computing is
	// enabled with AMD Secure Encrypted Virtualization Secure Nested Paging
	// (AMD SEV-SNP).
	//     With IntelTrustedDomainExtensions, Confidential Computing is enabled with
	// Intel Trusted Domain Extensions (Intel TDX).
	//     If any value other than Disabled is set, a machine type and region that supports
	// Confidential Computing must be specified. Machine series and regions supporting
	// Confidential Computing technologies can be checked at
	// https://cloud.google.com/confidential-computing/confidential-vm/docs/supported-configurations#machine-type-cpu-zone
	//     If any value other than Disabled is set, onHostMaintenance is required to be set
	// to "Terminate".
	// +kubebuilder:default="Disabled"
	// +default="Disabled"
	// +kubebuilder:validation:Enum="";Enabled;Disabled;AMDEncryptedVirtualization;AMDEncryptedVirtualizationNestedPaging;IntelTrustedDomainExtensions
	// +optional
	ConfidentialCompute string `json:"confidentialCompute,omitempty"`

	// ServiceAccount is the email of a gcp service account to be used during installations.
	// The provided service account can be attached to both control-plane nodes
	// and worker nodes in order to provide the permissions required by the cloud provider.
	//
	// +optional
	ServiceAccount string `json:"serviceAccount,omitempty"`
}

MachinePool stores the configuration for a machine pool installed on GCP.

func (*MachinePool) DeepCopy

func (in *MachinePool) DeepCopy() *MachinePool

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePool.

func (*MachinePool) DeepCopyInto

func (in *MachinePool) DeepCopyInto(out *MachinePool)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MachinePool) Set

func (a *MachinePool) Set(required *MachinePool)

Set sets the values from `required` to `a`.

type Metadata

type Metadata struct {
	Region                  string                        `json:"region"`
	ProjectID               string                        `json:"projectID"`
	NetworkProjectID        string                        `json:"networkProjectID,omitempty"`
	PrivateZoneDomain       string                        `json:"privateZoneDomain,omitempty"`
	PrivateZoneProjectID    string                        `json:"privateZoneProjectID,omitempty"`
	Endpoint                *PSCEndpoint                  `json:"endpoint,omitempty"`
	FirewallRulesManagement FirewallRulesManagementPolicy `json:"firewallRulesManagement,omitempty"`
}

Metadata contains GCP metadata (e.g. for uninstalling the cluster).

func (*Metadata) DeepCopy

func (in *Metadata) DeepCopy() *Metadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata.

func (*Metadata) DeepCopyInto

func (in *Metadata) DeepCopyInto(out *Metadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Metric

type Metric struct {
	// Service is the Google Cloud Service to which this quota belongs (e.g. compute.googleapis.com)
	Service string `json:"service,omitempty"`
	// Limit is the name of the item that's limited (e.g. cpus)
	Limit string `json:"limit,omitempty"`
	// Dimensions are unique axes on which this Limit is applied (e.g. region: us-central-1)
	Dimensions map[string]string `json:"dimensions,omitempty"`
}

Metric identify a quota. Service/Label matches the Google Quota API names for quota metrics

func (*Metric) DeepCopy

func (in *Metric) DeepCopy() *Metric

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metric.

func (*Metric) DeepCopyInto

func (in *Metric) DeepCopyInto(out *Metric)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Metric) Matches

func (m *Metric) Matches(other *Metric) bool

Matches determines if this metric matches the other

func (*Metric) String

func (m *Metric) String() string

String formats the metric

type OSDisk

type OSDisk struct {
	// DiskType defines the type of disk.
	// For control plane nodes, the valid values are pd-balanced, pd-ssd, and hyperdisk-balanced.
	// +optional
	// +kubebuilder:validation:Enum=pd-balanced;pd-ssd;pd-standard;hyperdisk-balanced
	DiskType string `json:"diskType"`

	// DiskSizeGB defines the size of disk in GB.
	//
	// +kubebuilder:validation:Minimum=16
	// +kubebuilder:validation:Maximum=65536
	DiskSizeGB int64 `json:"DiskSizeGB"`

	// EncryptionKey defines the KMS key to be used to encrypt the disk.
	//
	// +optional
	EncryptionKey *EncryptionKeyReference `json:"encryptionKey,omitempty"`
}

OSDisk defines the disk for machines on GCP.

func (*OSDisk) DeepCopy

func (in *OSDisk) DeepCopy() *OSDisk

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSDisk.

func (*OSDisk) DeepCopyInto

func (in *OSDisk) DeepCopyInto(out *OSDisk)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OSImage

type OSImage struct {
	// Name defines the name of the image.
	//
	// +required
	Name string `json:"name"`

	// Project defines the name of the project containing the image.
	//
	// +required
	Project string `json:"project"`
}

OSImage defines the image to use for the OS.

func (*OSImage) DeepCopy

func (in *OSImage) DeepCopy() *OSImage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSImage.

func (*OSImage) DeepCopyInto

func (in *OSImage) DeepCopyInto(out *OSImage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OnHostMaintenanceType added in v0.90.0

type OnHostMaintenanceType string

OnHostMaintenanceType indicates the setting for the OnHostMaintenance feature, but this is only applicable when ConfidentialCompute is Enabled.

type PSCEndpoint

type PSCEndpoint struct {
	// Name contains the name of the private service connect endpoint.
	Name string `json:"name"`

	// Region is the region where the endpoint resides.
	// When the region is empty, the location is assumed to be global.
	// +optional
	Region string `json:"region,omitempty"`

	// ClusterUseOnly should be set to true when the installer should use
	// the public api endpoints and all cluster operators should use the
	// api endpoint overrides. The value should be false when the installer
	// and cluster operators should use the api endpoint overrides; that is,
	// the installer is being run in the same network as the cluster.
	// +optional
	ClusterUseOnly *bool `json:"clusterUseOnly,omitempty"`
}

PSCEndpoint contains the information to describe a Private Service Connect endpoint.

func (*PSCEndpoint) DeepCopy

func (in *PSCEndpoint) DeepCopy() *PSCEndpoint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PSCEndpoint.

func (*PSCEndpoint) DeepCopyInto

func (in *PSCEndpoint) DeepCopyInto(out *PSCEndpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Platform

type Platform struct {
	// ProjectID is the the project that will be used for the cluster.
	ProjectID string `json:"projectID"`

	// Region specifies the GCP region where the cluster will be created.
	Region string `json:"region"`

	// DefaultMachinePlatform is the default configuration used when
	// installing on GCP for machine pools which do not define their own
	// platform configuration.
	// +optional
	DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`

	// Network specifies an existing VPC where the cluster should be created
	// rather than provisioning a new one.
	// +optional
	Network string `json:"network,omitempty"`

	// NetworkProjectID specifies which project the network and subnets exist in when
	// they are not in the main ProjectID.
	// +optional
	NetworkProjectID string `json:"networkProjectID,omitempty"`

	// ControlPlaneSubnet is an existing subnet where the control plane will be deployed.
	// The value should be the name of the subnet.
	// +optional
	ControlPlaneSubnet string `json:"controlPlaneSubnet,omitempty"`

	// ComputeSubnet is an existing subnet where the compute nodes will be deployed.
	// The value should be the name of the subnet.
	// +optional
	ComputeSubnet string `json:"computeSubnet,omitempty"`

	// userLabels has additional keys and values that the installer will add as
	// labels to all resources that it creates on GCP. Resources created by the
	// cluster itself may not include these labels.
	UserLabels []UserLabel `json:"userLabels,omitempty"`

	// userTags has additional keys and values that the installer will add as
	// tags to all resources that it creates on GCP. Resources created by the
	// cluster itself may not include these tags. Tag key and tag value should
	// be the shortnames of the tag key and tag value resource.
	UserTags []UserTag `json:"userTags,omitempty"`

	// UserProvisionedDNS indicates if the customer is providing their own DNS solution in place of the default
	// provisioned by the Installer.
	// +kubebuilder:default:="Disabled"
	// +default="Disabled"
	// +kubebuilder:validation:Enum="Enabled";"Disabled"
	UserProvisionedDNS dns.UserProvisionedDNS `json:"userProvisionedDNS,omitempty"`

	// Endpoint is the private service connect endpoint.
	// +optional
	Endpoint *PSCEndpoint `json:"endpoint,omitempty"`

	// DNS contains the dns zone information for the cluster. The DNS information can
	// only be supplied during Shared VPC (XPN) installs.
	// +optional
	DNS *DNS `json:"dns,omitempty"`

	// FirewallRulesManagement specifies the management policy for the cluster. Managed indicates that
	// the firewall rules will be created and destroyed by the cluster. Unmanaged indicates that the
	// user should create and destroy the firewall rules.
	// +default="Managed"
	// +optional
	FirewallRulesManagement FirewallRulesManagementPolicy `json:"firewallRulesManagement,omitempty"`
}

Platform stores all the global configuration that all machinesets use.

func (*Platform) DeepCopy

func (in *Platform) DeepCopy() *Platform

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Platform.

func (*Platform) DeepCopyInto

func (in *Platform) DeepCopyInto(out *Platform)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Quota

type Quota []QuotaUsage

Quota is a record of the quota in GCP consumed by a cluster

func (Quota) DeepCopy

func (in Quota) DeepCopy() Quota

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Quota.

func (Quota) DeepCopyInto

func (in Quota) DeepCopyInto(out *Quota)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QuotaUsage

type QuotaUsage struct {
	*Metric `json:",inline"`
	// Amount is the amount of the quota being used
	Amount int64 `json:"amount,omitempty"`
}

QuotaUsage identifies a quota metric and records the usage

func (*QuotaUsage) DeepCopy

func (in *QuotaUsage) DeepCopy() *QuotaUsage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaUsage.

func (*QuotaUsage) DeepCopyInto

func (in *QuotaUsage) DeepCopyInto(out *QuotaUsage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*QuotaUsage) String

func (q *QuotaUsage) String() string

String formats the quota usage

type UserLabel

type UserLabel struct {
	// key is the key part of the label. A label key can have a maximum of 63 characters
	// and cannot be empty. Label must begin with a lowercase letter, and must contain
	// only lowercase letters, numeric characters, and the following special characters `_-`.
	Key string `json:"key"`

	// value is the value part of the label. A label value can have a maximum of 63 characters
	// and cannot be empty. Value must contain only lowercase letters, numeric characters, and
	// the following special characters `_-`.
	Value string `json:"value"`
}

UserLabel is a label to apply to GCP resources created for the cluster.

func (*UserLabel) DeepCopy

func (in *UserLabel) DeepCopy() *UserLabel

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserLabel.

func (*UserLabel) DeepCopyInto

func (in *UserLabel) DeepCopyInto(out *UserLabel)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UserTag

type UserTag struct {
	// parentID is the ID of the hierarchical resource where the tags are defined,
	// e.g. at the Organization or the Project level. To find the Organization ID or Project ID refer to the following pages:
	// https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id,
	// https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects.
	// An OrganizationID must consist of decimal numbers, and cannot have leading zeroes.
	// A ProjectID must be 6 to 30 characters in length, can only contain lowercase letters,
	// numbers, and hyphens, and must start with a letter, and cannot end with a hyphen.
	ParentID string `json:"parentID"`

	// key is the key part of the tag. A tag key can have a maximum of 63 characters and
	// cannot be empty. Tag key must begin and end with an alphanumeric character, and
	// must contain only uppercase, lowercase alphanumeric characters, and the following
	// special characters `._-`.
	Key string `json:"key"`

	// value is the value part of the tag. A tag value can have a maximum of 63 characters
	// and cannot be empty. Tag value must begin and end with an alphanumeric character, and
	// must contain only uppercase, lowercase alphanumeric characters, and the following
	// special characters `_-.@%=+:,*#&(){}[]` and spaces.
	Value string `json:"value"`
}

UserTag is a tag to apply to GCP resources created for the cluster.

func (*UserTag) DeepCopy

func (in *UserTag) DeepCopy() *UserTag

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserTag.

func (*UserTag) DeepCopyInto

func (in *UserTag) DeepCopyInto(out *UserTag)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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