scope

package
v0.0.0-...-b4f7751 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildScope

type BuildScope struct {
	Build    *buildv1.Build
	GCPBuild *infrav1.GCPBuild
	//BuildGetter cloud.BuildGetter
	GCPServices
	// contains filtered or unexported fields
}

BuildScope defines the basic context for an actuator to operate upon.

func NewBuildScope

func NewBuildScope(ctx context.Context, params BuildScopeParams) (*BuildScope, error)

NewBuildScope creates a new Scope from the supplied parameters. This is meant to be called for each reconcile iteration.

func (*BuildScope) AdditionalLabels

func (s *BuildScope) AdditionalLabels() infrav1.Labels

AdditionalLabels returns the cluster additional labels.

func (*BuildScope) Close

func (s *BuildScope) Close() error

Close closes the current scope persisting the cluster configuration and status.

func (*BuildScope) Cloud

func (s *BuildScope) Cloud() cloud.Cloud

Cloud returns initialized cloud.

func (*BuildScope) EnsureCredentialsSecret

func (s *BuildScope) EnsureCredentialsSecret(ctx context.Context, host string) error

func (*BuildScope) FirewallRulesSpec

func (s *BuildScope) FirewallRulesSpec() []*compute.Firewall

FirewallRulesSpec returns google compute firewall spec.

func (*BuildScope) GetBootstrapData

func (s *BuildScope) GetBootstrapData() (string, error)

GetBootstrapData returns the bootstrap data from the secret in the Machine's bootstrap.dataSecretName.

func (*BuildScope) GetComputeService

func (b *BuildScope) GetComputeService() *compute.Service

Implement the method to return the Compute service

func (*BuildScope) GetInstanceID

func (s *BuildScope) GetInstanceID() *string

GetInstanceID returns the build instanceID

func (*BuildScope) GetInstanceStatus

func (s *BuildScope) GetInstanceStatus() *infrav1.InstanceStatus

GetInstanceStatus returns the GCPBuild instance status.

func (*BuildScope) GetSSHKey

func (s *BuildScope) GetSSHKey() SSHKey

GetSSHKey returns the ssh key.

func (*BuildScope) ImageName

func (s *BuildScope) ImageName() string

func (*BuildScope) InstanceAdditionalMetadataSpec

func (s *BuildScope) InstanceAdditionalMetadataSpec() *compute.Metadata

InstanceAdditionalMetadataSpec returns additional metadata spec.

func (*BuildScope) InstanceImageSpec

func (s *BuildScope) InstanceImageSpec() *compute.AttachedDisk

InstanceImageSpec returns compute instance image attched-disk spec.

func (*BuildScope) InstanceNetworkInterfaceSpec

func (s *BuildScope) InstanceNetworkInterfaceSpec() *compute.NetworkInterface

InstanceNetworkInterfaceSpec returns compute network interface spec.

func (*BuildScope) InstanceServiceAccountsSpec

func (s *BuildScope) InstanceServiceAccountsSpec() *compute.ServiceAccount

InstanceServiceAccountsSpec returns service-account spec.

func (*BuildScope) InstanceSpec

func (s *BuildScope) InstanceSpec(log logr.Logger) *compute.Instance

InstanceSpec returns instance spec.

func (*BuildScope) IsCleanedUP

func (s *BuildScope) IsCleanedUP() bool

func (*BuildScope) IsProvisionerReady

func (s *BuildScope) IsProvisionerReady() bool

func (*BuildScope) IsReady

func (s *BuildScope) IsReady() bool

func (*BuildScope) IsSharedVpc

func (s *BuildScope) IsSharedVpc() bool

IsSharedVpc returns true If sharedVPC used else , returns false.

func (*BuildScope) Name

func (s *BuildScope) Name() string

Name returns the cluster name.

func (*BuildScope) Namespace

func (s *BuildScope) Namespace() string

Namespace returns the cluster namespace.

func (*BuildScope) NatRouterSpec

func (s *BuildScope) NatRouterSpec() *compute.Router

NatRouterSpec returns google compute nat router spec.

func (*BuildScope) Network

func (s *BuildScope) Network() *infrav1.Network

Network returns the cluster network object.

func (*BuildScope) NetworkCloud

func (s *BuildScope) NetworkCloud() cloud.Cloud

NetworkCloud returns initialized cloud.

func (s *BuildScope) NetworkLink() string

NetworkLink returns the partial URL for the network.

func (*BuildScope) NetworkName

func (s *BuildScope) NetworkName() string

NetworkName returns the cluster network unique identifier.

func (*BuildScope) NetworkProject

func (s *BuildScope) NetworkProject() string

NetworkProject returns the project name where network resources should exist. The network project defaults to the Project when one is not supplied.

func (*BuildScope) NetworkSpec

func (s *BuildScope) NetworkSpec() *compute.Network

NetworkSpec returns google compute network spec.

func (*BuildScope) PatchObject

func (s *BuildScope) PatchObject() error

PatchObject persists the cluster configuration and status.

func (*BuildScope) Project

func (s *BuildScope) Project() string

Project returns the current project name.

func (*BuildScope) Region

func (s *BuildScope) Region() string

Region returns the cluster region.

func (*BuildScope) SetArtifactRef

func (s *BuildScope) SetArtifactRef(reference string)

func (*BuildScope) SetCleanedUP

func (s *BuildScope) SetCleanedUP()

SetBuildReady sets cleanup ready status.

func (*BuildScope) SetInstanceID

func (s *BuildScope) SetInstanceID(instanceID string)

SetInstanceID sets the build InstanceID.

func (*BuildScope) SetInstanceStatus

func (s *BuildScope) SetInstanceStatus(v infrav1.InstanceStatus)

SetInstanceStatus sets the GCPMachine instance status.

func (*BuildScope) SetMachineReady

func (s *BuildScope) SetMachineReady()

SetMachineReady sets build machine ready status.

func (*BuildScope) SetReady

func (s *BuildScope) SetReady()

SetReady sets cluster ready status.

func (*BuildScope) SetSSHKey

func (s *BuildScope) SetSSHKey(key SSHKey)

SetSSHKey sets ssh key.

func (*BuildScope) SubnetSpecs

func (s *BuildScope) SubnetSpecs() []*compute.Subnetwork

SubnetSpecs returns google compute subnets spec.

func (*BuildScope) Zone

func (s *BuildScope) Zone() string

Zone returns the FailureDomain for the GCPBuild.

type BuildScopeParams

type BuildScopeParams struct {
	GCPServices
	Client      client.Client
	Build       *buildv1.Build
	GCPBuild    *infrav1.GCPBuild
	BuildGetter cloud.BuildGetter
}

BuildScopeParams defines the input parameters used to create a new Scope.

type GCPRateLimiter

type GCPRateLimiter struct{}

GCPRateLimiter implements cloud.RateLimiter.

func (*GCPRateLimiter) Accept

func (rl *GCPRateLimiter) Accept(ctx context.Context, key *cloud.RateLimitKey) error

Accept blocks until the operation can be performed.

func (*GCPRateLimiter) Observe

Observe does nothing.

type GCPServices

type GCPServices struct {
	Compute *compute.Service
}

GCPServices contains all the gcp services used by the scopes.

type SSHKey

type SSHKey struct {
	MetadataSSHKeys string
	PrivateKey      string
	PublicKey       string
}

Jump to

Keyboard shortcuts

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