v1beta1

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 18 Imported by: 31

Documentation

Overview

Package v1beta1 contains API Schema definitions for the infrastructure v1beta1 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io

Index

Constants

View Source
const (
	// ResourceLifecycleOwned is the value we use when tagging resources to indicate
	// that the resource is considered owned and managed by the cluster,
	// and in particular that the lifecycle is tied to the lifecycle of the cluster.
	ResourceLifecycleOwned = ResourceLifecycle("owned")

	// NameGCPProviderPrefix is the tag prefix we use to differentiate
	// cluster-api-provider-gcp owned components from other tooling that
	// uses NameKubernetesClusterPrefix.
	NameGCPProviderPrefix = "capg-"

	// NameGCPProviderOwned is the tag name we use to differentiate
	// cluster-api-provider-gcp owned components from other tooling that
	// uses NameKubernetesClusterPrefix.
	NameGCPProviderOwned = NameGCPProviderPrefix + "cluster-"

	// NameGCPClusterAPIRole is the tag name we use to mark roles for resources
	// dedicated to this cluster api provider implementation.
	NameGCPClusterAPIRole = NameGCPProviderPrefix + "role"

	// APIServerRoleTagValue describes the value for the apiserver role.
	APIServerRoleTagValue = "apiserver"

	// InternalRoleTagValue describes the value for the internal role.
	InternalRoleTagValue = "api-internal"
)
View Source
const (
	// ClusterFinalizer allows ReconcileGCPCluster to clean up GCP resources associated with GCPCluster before
	// removing it from the apiserver.
	ClusterFinalizer = "gcpcluster.infrastructure.cluster.x-k8s.io"
)
View Source
const (
	// MachineFinalizer allows ReconcileGCPMachine to clean up GCP resources associated with GCPMachine before
	// removing it from the apiserver.
	MachineFinalizer = "gcpmachine.infrastructure.cluster.x-k8s.io"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	// External creates a Global External Proxy Load Balancer
	// to manage traffic to backends in multiple regions. This is the default Load
	// Balancer and will be created if no LoadBalancerType is defined.
	External = LoadBalancerType("External")

	// Internal creates a Regional Internal Passthrough Load
	// Balancer to manage traffic to backends in the configured region.
	Internal = LoadBalancerType("Internal")

	// InternalExternal creates both External and Internal Load Balancers to provide
	// separate endpoints for managing both external and internal traffic.
	InternalExternal = LoadBalancerType("InternalExternal")
)
View Source
var (
	// InstanceStatusProvisioning is the string representing an instance in a provisioning state.
	InstanceStatusProvisioning = InstanceStatus("PROVISIONING")

	// InstanceStatusRepairing is the string representing an instance in a repairing state.
	InstanceStatusRepairing = InstanceStatus("REPAIRING")

	// InstanceStatusRunning is the string representing an instance in a pending state.
	InstanceStatusRunning = InstanceStatus("RUNNING")

	// InstanceStatusStaging is the string representing an instance in a staging state.
	InstanceStatusStaging = InstanceStatus("STAGING")

	// InstanceStatusStopped is the string representing an instance
	// that has been stopped and can be restarted.
	InstanceStatusStopped = InstanceStatus("STOPPED")

	// InstanceStatusStopping is the string representing an instance
	// that is in the process of being stopped and can be restarted.
	InstanceStatusStopping = InstanceStatus("STOPPING")

	// InstanceStatusSuspended is the string representing an instance
	// that is suspended.
	InstanceStatusSuspended = InstanceStatus("SUSPENDED")

	// InstanceStatusSuspending is the string representing an instance
	// that is in the process of being suspended.
	InstanceStatusSuspending = InstanceStatus("SUSPENDING")

	// InstanceStatusTerminated is the string representing an instance that has been terminated.
	InstanceStatusTerminated = InstanceStatus("TERMINATED")
)

Functions

func ClusterTagKey

func ClusterTagKey(name string) string

ClusterTagKey generates the key for resources associated with a cluster.

Types

type AttachedDiskSpec

type AttachedDiskSpec struct {
	// DeviceType is a device type of the attached disk.
	// Supported types of non-root attached volumes:
	// 1. "pd-standard" - Standard (HDD) persistent disk
	// 2. "pd-ssd" - SSD persistent disk
	// 3. "local-ssd" - Local SSD disk (https://cloud.google.com/compute/docs/disks/local-ssd).
	// 4. "pd-balanced" - Balanced Persistent Disk
	// 5. "hyperdisk-balanced" - Hyperdisk Balanced
	// Default is "pd-standard".
	// +optional
	DeviceType *DiskType `json:"deviceType,omitempty"`
	// Size is the size of the disk in GBs.
	// Defaults to 30GB. For "local-ssd" size is always 375GB.
	// +optional
	Size *int64 `json:"size,omitempty"`
	// EncryptionKey defines the KMS key to be used to encrypt the disk.
	// +optional
	EncryptionKey *CustomerEncryptionKey `json:"encryptionKey,omitempty"`
}

AttachedDiskSpec degined GCP machine disk.

func (*AttachedDiskSpec) DeepCopy

func (in *AttachedDiskSpec) DeepCopy() *AttachedDiskSpec

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

func (*AttachedDiskSpec) DeepCopyInto

func (in *AttachedDiskSpec) DeepCopyInto(out *AttachedDiskSpec)

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

type BuildParams

type BuildParams struct {
	// Lifecycle determines the resource lifecycle.
	Lifecycle ResourceLifecycle

	// ClusterName is the cluster associated with the resource.
	ClusterName string

	// ResourceID is the unique identifier of the resource to be tagged.
	ResourceID string

	// Role is the role associated to the resource.
	// +optional
	Role *string

	// Any additional tags to be added to the resource.
	// +optional
	Additional Labels
}

BuildParams is used to build tags around an gcp resource.

func (*BuildParams) DeepCopy

func (in *BuildParams) DeepCopy() *BuildParams

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

func (*BuildParams) DeepCopyInto

func (in *BuildParams) DeepCopyInto(out *BuildParams)

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

type ConfidentialComputePolicy added in v1.3.0

type ConfidentialComputePolicy string

ConfidentialComputePolicy represents the confidential compute configuration for the GCP machine.

