Documentation ¶
Index ¶
- type BuildScope
- func (s *BuildScope) AdditionalLabels() infrav1.Labels
- func (s *BuildScope) Close() error
- func (s *BuildScope) Cloud() cloud.Cloud
- func (s *BuildScope) EnsureCredentialsSecret(ctx context.Context, host string) error
- func (s *BuildScope) FirewallRulesSpec() []*compute.Firewall
- func (s *BuildScope) GetBootstrapData() (string, error)
- func (b *BuildScope) GetComputeService() *compute.Service
- func (s *BuildScope) GetInstanceID() *string
- func (s *BuildScope) GetInstanceStatus() *infrav1.InstanceStatus
- func (s *BuildScope) GetSSHKey() SSHKey
- func (s *BuildScope) ImageName() string
- func (s *BuildScope) InstanceAdditionalMetadataSpec() *compute.Metadata
- func (s *BuildScope) InstanceImageSpec() *compute.AttachedDisk
- func (s *BuildScope) InstanceNetworkInterfaceSpec() *compute.NetworkInterface
- func (s *BuildScope) InstanceServiceAccountsSpec() *compute.ServiceAccount
- func (s *BuildScope) InstanceSpec(log logr.Logger) *compute.Instance
- func (s *BuildScope) IsCleanedUP() bool
- func (s *BuildScope) IsProvisionerReady() bool
- func (s *BuildScope) IsReady() bool
- func (s *BuildScope) IsSharedVpc() bool
- func (s *BuildScope) Name() string
- func (s *BuildScope) Namespace() string
- func (s *BuildScope) NatRouterSpec() *compute.Router
- func (s *BuildScope) Network() *infrav1.Network
- func (s *BuildScope) NetworkCloud() cloud.Cloud
- func (s *BuildScope) NetworkLink() string
- func (s *BuildScope) NetworkName() string
- func (s *BuildScope) NetworkProject() string
- func (s *BuildScope) NetworkSpec() *compute.Network
- func (s *BuildScope) PatchObject() error
- func (s *BuildScope) Project() string
- func (s *BuildScope) Region() string
- func (s *BuildScope) SetArtifactRef(reference string)
- func (s *BuildScope) SetCleanedUP()
- func (s *BuildScope) SetInstanceID(instanceID string)
- func (s *BuildScope) SetInstanceStatus(v infrav1.InstanceStatus)
- func (s *BuildScope) SetMachineReady()
- func (s *BuildScope) SetReady()
- func (s *BuildScope) SetSSHKey(key SSHKey)
- func (s *BuildScope) SubnetSpecs() []*compute.Subnetwork
- func (s *BuildScope) Zone() string
- type BuildScopeParams
- type GCPRateLimiter
- type GCPServices
- type SSHKey
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) 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 (*BuildScope) NetworkLink ¶
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) 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) 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 ¶
func (rl *GCPRateLimiter) Observe(context.Context, error, *cloud.RateLimitKey)
Observe does nothing.
type GCPServices ¶
type GCPServices struct {
Compute *compute.Service
}
GCPServices contains all the gcp services used by the scopes.