gcp

package
v0.1.87 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SATokenIssuerSecret = "sa-token-issuer-key"
)

Variables

This section is empty.

Functions

func BindOptions

func BindOptions(opts *RawCreateOptions, flags *pflag.FlagSet)

BindOptions binds the GCP-specific flags to the provided flag set

func DestroyCluster

func DestroyCluster(ctx context.Context, destroyOptions *core.DestroyOptions, client crclient.Client) error

DestroyCluster destroys a GCP HostedCluster and its associated infrastructure

func NewCreateCommand

func NewCreateCommand(opts *core.RawCreateOptions, clientProviders ...*core.ClientProvider) *cobra.Command

NewCreateCommand creates a new cobra command for creating GCP clusters

func NewDestroyCommand

func NewDestroyCommand(opts *core.DestroyOptions, clientProviders ...*core.ClientProvider) *cobra.Command

NewDestroyCommand creates a new cobra command for destroying GCP clusters

Types

type CreateOptions

type CreateOptions struct {
	// contains filtered or unexported fields
}

CreateOptions represents the completed and validated options for creating a GCP cluster

func (*CreateOptions) ApplyPlatformSpecifics

func (o *CreateOptions) ApplyPlatformSpecifics(hostedCluster *hyperv1.HostedCluster) error

ApplyPlatformSpecifics applies GCP-specific configurations to the HostedCluster

func (*CreateOptions) GenerateNodePools

func (o *CreateOptions) GenerateNodePools(constructor core.DefaultNodePoolConstructor) []*hyperv1.NodePool

GenerateNodePools generates the NodePool resources for GCP

func (*CreateOptions) GenerateResources

func (o *CreateOptions) GenerateResources() ([]client.Object, error)

GenerateResources generates additional resources for GCP

type RawCreateOptions

type RawCreateOptions struct {
	// Project is the GCP project ID where the HostedCluster will be created
	Project string

	// Region is the GCP region where the HostedCluster will be created
	Region string

	// Network is the VPC network name for the cluster
	Network string

	// PrivateServiceConnectSubnet is the subnet for Private Service Connect endpoints
	PrivateServiceConnectSubnet string

	// WorkloadIdentityProjectNumber is the numeric GCP project identifier for WIF configuration
	WorkloadIdentityProjectNumber string

	// WorkloadIdentityPoolID is the workload identity pool identifier
	WorkloadIdentityPoolID string

	// WorkloadIdentityProviderID is the workload identity provider identifier
	WorkloadIdentityProviderID string

	// NodePoolServiceAccount is the Google Service Account email for CAPG controllers
	NodePoolServiceAccount string

	// ControlPlaneServiceAccount is the Google Service Account email for the Control Plane Operator
	ControlPlaneServiceAccount string

	// CloudControllerServiceAccount is the Google Service Account email for the Cloud Controller Manager
	CloudControllerServiceAccount string

	// StorageServiceAccount is the Google Service Account email for the GCP PD CSI Driver
	StorageServiceAccount string

	// ImageRegistryServiceAccount is the Google Service Account email for the Image Registry Operator
	ImageRegistryServiceAccount string

	// NetworkServiceAccount is the Google Service Account email for the Cloud Network Config Controller
	NetworkServiceAccount string

	// ServiceAccountSigningKeyPath is the path to the private key file for the service account token issuer
	ServiceAccountSigningKeyPath string

	// EndpointAccess controls API endpoint accessibility (Private or PublicAndPrivate)
	EndpointAccess string

	// IssuerURL is the OIDC provider issuer URL
	IssuerURL string

	// MachineType is the GCP machine type for node instances (e.g. n2-standard-4)
	MachineType string

	// Zone is the GCP zone for node instances (e.g. us-central1-a)
	Zone string

	// Subnet is the subnet name for node instances
	Subnet string

	// BootImage is the GCP boot image for node instances. Overrides the default RHCOS image from the release payload
	BootImage string
}

RawCreateOptions contains the raw command-line options for creating a GCP cluster

func DefaultOptions

func DefaultOptions() *RawCreateOptions

DefaultOptions returns default options for GCP cluster creation

func (*RawCreateOptions) Validate

Validate validates the GCP create cluster command options

type ValidatedCreateOptions

type ValidatedCreateOptions struct {
	// contains filtered or unexported fields
}

ValidatedCreateOptions represents validated options for creating a GCP cluster

func (*ValidatedCreateOptions) Complete

Complete completes the GCP create cluster command options

Jump to

Keyboard shortcuts

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