const (
	// ConfidentialComputePolicyEnabled enables confidential compute for the GCP machine.
	ConfidentialComputePolicyEnabled ConfidentialComputePolicy = "Enabled"
	// ConfidentialComputePolicyDisabled disables confidential compute for the GCP machine.
	ConfidentialComputePolicyDisabled ConfidentialComputePolicy = "Disabled"
)

type CustomerEncryptionKey added in v1.6.0

type CustomerEncryptionKey struct {
	// KeyType is the type of encryption key. Must be either Managed, aka Customer-Managed Encryption Key (CMEK) or
	// Supplied, aka Customer-Supplied EncryptionKey (CSEK).
	// +kubebuilder:validation:Enum=Managed;Supplied
	KeyType KeyType `json:"keyType"`
	// 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. For example:
	// "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com.
	// The maximum length is based on the Service Account ID (max 30), Project (max 30), and a valid gcloud email
	// suffix ("iam.gserviceaccount.com").
	// +kubebuilder:validation:MaxLength=85
	// +kubebuilder:validation:Pattern=`[-_[A-Za-z0-9]+@[-_[A-Za-z0-9]+.iam.gserviceaccount.com`
	// +optional
	KMSKeyServiceAccount *string `json:"kmsKeyServiceAccount,omitempty"`
	// ManagedKey references keys managed by the Cloud Key Management Service. This should be set when KeyType is Managed.
	// +optional
	ManagedKey *ManagedKey `json:"managedKey,omitempty"`
	// SuppliedKey provides the key used to create or manage a disk. This should be set when KeyType is Managed.
	// +optional
	SuppliedKey *SuppliedKey `json:"suppliedKey,omitempty"`
}

CustomerEncryptionKey supports both Customer-Managed or Customer-Supplied encryption keys .

func (*CustomerEncryptionKey) DeepCopy added in v1.6.0

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

func (*CustomerEncryptionKey) DeepCopyInto added in v1.6.0

func (in *CustomerEncryptionKey) DeepCopyInto(out *CustomerEncryptionKey)

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

type DiskType

type DiskType string

DiskType is a type to use to define with disk type will be used.

const (
	// PdStandardDiskType defines the name for the standard disk.
	PdStandardDiskType DiskType = "pd-standard"
	// PdSsdDiskType defines the name for the ssd disk.
	PdSsdDiskType DiskType = "pd-ssd"
	// LocalSsdDiskType defines the name for the local ssd disk.
	LocalSsdDiskType DiskType = "local-ssd"
)

type Filter

type Filter struct {
	// Name of the filter. Filter names are case-sensitive.
	Name string `json:"name"`

	// Values includes one or more filter values. Filter values are case-sensitive.
	Values []string `json:"values"`
}

Filter is a filter used to identify an GCP resource.

func (*Filter) DeepCopy

func (in *Filter) DeepCopy() *Filter

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

func (*Filter) DeepCopyInto

func (in *Filter) DeepCopyInto(out *Filter)

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

type GCPCluster

type GCPCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   GCPClusterSpec   `json:"spec,omitempty"`
	Status GCPClusterStatus `json:"status,omitempty"`
}

GCPCluster is the Schema for the gcpclusters API.

func (*GCPCluster) DeepCopy

func (in *GCPCluster) DeepCopy() *GCPCluster

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

func (*GCPCluster) DeepCopyInto

func (in *GCPCluster) DeepCopyInto(out *GCPCluster)

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

func (*GCPCluster) DeepCopyObject

func (in *GCPCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GCPCluster) Default

func (c *GCPCluster) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type.

func (*GCPCluster) Hub

func (*GCPCluster) Hub()

Hub marks GCPCluster as a conversion hub.

func (*GCPCluster) SetupWebhookWithManager

func (c *GCPCluster) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager sets up and registers the webhook with the manager.

func (*GCPCluster) ValidateCreate

func (c *GCPCluster) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*GCPCluster) ValidateDelete

func (c *GCPCluster) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*GCPCluster) ValidateUpdate

func (c *GCPCluster) ValidateUpdate(oldRaw runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type GCPClusterList

type GCPClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GCPCluster `json:"items"`
}

GCPClusterList contains a list of GCPCluster.

func (*GCPClusterList) DeepCopy

func (in *GCPClusterList) DeepCopy() *GCPClusterList

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

func (*GCPClusterList) DeepCopyInto

func (in *GCPClusterList) DeepCopyInto(out *GCPClusterList)

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

func (*GCPClusterList) DeepCopyObject

func (in *GCPClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GCPClusterList) Hub

func (*GCPClusterList) Hub()

Hub marks GCPClusterList as a conversion hub.

type GCPClusterSpec

type GCPClusterSpec struct {
	// Project is the name of the project to deploy the cluster to.
	Project string `json:"project"`

	// The GCP Region the cluster lives in.
	Region string `json:"region"`

	// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
	// +optional
	ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"`

	// NetworkSpec encapsulates all things related to GCP network.
	// +optional
	Network NetworkSpec `json:"network"`

	// FailureDomains is an optional field which is used to assign selected availability zones to a cluster
	// FailureDomains if empty, defaults to all the zones in the selected region and if specified would override
	// the default zones.
	// +optional
	FailureDomains []string `json:"failureDomains,omitempty"`

	// AdditionalLabels is an optional set of tags to add to GCP resources managed by the GCP provider, in addition to the
	// ones added by default.
	// +optional
	AdditionalLabels Labels `json:"additionalLabels,omitempty"`

	// ResourceManagerTags is an optional set of tags to apply to GCP resources managed
	// by the GCP provider. GCP supports a maximum of 50 tags per resource.
	// +maxItems=50
	// +optional
	ResourceManagerTags ResourceManagerTags `json:"resourceManagerTags,omitempty"`

	// CredentialsRef is a reference to a Secret that contains the credentials to use for provisioning this cluster. If not
	// supplied then the credentials of the controller will be used.
	// +optional
	CredentialsRef *ObjectReference `json:"credentialsRef,omitempty"`

	// LoadBalancer contains configuration for one or more LoadBalancers.
	// +optional
	LoadBalancer LoadBalancerSpec `json:"loadBalancer,omitempty"`
}

GCPClusterSpec defines the desired state of GCPCluster.

func (*GCPClusterSpec) DeepCopy

func (in *GCPClusterSpec) DeepCopy() *GCPClusterSpec

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

