Documentation ¶
Index ¶
- func AddServiceAccountRoles(ctx context.Context, projectID, serviceAccountID string, roles []string) error
- func CreateServiceAccount(ctx context.Context, infraID, projectID, role string) (string, error)
- func EditIgnition(ctx context.Context, in clusterapi.IgnitionInput) ([]byte, error)
- func GetMasterRoles() []string
- func GetWorkerRoles() []string
- func NewComputeService() (*compute.Service, error)
- func WaitForOperationGlobal(ctx context.Context, projectID string, operation *compute.Operation) error
- func WaitForOperationRegional(ctx context.Context, projectID, region string, operation *compute.Operation) error
- type Provider
- func (p Provider) DestroyBootstrap(ctx context.Context, in clusterapi.BootstrapDestroyInput) error
- func (p Provider) Ignition(ctx context.Context, in clusterapi.IgnitionInput) ([]byte, error)
- func (p Provider) InfraReady(ctx context.Context, in clusterapi.InfraReadyInput) error
- func (p Provider) Name() string
- func (p Provider) PostProvision(ctx context.Context, in clusterapi.PostProvisionInput) error
- func (p Provider) PreProvision(ctx context.Context, in clusterapi.PreProvisionInput) error
- func (Provider) PublicGatherEndpoint() clusterapi.GatherEndpoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddServiceAccountRoles ¶
func AddServiceAccountRoles(ctx context.Context, projectID, serviceAccountID string, roles []string) error
AddServiceAccountRoles adds predefined roles for service account.
func CreateServiceAccount ¶
CreateServiceAccount is used to create a service account for a compute instance.
func EditIgnition ¶
func EditIgnition(ctx context.Context, in clusterapi.IgnitionInput) ([]byte, error)
EditIgnition attempts to edit the contents of the bootstrap ignition when the user has selected a custom DNS configuration. Find the public and private load balancer addresses and fill in the infrastructure file within the ignition struct.
func GetMasterRoles ¶
func GetMasterRoles() []string
GetMasterRoles returns the pre-defined roles for a master node. Roles are described here https://cloud.google.com/iam/docs/understanding-roles#predefined_roles.
func GetWorkerRoles ¶
func GetWorkerRoles() []string
GetWorkerRoles returns the pre-defined roles for a worker node.
func NewComputeService ¶
func NewComputeService() (*compute.Service, error)
NewComputeService wraps the creation of a gcp compute service creation.
Types ¶
type Provider ¶
type Provider struct { }
Provider implements gcp infrastructure in conjunction with the GCP CAPI provider.
func (Provider) DestroyBootstrap ¶
func (p Provider) DestroyBootstrap(ctx context.Context, in clusterapi.BootstrapDestroyInput) error
DestroyBootstrap destroys the temporary bootstrap resources.
func (Provider) Ignition ¶
func (p Provider) Ignition(ctx context.Context, in clusterapi.IgnitionInput) ([]byte, error)
Ignition provisions the GCP bucket and url that points to the bucket. Bootstrap ignition data cannot populate the metadata field of the bootstrap instance as the data can be too large. Instead, the data is added to a bucket. A signed url is generated to point to the bucket and the ignition data will be updated to point to the url. This is also allows for bootstrap data to be edited after its initial creation.
func (Provider) InfraReady ¶
func (p Provider) InfraReady(ctx context.Context, in clusterapi.InfraReadyInput) error
InfraReady is called once cluster.Status.InfrastructureReady is true, typically after load balancers have been provisioned. It can be used to create DNS records.
func (Provider) PostProvision ¶
func (p Provider) PostProvision(ctx context.Context, in clusterapi.PostProvisionInput) error
PostProvision should be called to add or update and GCP resources after provisioning has completed.
func (Provider) PreProvision ¶
func (p Provider) PreProvision(ctx context.Context, in clusterapi.PreProvisionInput) error
PreProvision is called before provisioning using CAPI controllers has initiated. GCP resources that are not created by CAPG (and are required for other stages of the install) are created here using the gcp sdk.
func (Provider) PublicGatherEndpoint ¶ added in v0.90.17
func (Provider) PublicGatherEndpoint() clusterapi.GatherEndpoint
PublicGatherEndpoint indicates that machine ready checks should wait for an ExternalIP in the status and use that when gathering bootstrap log bundles.