scope

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLoadBalancerType = "LB-S"

Variables

View Source
var ErrBootstrapDataNotReady = errors.New("error retrieving bootstrap data: linked Machine's bootstrap.dataSecretName is nil")

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Client          client.Client
	ScalewayClient  *scwClient.Client
	ScalewayCluster *infrastructurev1beta1.ScalewayCluster
	Cluster         *v1beta1.Cluster
	// contains filtered or unexported fields
}

func NewCluster

func NewCluster(params *ClusterParams) (*Cluster, error)

func (*Cluster) Close

func (c *Cluster) Close(ctx context.Context) error

func (*Cluster) DefaultZone

func (c *Cluster) DefaultZone() scw.Zone

DefaultZone returns the first zone of the region. It's useful when no zone is provided but at least one is needed.

func (*Cluster) FailureDomains

func (c *Cluster) FailureDomains() v1beta1.FailureDomains

FailureDomains returns the Failure Domains for this cluster.

func (*Cluster) HasPrivateNetwork

func (c *Cluster) HasPrivateNetwork() bool

HasPrivateNetwork returns true if the Cluster has a Private Network (either managed by the cluster or an existing one).

func (*Cluster) HasPublicGateway

func (c *Cluster) HasPublicGateway() bool

func (*Cluster) LoadBalancerType

func (c *Cluster) LoadBalancerType() string

LoadBalancerType returns the type of the control-plane Load Balancer.

func (*Cluster) LoadBalancerZone

func (c *Cluster) LoadBalancerZone() scw.Zone

LoadBalancerZone returns the zone where the LoadBalancer should be created.

func (*Cluster) Name

func (c *Cluster) Name() string

Name returns the name that resources created for the cluster should have.

func (*Cluster) PatchObject

func (c *Cluster) PatchObject(ctx context.Context) error

func (*Cluster) PrivateNetworkID

func (c *Cluster) PrivateNetworkID() (string, error)

func (*Cluster) PublicGatewayZone

func (c *Cluster) PublicGatewayZone() scw.Zone

func (*Cluster) Region

func (c *Cluster) Region() scw.Region

Region returns the region of the cluster.

func (*Cluster) SecurityGroupName

func (c *Cluster) SecurityGroupName(name string) string

SecurityGroupName returns the name of the security group resource that will be created.

func (*Cluster) SetStatusPrivateNetworkID

func (c *Cluster) SetStatusPrivateNetworkID(pnID string)

SetStatusPrivateNetworkID sets the Private Network ID in the status of the ScalewayCluster object.

func (*Cluster) ShouldManagePrivateNetwork

func (c *Cluster) ShouldManagePrivateNetwork() bool

ShouldManagePrivateNetwork returns true if PrivateNetwork is enabled and no existing PrivateNetwork is provided.

func (*Cluster) Tags

func (c *Cluster) Tags() []string

func (*Cluster) Zones

func (c *Cluster) Zones(compatible []scw.Zone) (zones []scw.Zone)

Zones returns all available zones for the cluster Region that are compatible with the provided zones. If no compatible zones are provided, all zones are returned. If no zones are found, the default zone is returned so that there is always at least one zone returned.

type ClusterParams

type ClusterParams struct {
	Client          client.Client
	ScalewayClient  *scwClient.Client
	ScalewayCluster *infrastructurev1beta1.ScalewayCluster
	Cluster         *v1beta1.Cluster
}

type Machine

type Machine struct {
	Cluster
	ScalewayMachine *infrastructurev1beta1.ScalewayMachine
	Machine         *v1beta1.Machine
}

func NewMachine

func NewMachine(params *MachineParams) (*Machine, error)

func (*Machine) Close

func (m *Machine) Close(ctx context.Context) error

func (*Machine) GetRawBootstrapData

func (m *Machine) GetRawBootstrapData(ctx context.Context) ([]byte, error)

func (*Machine) Name

func (m *Machine) Name() string

Name returns the name that resources created for the machine should have.

func (*Machine) NeedsPublicIP

func (m *Machine) NeedsPublicIP() bool

func (*Machine) PatchObject

func (m *Machine) PatchObject(ctx context.Context) error

func (*Machine) ProviderID

func (m *Machine) ProviderID(serverID string) string

func (*Machine) Tags

func (m *Machine) Tags() []string

func (*Machine) Zone

func (m *Machine) Zone() scw.Zone

type MachineParams

type MachineParams struct {
	*ClusterParams
	ScalewayMachine *infrastructurev1beta1.ScalewayMachine
	Machine         *v1beta1.Machine
}

Jump to

Keyboard shortcuts

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