func (*GCPClusterSpec) DeepCopyInto

func (in *GCPClusterSpec) DeepCopyInto(out *GCPClusterSpec)

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

type GCPClusterStatus

type GCPClusterStatus struct {
	FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"`
	Network        Network                  `json:"network,omitempty"`

	// Bastion Instance `json:"bastion,omitempty"`
	Ready bool `json:"ready"`
}

GCPClusterStatus defines the observed state of GCPCluster.

func (*GCPClusterStatus) DeepCopy

func (in *GCPClusterStatus) DeepCopy() *GCPClusterStatus

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

func (*GCPClusterStatus) DeepCopyInto

func (in *GCPClusterStatus) DeepCopyInto(out *GCPClusterStatus)

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

type GCPClusterTemplate

type GCPClusterTemplate struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec GCPClusterTemplateSpec `json:"spec,omitempty"`
}

GCPClusterTemplate is the Schema for the gcpclustertemplates API.

func (*GCPClusterTemplate) DeepCopy

func (in *GCPClusterTemplate) DeepCopy() *GCPClusterTemplate

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

func (*GCPClusterTemplate) DeepCopyInto

func (in *GCPClusterTemplate) DeepCopyInto(out *GCPClusterTemplate)

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

func (*GCPClusterTemplate) DeepCopyObject

func (in *GCPClusterTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GCPClusterTemplate) Default

func (r *GCPClusterTemplate) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type.

func (*GCPClusterTemplate) Hub added in v1.1.0

func (*GCPClusterTemplate) Hub()

Hub marks GCPClusterTemplate as a conversion hub.

func (*GCPClusterTemplate) SetupWebhookWithManager

func (r *GCPClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*GCPClusterTemplate) ValidateCreate

func (r *GCPClusterTemplate) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*GCPClusterTemplate) ValidateDelete

func (r *GCPClusterTemplate) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*GCPClusterTemplate) ValidateUpdate

func (r *GCPClusterTemplate) ValidateUpdate(oldRaw runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type GCPClusterTemplateList

type GCPClusterTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GCPClusterTemplate `json:"items"`
}

GCPClusterTemplateList contains a list of GCPClusterTemplate.

func (*GCPClusterTemplateList) DeepCopy

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

func (*GCPClusterTemplateList) DeepCopyInto

func (in *GCPClusterTemplateList) DeepCopyInto(out *GCPClusterTemplateList)

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

func (*GCPClusterTemplateList) DeepCopyObject

func (in *GCPClusterTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GCPClusterTemplateList) Hub added in v1.1.0

func (*GCPClusterTemplateList) Hub()

Hub marks GCPClusterTemplateList as a conversion hub.

type GCPClusterTemplateResource

type GCPClusterTemplateResource struct {
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"`

	Spec GCPClusterSpec `json:"spec"`
}

GCPClusterTemplateResource contains spec for GCPClusterSpec.

func (*GCPClusterTemplateResource) DeepCopy

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

func (*GCPClusterTemplateResource) DeepCopyInto

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

type GCPClusterTemplateSpec

type GCPClusterTemplateSpec struct {
	Template GCPClusterTemplateResource `json:"template"`
}

GCPClusterTemplateSpec defines the desired state of GCPClusterTemplate.

func (*GCPClusterTemplateSpec) DeepCopy

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

func (*GCPClusterTemplateSpec) DeepCopyInto

func (in *GCPClusterTemplateSpec) DeepCopyInto(out *GCPClusterTemplateSpec)

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

type GCPMachine

type GCPMachine struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   GCPMachineSpec   `json:"spec,omitempty"`
	Status GCPMachineStatus `json:"status,omitempty"`
}

GCPMachine is the Schema for the gcpmachines API.

func (*GCPMachine) DeepCopy

func (in *GCPMachine) DeepCopy() *GCPMachine

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

func (*GCPMachine) DeepCopyInto

func (in *GCPMachine) DeepCopyInto(out *GCPMachine)

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

func (*GCPMachine) DeepCopyObject

func (in *GCPMachine) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GCPMachine) Default

func (m *GCPMachine) Default()

Default implements webhookutil.defaulter so a webhook will be registered for the type.

func (*GCPMachine) Hub

func (*GCPMachine) Hub()

Hub marks GCPMachine as a conversion hub.

func (*GCPMachine) SetupWebhookWithManager

func (m *GCPMachine) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*GCPMachine) ValidateCreate

func (m *GCPMachine) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*GCPMachine) ValidateDelete

func (m *GCPMachine) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*GCPMachine) ValidateUpdate

func (m *GCPMachine) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type GCPMachineList

type GCPMachineList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GCPMachine `json:"items"`
}

GCPMachineList contains a list of GCPMachine.

func (*GCPMachineList) DeepCopy

func (in *GCPMachineList) DeepCopy() *GCPMachineList

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

func (*GCPMachineList) DeepCopyInto

func (in *GCPMachineList) DeepCopyInto(out *GCPMachineList)

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

func (*GCPMachineList) DeepCopyObject

func (in *GCPMachineList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GCPMachineList) Hub

func (*GCPMachineList) Hub()

Hub marks GCPMachineList as a conversion hub.

type GCPMachineSpec

type GCPMachineSpec struct {
	// InstanceType is the type of instance to create. Example: n1.standard-2
	InstanceType string `json:"instanceType"`

	// Subnet is a reference to the subnetwork to use for this instance. If not specified,
	// the first subnetwork retrieved from the Cluster Region and Network is picked.
	// +optional
	Subnet *string `json:"subnet,omitempty"`

	// ProviderID is the unique identifier as specified by the cloud provider.
	// +optional
	ProviderID *string `json:"providerID,omitempty"`

	// ImageFamily is the full reference to a valid image family to be used for this machine.
	// +optional
	ImageFamily *string `json:"imageFamily,omitempty"`

	// Image is the full reference to a valid image to be used for this machine.
	// Takes precedence over ImageFamily.
	// +optional
	Image *string `json:"image,omitempty"`

	// AdditionalLabels is an optional set of tags to add to an instance, in addition to the ones added by default by the
	// GCP provider. If both the GCPCluster and the GCPMachine specify the same tag name with different values, the
	// GCPMachine's value takes precedence.
	// +optional
	AdditionalLabels Labels `json:"additionalLabels,omitempty"`

	// AdditionalMetadata is an optional set of metadata to add to an instance, in addition to the ones added by default by the
	// GCP provider.
	// +listType=map
	// +listMapKey=key
	// +optional
	AdditionalMetadata []MetadataItem `json:"additionalMetadata,omitempty"`

	// PublicIP specifies whether the instance should get a public IP.
	// Set this to true if you don't have a NAT instances or Cloud Nat setup.
	// +optional
	PublicIP *bool `json:"publicIP,omitempty"`

	// AdditionalNetworkTags is a list of network tags that should be applied to the
	// instance. These tags are set in addition to any network tags defined
	// at the cluster level or in the actuator.
	// +optional
	AdditionalNetworkTags []string `json:"additionalNetworkTags,omitempty"`

	// ResourceManagerTags is an optional set of tags to apply to GCP resources managed
	// by the GCP provider. GCP supports a maximum of 50 tags per resource.
	// +maxItems=50
	// +optional
	ResourceManagerTags ResourceManagerTags `json:"resourceManagerTags,omitempty"`

	// RootDeviceSize is the size of the root volume in GB.
	// Defaults to 30.
	// +optional
	RootDeviceSize int64 `json:"rootDeviceSize,omitempty"`

	// RootDeviceType is the type of the root volume.
	// Supported types of root volumes:
	// 1. "pd-standard" - Standard (HDD) persistent disk
	// 2. "pd-ssd" - SSD persistent disk
	// 3. "pd-balanced" - Balanced Persistent Disk
	// 4. "hyperdisk-balanced" - Hyperdisk Balanced
	// Default is "pd-standard".
	// +optional
	RootDeviceType *DiskType `json:"rootDeviceType,omitempty"`

	// AdditionalDisks are optional non-boot attached disks.
	// +optional
	AdditionalDisks []AttachedDiskSpec `json:"additionalDisks,omitempty"`

	// ServiceAccount specifies the service account email and which scopes to assign to the machine.
	// Defaults to: email: "default", scope: []{compute.CloudPlatformScope}
	// +optional
	ServiceAccount *ServiceAccount `json:"serviceAccounts,omitempty"`

	// Preemptible defines if instance is preemptible
	// +optional
	Preemptible bool `json:"preemptible,omitempty"`

	// ProvisioningModel defines if instance is spot.
	// If set to "Standard" while preemptible is true, then the VM will be of type "Preemptible".
	// If "Spot", VM type is "Spot". When unspecified, defaults to "Standard".
	// +kubebuilder:validation:Enum=Standard;Spot
	// +optional
	ProvisioningModel *ProvisioningModel `json:"provisioningModel,omitempty"`

	// IPForwarding Allows this instance to send and receive packets with non-matching destination or source IPs.
	// This is required if you plan to use this instance to forward routes. Defaults to enabled.
	// +kubebuilder:validation:Enum=Enabled;Disabled
	// +kubebuilder:default=Enabled
	// +optional
	IPForwarding *IPForwarding `json:"ipForwarding,omitempty"`

	// ShieldedInstanceConfig is the Shielded VM configuration for this machine
	// +optional
	ShieldedInstanceConfig *GCPShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`

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

	// ConfidentialCompute Defines whether the instance should have confidential compute enabled.
	// If enabled OnHostMaintenance is required to be set to "Terminate".
	// 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
	ConfidentialCompute *ConfidentialComputePolicy `json:"confidentialCompute,omitempty"`

	// RootDiskEncryptionKey defines the KMS key to be used to encrypt the root disk.
	// +optional
	RootDiskEncryptionKey *CustomerEncryptionKey `json:"rootDiskEncryptionKey,omitempty"`
}

GCPMachineSpec defines the desired state of GCPMachine.

func (*GCPMachineSpec) DeepCopy

func (in *GCPMachineSpec) DeepCopy() *GCPMachineSpec

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

func (*GCPMachineSpec) DeepCopyInto

func (in *GCPMachineSpec) DeepCopyInto(out *GCPMachineSpec)

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

type GCPMachineStatus

type GCPMachineStatus struct {
	// Ready is true when the provider resource is ready.
	// +optional
	Ready bool `json:"ready"`

	// Addresses contains the GCP instance associated addresses.
	Addresses []corev1.NodeAddress `json:"addresses,omitempty"`

	// InstanceStatus is the status of the GCP instance for this machine.
	// +optional
	InstanceStatus *InstanceStatus `json:"instanceState,omitempty"`

	// FailureReason will be set in the event that there is a terminal problem
	// reconciling the Machine and will contain a succinct value suitable
	// for machine interpretation.
	//
	// This field should not be set for transitive errors that a controller
	// faces that are expected to be fixed automatically over
	// time (like service outages), but instead indicate that something is
	// fundamentally wrong with the Machine's spec or the configuration of
	// the controller, and that manual intervention is required. Examples
	// of terminal errors would be invalid combinations of settings in the
	// spec, values that are unsupported by the controller, or the
	// responsible controller itself being critically misconfigured.
	//
	// Any transient errors that occur during the reconciliation of Machines
	// can be added as events to the Machine object and/or logged in the
	// controller's output.
	// +optional
	FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"`

	// FailureMessage will be set in the event that there is a terminal problem
	// reconciling the Machine and will contain a more verbose string suitable
	// for logging and human consumption.
	//
	// This field should not be set for transitive errors that a controller
	// faces that are expected to be fixed automatically over
	// time (like service outages), but instead indicate that something is
	// fundamentally wrong with the Machine's spec or the configuration of
	// the controller, and that manual intervention is required. Examples
	// of terminal errors would be invalid combinations of settings in the
	// spec, values that are unsupported by the controller, or the
	// responsible controller itself being critically misconfigured.
	//
	// Any transient errors that occur during the reconciliation of Machines
	// can be added as events to the Machine object and/or logged in the
	// controller's output.
	// +optional
	FailureMessage *string `json:"failureMessage,omitempty"`
}

GCPMachineStatus defines the observed state of GCPMachine.

func (*GCPMachineStatus) DeepCopy

func (in *GCPMachineStatus) DeepCopy() *GCPMachineStatus

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

func (*GCPMachineStatus) DeepCopyInto

func (in *GCPMachineStatus) DeepCopyInto(out *GCPMachineStatus)

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

type GCPMachineTemplate

type GCPMachineTemplate struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec GCPMachineTemplateSpec `json:"spec,omitempty"`
}

GCPMachineTemplate is the Schema for the gcpmachinetemplates API.

func (*GCPMachineTemplate) DeepCopy

func (in *GCPMachineTemplate) DeepCopy() *GCPMachineTemplate

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

func (*GCPMachineTemplate) DeepCopyInto

func (in *GCPMachineTemplate) DeepCopyInto(out *GCPMachineTemplate)

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

func (*GCPMachineTemplate) DeepCopyObject

func (in *GCPMachineTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GCPMachineTemplate) Default

func (r *GCPMachineTemplate) Default()

Default implements webhookutil.defaulter so a webhook will be registered for the type.

func (*GCPMachineTemplate) Hub

func (*GCPMachineTemplate) Hub()

Hub marks GCPMachineTemplate as a conversion hub.

func (*GCPMachineTemplate) SetupWebhookWithManager

func (r *GCPMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*GCPMachineTemplate) ValidateCreate

func (r *GCPMachineTemplate) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*GCPMachineTemplate) ValidateDelete

func (r *GCPMachineTemplate) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*GCPMachineTemplate) ValidateUpdate

func (r *GCPMachineTemplate) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type GCPMachineTemplateList

type GCPMachineTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GCPMachineTemplate `json:"items"`
}

GCPMachineTemplateList contains a list of GCPMachineTemplate.

func (*GCPMachineTemplateList) DeepCopy

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

func (*GCPMachineTemplateList) DeepCopyInto

func (in *GCPMachineTemplateList) DeepCopyInto(out *GCPMachineTemplateList)

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

func (*GCPMachineTemplateList) DeepCopyObject

func (in *GCPMachineTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GCPMachineTemplateList) Hub

func (*GCPMachineTemplateList) Hub()

Hub marks GCPMachineTemplateList as a conversion hub.

type GCPMachineTemplateResource

type GCPMachineTemplateResource struct {
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the specification of the desired behavior of the machine.
	Spec GCPMachineSpec `json:"spec"`
}

GCPMachineTemplateResource describes the data needed to create am GCPMachine from a template.

func (*GCPMachineTemplateResource) DeepCopy

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

func (*GCPMachineTemplateResource) DeepCopyInto

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

type GCPMachineTemplateSpec

type GCPMachineTemplateSpec struct {
	Template GCPMachineTemplateResource `json:"template"`
}

GCPMachineTemplateSpec defines the desired state of GCPMachineTemplate.

func (*GCPMachineTemplateSpec) DeepCopy

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

func (*GCPMachineTemplateSpec) DeepCopyInto

func (in *GCPMachineTemplateSpec) DeepCopyInto(out *GCPMachineTemplateSpec)

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

type GCPShieldedInstanceConfig added in v1.3.0

type GCPShieldedInstanceConfig struct {
	// SecureBoot Defines whether the instance should have secure boot enabled.
	// Secure Boot verify the digital signature of all boot components, and halting 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 Disabled.
	// +kubebuilder:validation:Enum=Enabled;Disabled
	//+optional
	SecureBoot SecureBootPolicy `json:"secureBoot,omitempty"`

	// VirtualizedTrustedPlatformModule enable virtualized trusted platform module measurements to create a known good boot integrity policy baseline.
	// The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed.
	// If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled.
	// +kubebuilder:validation:Enum=Enabled;Disabled
	// +optional
	VirtualizedTrustedPlatformModule VirtualizedTrustedPlatformModulePolicy `json:"virtualizedTrustedPlatformModule,omitempty"`

	// IntegrityMonitoring determines whether the instance should have integrity monitoring that verify the runtime boot integrity.
	// Compares the most recent boot measurements to the integrity policy baseline and return
	// a pair of pass/fail results depending on whether they match or not.
	// If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled.
	// +kubebuilder:validation:Enum=Enabled;Disabled
	// +optional
	IntegrityMonitoring IntegrityMonitoringPolicy `json:"integrityMonitoring,omitempty"`
}

GCPShieldedInstanceConfig describes the shielded VM configuration of the instance on GCP. Shielded VM configuration allow users to enable and disable Secure Boot, vTPM, and Integrity Monitoring.

func (*GCPShieldedInstanceConfig) DeepCopy added in v1.3.0

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

func (*GCPShieldedInstanceConfig) DeepCopyInto added in v1.3.0

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

type HostMaintenancePolicy added in v1.3.0

type HostMaintenancePolicy string

HostMaintenancePolicy represents the desired behavior ase of a host maintenance event.

const (
	// HostMaintenancePolicyMigrate causes Compute Engine to live migrate an instance when there is a maintenance event.
	HostMaintenancePolicyMigrate HostMaintenancePolicy = "Migrate"
	// HostMaintenancePolicyTerminate - stops an instance instead of migrating it.
	HostMaintenancePolicyTerminate HostMaintenancePolicy = "Terminate"
)

type IPForwarding added in v1.1.0

type IPForwarding string

IPForwarding represents the IP forwarding configuration for the GCP machine.

const (
	// IPForwardingEnabled enables the IP forwarding configuration for the GCP machine.
	IPForwardingEnabled IPForwarding = "Enabled"
	// IPForwardingDisabled disables the IP forwarding configuration for the GCP machine.
	IPForwardingDisabled IPForwarding = "Disabled"
)

type InstanceStatus

type InstanceStatus string

InstanceStatus describes the state of an GCP instance.

type IntegrityMonitoringPolicy added in v1.3.0

type IntegrityMonitoringPolicy string

IntegrityMonitoringPolicy represents the integrity monitoring configuration for the GCP machine.

const (
	// IntegrityMonitoringPolicyEnabled enables integrity monitoring for the GCP machine.
	IntegrityMonitoringPolicyEnabled IntegrityMonitoringPolicy = "Enabled"
	// IntegrityMonitoringPolicyDisabled disables integrity monitoring for the GCP machine.
	IntegrityMonitoringPolicyDisabled IntegrityMonitoringPolicy = "Disabled"
)

type KeyType added in v1.6.0

type KeyType string

KeyType is a type for disk encryption.

const (
	// CustomerManagedKey (CMEK) references an encryption key stored in Google Cloud KMS.
	CustomerManagedKey KeyType = "Managed"
	// CustomerSuppliedKey (CSEK) specifies an encryption key to use.
	CustomerSuppliedKey KeyType = "Supplied"
)

type Labels

type Labels map[string]string

Labels defines a map of tags.

func Build

func Build(params BuildParams) Labels

Build builds tags including the cluster tag and returns them in map form.

func (Labels) AddLabels

func (in Labels) AddLabels(other Labels) Labels

AddLabels adds (and overwrites) the current labels with the ones passed in.

func (Labels) DeepCopy

func (in Labels) DeepCopy() Labels

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

func (Labels) DeepCopyInto

func (in Labels) DeepCopyInto(out *Labels)

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

func (Labels) Difference

func (in Labels) Difference(other Labels) Labels

Difference returns the difference between this map of tags and the other map of tags. Items are considered equals if key and value are equals.

func (Labels) Equals

func (in Labels) Equals(other Labels) bool

Equals returns true if the tags are equal.

func (Labels) GetRole

func (in Labels) GetRole() string

GetRole returns the Cluster API role for the tagged resource.

func (Labels) HasOwned

func (in Labels) HasOwned(cluster string) bool

HasOwned returns true if the tags contains a tag that marks the resource as owned by the cluster from the perspective of this management tooling.

func (Labels) ToComputeFilter

func (in Labels) ToComputeFilter() string

ToComputeFilter returns the string representation of the labels as a filter to be used in google compute sdk calls.

type LoadBalancer added in v1.7.0

type LoadBalancer struct {
	// Name is the name of the Load Balancer. If not set a default name
	// will be used. For an Internal Load Balancer service the default
	// name is "api-internal".
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Pattern=`(^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)`
	// +optional
	Name *string `json:"name,omitempty"`

	// Subnet is the name of the subnet to use for a regional Load Balancer. A subnet is
	// required for the Load Balancer, if not defined the first configured subnet will be
	// used.
	Subnet *string `json:"subnet,omitempty"`
}

LoadBalancer specifies the configuration of a LoadBalancer.

func (*LoadBalancer) DeepCopy added in v1.7.0

func (in *LoadBalancer) DeepCopy() *LoadBalancer

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

func (*LoadBalancer) DeepCopyInto added in v1.7.0

func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer)

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

type LoadBalancerSpec added in v1.7.0

type LoadBalancerSpec struct {
	// APIServerInstanceGroupTagOverride overrides the default setting for the
	// tag used when creating the API Server Instance Group.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:MaxLength=16
	// +kubebuilder:validation:Pattern=`(^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)`
	// +optional
	APIServerInstanceGroupTagOverride *string `json:"apiServerInstanceGroupTagOverride,omitempty"`

	// LoadBalancerType defines the type of Load Balancer that should be created.
	// If not set, a Global External Proxy Load Balancer will be created by default.
	// +optional
	LoadBalancerType *LoadBalancerType `json:"loadBalancerType,omitempty"`

	// InternalLoadBalancer is the configuration for an Internal Passthrough Network Load Balancer.
	// +optional
	InternalLoadBalancer *LoadBalancer `json:"internalLoadBalancer,omitempty"`
}

LoadBalancerSpec contains configuration for one or more LoadBalancers.

func (*LoadBalancerSpec) DeepCopy added in v1.7.0

func (in *LoadBalancerSpec) DeepCopy() *LoadBalancerSpec

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

func (*LoadBalancerSpec) DeepCopyInto added in v1.7.0

func (in *LoadBalancerSpec) DeepCopyInto(out *LoadBalancerSpec)

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

type LoadBalancerType added in v1.7.0

type LoadBalancerType string

LoadBalancerType defines the Load Balancer that should be created.

type ManagedKey added in v1.6.0

type ManagedKey struct {
	// KMSKeyName is the name of the encryption key that is stored in Google Cloud KMS. For example:
	// "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/key_region/cryptoKeys/key
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`projects\/[-_[A-Za-z0-9]+\/locations\/[-_[A-Za-z0-9]+\/keyRings\/[-_[A-Za-z0-9]+\/cryptoKeys\/[-_[A-Za-z0-9]+`
	// +kubebuilder:validation:MaxLength=160
	KMSKeyName string `json:"kmsKeyName,omitempty"`
}

ManagedKey is a reference to a key managed by the Cloud Key Management Service.

func (*ManagedKey) DeepCopy added in v1.6.0

func (in *ManagedKey) DeepCopy() *ManagedKey

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

func (*ManagedKey) DeepCopyInto added in v1.6.0

func (in *ManagedKey) DeepCopyInto(out *ManagedKey)

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

type MetadataItem

type MetadataItem struct {
	// Key is the identifier for the metadata entry.
	Key string `json:"key"`
	// Value is the value of the metadata entry.
	Value *string `json:"value,omitempty"`
}

MetadataItem defines a single piece of metadata associated with an instance.

func (*MetadataItem) DeepCopy

func (in *MetadataItem) DeepCopy() *MetadataItem

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

func (*MetadataItem) DeepCopyInto

func (in *MetadataItem) DeepCopyInto(out *MetadataItem)

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

type Network

type Network struct {
	// SelfLink is the link to the Network used for this cluster.
	SelfLink *string `json:"selfLink,omitempty"`

	// FirewallRules is a map from the name of the rule to its full reference.
	// +optional
	FirewallRules map[string]string `json:"firewallRules,omitempty"`

	// Router is the full reference to the router created within the network
	// it'll contain the cloud nat gateway
	// +optional
	Router *string `json:"router,omitempty"`

	// APIServerAddress is the IPV4 global address assigned to the load balancer
	// created for the API Server.
	// +optional
	APIServerAddress *string `json:"apiServerIpAddress,omitempty"`

	// APIServerHealthCheck is the full reference to the health check
	// created for the API Server.
	// +optional
	APIServerHealthCheck *string `json:"apiServerHealthCheck,omitempty"`

	// APIServerInstanceGroups is a map from zone to the full reference
	// to the instance groups created for the control plane nodes created in the same zone.
	// +optional
	APIServerInstanceGroups map[string]string `json:"apiServerInstanceGroups,omitempty"`

	// APIServerBackendService is the full reference to the backend service
	// created for the API Server.
	// +optional
	APIServerBackendService *string `json:"apiServerBackendService,omitempty"`

	// APIServerTargetProxy is the full reference to the target proxy
	// created for the API Server.
	// +optional
	APIServerTargetProxy *string `json:"apiServerTargetProxy,omitempty"`

	// APIServerForwardingRule is the full reference to the forwarding rule
	// created for the API Server.
	// +optional
	APIServerForwardingRule *string `json:"apiServerForwardingRule,omitempty"`

	// APIInternalAddress is the IPV4 regional address assigned to the
	// internal Load Balancer.
	// +optional
	APIInternalAddress *string `json:"apiInternalIpAddress,omitempty"`

	// APIInternalHealthCheck is the full reference to the health check
	// created for the internal Load Balancer.
	// +optional
	APIInternalHealthCheck *string `json:"apiInternalHealthCheck,omitempty"`

	// APIInternalBackendService is the full reference to the backend service
	// created for the internal Load Balancer.
	// +optional
	APIInternalBackendService *string `json:"apiInternalBackendService,omitempty"`

	// APIInternalForwardingRule is the full reference to the forwarding rule
	// created for the internal Load Balancer.
	// +optional
	APIInternalForwardingRule *string `json:"apiInternalForwardingRule,omitempty"`
}

Network encapsulates GCP networking resources.

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

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

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

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

type NetworkSpec

type NetworkSpec struct {
	// Name is the name of the network to be used.
	// +optional
	Name *string `json:"name,omitempty"`

	// AutoCreateSubnetworks: When set to true, the VPC network is created
	// in "auto" mode. When set to false, the VPC network is created in
	// "custom" mode.
	//
	// An auto mode VPC network starts with one subnet per region. Each
	// subnet has a predetermined range as described in Auto mode VPC
	// network IP ranges.
	//
	// Defaults to true.
	// +optional
	AutoCreateSubnetworks *bool `json:"autoCreateSubnetworks,omitempty"`

	// Subnets configuration.
	// +optional
	Subnets Subnets `json:"subnets,omitempty"`

	// Allow for configuration of load balancer backend (useful for changing apiserver port)
	// +optional
	LoadBalancerBackendPort *int32 `json:"loadBalancerBackendPort,omitempty"`

	// HostProject is the name of the project hosting the shared VPC network resources.
	// +optional
	HostProject *string `json:"hostProject,omitempty"`

	// Mtu: Maximum Transmission Unit in bytes. The minimum value for this field is
	// 1300 and the maximum value is 8896. The suggested value is 1500, which is
	// the default MTU used on the Internet, or 8896 if you want to use Jumbo
	// frames. If unspecified, the value defaults to 1460.
	// More info: https://pkg.go.dev/google.golang.org/api/compute/v1#Network
	// +kubebuilder:validation:Minimum:=1300
	// +kubebuilder:validation:Maximum:=8896
	// +kubebuilder:default:=1460
	// +optional
	Mtu int64 `json:"mtu,omitempty"`
}

NetworkSpec encapsulates all things related to a GCP network.

func (*NetworkSpec) DeepCopy

func (in *NetworkSpec) DeepCopy() *NetworkSpec

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

func (*NetworkSpec) DeepCopyInto

func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)

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

type ObjectReference added in v1.3.0

type ObjectReference struct {
	// Namespace of the referent.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
	// +kubebuilder:validation:Required
	Namespace string `json:"namespace"`
	// Name of the referent.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
	// +kubebuilder:validation:Required
	Name string `json:"name"`
}

ObjectReference is a reference to another Kubernetes object instance.

func (*ObjectReference) DeepCopy added in v1.3.0

func (in *ObjectReference) DeepCopy() *ObjectReference

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

func (*ObjectReference) DeepCopyInto added in v1.3.0

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

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

type ProvisioningModel added in v1.8.0

type ProvisioningModel string

ProvisioningModel is a type for Spot VM enablement.

const (
	// ProvisioningModelStandard specifies the VM type to NOT be Spot.
	ProvisioningModelStandard ProvisioningModel = "Standard"
	// ProvisioningModelSpot specifies the VM type to be Spot.
	ProvisioningModelSpot ProvisioningModel = "Spot"
)

type ResourceLifecycle

type ResourceLifecycle string

ResourceLifecycle configures the lifecycle of a resource.

type ResourceManagerTag added in v1.6.0

type ResourceManagerTag 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 or Project ID ref
	// 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.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=32
	// +kubebuilder:validation:Pattern=`(^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)`
	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 `._-`.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]([0-9A-Za-z_.-]{0,61}[a-zA-Z0-9])?$`
	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.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]([0-9A-Za-z_.@%=+:,*#&()\[\]{}\-\s]{0,61}[a-zA-Z0-9])?$`
	Value string `json:"value"`
}

ResourceManagerTag is a tag to apply to GCP resources managed by the GCP provider.

func (*ResourceManagerTag) DeepCopy added in v1.6.0

func (in *ResourceManagerTag) DeepCopy() *ResourceManagerTag

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

func (*ResourceManagerTag) DeepCopyInto added in v1.6.0

func (in *ResourceManagerTag) DeepCopyInto(out *ResourceManagerTag)

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

type ResourceManagerTags added in v1.6.0

type ResourceManagerTags []ResourceManagerTag

ResourceManagerTags is an slice of ResourceManagerTag structs.

func (ResourceManagerTags) DeepCopy added in v1.6.0

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

func (ResourceManagerTags) DeepCopyInto added in v1.6.0

func (in ResourceManagerTags) DeepCopyInto(out *ResourceManagerTags)

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

func (*ResourceManagerTags) Merge added in v1.6.0

func (t *ResourceManagerTags) Merge(other ResourceManagerTags)

Merge merges resource manager tags in receiver and other.

type ResourceManagerTagsMap added in v1.6.0

type ResourceManagerTagsMap map[string]string

ResourceManagerTagsMap defines a map of key value pairs as expected by compute.InstanceParams.ResourceManagerTags.

func (ResourceManagerTagsMap) DeepCopy added in v1.6.0

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

func (ResourceManagerTagsMap) DeepCopyInto added in v1.6.0

func (in ResourceManagerTagsMap) DeepCopyInto(out *ResourceManagerTagsMap)

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

type SecureBootPolicy added in v1.3.0

type SecureBootPolicy string

SecureBootPolicy represents the secure boot configuration for the GCP machine.

const (
	// SecureBootPolicyEnabled enables the secure boot configuration for the GCP machine.
	SecureBootPolicyEnabled SecureBootPolicy = "Enabled"
	// SecureBootPolicyDisabled disables the secure boot configuration for the GCP machine.
	SecureBootPolicyDisabled SecureBootPolicy = "Disabled"
)

type ServiceAccount

type ServiceAccount struct {
	// Email: Email address of the service account.
	Email string `json:"email,omitempty"`

	// Scopes: The list of scopes to be made available for this service
	// account.
	Scopes []string `json:"scopes,omitempty"`
}

ServiceAccount describes compute.serviceAccount.

func (*ServiceAccount) DeepCopy

func (in *ServiceAccount) DeepCopy() *ServiceAccount

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

func (*ServiceAccount) DeepCopyInto

func (in *ServiceAccount) DeepCopyInto(out *ServiceAccount)

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

type SubnetSpec

type SubnetSpec struct {
	// Name defines a unique identifier to reference this resource.
	Name string `json:"name,omitempty"`

	// CidrBlock is the range of internal addresses that are owned by this
	// subnetwork. Provide this property when you create the subnetwork. For
	// example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
	// non-overlapping within a network. Only IPv4 is supported. This field
	// can be set only at resource creation time.
	CidrBlock string `json:"cidrBlock,omitempty"`

	// Description is an optional description associated with the resource.
	// +optional
	Description *string `json:"description,omitempty"`

	// SecondaryCidrBlocks defines secondary CIDR ranges,
	// from which secondary IP ranges of a VM may be allocated
	// +optional
	SecondaryCidrBlocks map[string]string `json:"secondaryCidrBlocks,omitempty"`

	// Region is the name of the region where the Subnetwork resides.
	Region string `json:"region,omitempty"`

	// PrivateGoogleAccess defines whether VMs in this subnet can access
	// Google services without assigning external IP addresses
	// +optional
	PrivateGoogleAccess *bool `json:"privateGoogleAccess,omitempty"`

	// EnableFlowLogs: Whether to enable flow logging for this subnetwork.
	// If this field is not explicitly set, it will not appear in get
	// listings. If not set the default behavior is to disable flow logging.
	// +optional
	EnableFlowLogs *bool `json:"enableFlowLogs,omitempty"`

	// Purpose: The purpose of the resource.
	// If unspecified, the purpose defaults to PRIVATE_RFC_1918.
	// The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
	//
	// Possible values:
	//   "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal
	// HTTP(S) Load Balancing.
	//   "PRIVATE" - Regular user created or automatically created subnet.
	//   "PRIVATE_RFC_1918" - Regular user created or automatically created
	// subnet.
	//   "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service
	// Connect in the producer network.
	//   "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional
	// Internal/External HTTP(S) Load Balancing.
	// +kubebuilder:validation:Enum=INTERNAL_HTTPS_LOAD_BALANCER;PRIVATE_RFC_1918;PRIVATE;PRIVATE_SERVICE_CONNECT;REGIONAL_MANAGED_PROXY
	// +kubebuilder:default=PRIVATE_RFC_1918
	// +optional
	Purpose *string `json:"purpose,omitempty"`
}

SubnetSpec configures an GCP Subnet.

func (*SubnetSpec) DeepCopy

func (in *SubnetSpec) DeepCopy() *SubnetSpec

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

func (*SubnetSpec) DeepCopyInto

func (in *SubnetSpec) DeepCopyInto(out *SubnetSpec)

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

func (*SubnetSpec) String

func (s *SubnetSpec) String() string

String returns a string representation of the subnet.

type Subnets

type Subnets []SubnetSpec

Subnets is a slice of Subnet.

func (Subnets) DeepCopy

func (in Subnets) DeepCopy() Subnets

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

func (Subnets) DeepCopyInto

func (in Subnets) DeepCopyInto(out *Subnets)

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

func (Subnets) FilterByRegion

func (s Subnets) FilterByRegion(region string) (res Subnets)

FilterByRegion returns a slice containing all subnets that live in the specified region.

func (Subnets) FindByName

func (s Subnets) FindByName(name string) *SubnetSpec

FindByName returns a single subnet matching the given name or nil.

func (Subnets) ToMap

func (s Subnets) ToMap() map[string]*SubnetSpec

ToMap returns a map from name to subnet.

type SuppliedKey added in v1.6.0

type SuppliedKey struct {
	// RawKey specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648
	// base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey.
	// For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0="
	// +optional
	RawKey []byte `json:"rawKey,omitempty"`
	// RSAEncryptedKey specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption
	// key to either encrypt or decrypt this resource. You can provide either the rawKey or the
	// rsaEncryptedKey.
	// For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFHi
	// z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoDi
	// D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe=="
	// The key must meet the following requirements before you can provide it to Compute Engine:
	// 1. The key is wrapped using a RSA public key certificate provided by Google.
	// 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding.
	// Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
	// +optional
	RSAEncryptedKey []byte `json:"rsaEncryptedKey,omitempty"`
}

SuppliedKey contains a key for disk encryption. Either RawKey or RSAEncryptedKey must be provided. +kubebuilder:validation:MinProperties=1 +kubebuilder:validation:MaxProperties=1

func (*SuppliedKey) DeepCopy added in v1.6.0

func (in *SuppliedKey) DeepCopy() *SuppliedKey

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

func (*SuppliedKey) DeepCopyInto added in v1.6.0

func (in *SuppliedKey) DeepCopyInto(out *SuppliedKey)

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

type VirtualizedTrustedPlatformModulePolicy added in v1.3.0

type VirtualizedTrustedPlatformModulePolicy string

VirtualizedTrustedPlatformModulePolicy represents the virtualized trusted platform module configuration for the GCP machine.

const (
	// VirtualizedTrustedPlatformModulePolicyEnabled enables the virtualized trusted platform module configuration for the GCP machine.
	VirtualizedTrustedPlatformModulePolicyEnabled VirtualizedTrustedPlatformModulePolicy = "Enabled"
	// VirtualizedTrustedPlatformModulePolicyDisabled disables the virtualized trusted platform module configuration for the GCP machine.
	VirtualizedTrustedPlatformModulePolicyDisabled VirtualizedTrustedPlatformModulePolicy = "Disabled"
)

Jump to

Keyboard shortcuts

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