scaleway

package
v1.28.5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagClusterName           = "noprefix=kops.k8s.io/cluster"
	TagInstanceGroup         = "noprefix=kops.k8s.io/instance-group"
	TagNameEtcdClusterPrefix = "noprefix=kops.k8s.io/etcd"
	TagNeedsUpdate           = "noprefix=kops.k8s.io/needs-update"
	TagNameRolePrefix        = "noprefix=kops.k8s.io/role"
	TagRoleControlPlane      = "ControlPlane"
	TagRoleWorker            = "Node"
	KopsUserAgentPrefix      = "kubernetes-kops/"
)
View Source
const ScalewayAuthenticationTokenPrefix = "x-scaleway-instance-server-id "

Variables

This section is empty.

Functions

func ClusterNameFromTags added in v1.28.0

func ClusterNameFromTags(tags []string) string

func CreateValidScalewayProfile added in v1.27.0

func CreateValidScalewayProfile() (*scw.Profile, error)

func InstanceGroupNameFromTags added in v1.28.0

func InstanceGroupNameFromTags(tags []string) string

func InstanceRoleFromTags added in v1.28.0

func InstanceRoleFromTags(tags []string) string

func NewScalewayAuthenticator added in v1.27.0

func NewScalewayAuthenticator() (bootstrap.Authenticator, error)

func NewScalewayVerifier added in v1.27.0

func NewScalewayVerifier(ctx context.Context, opt *ScalewayVerifierOptions) (bootstrap.Verifier, error)

func ParseRegionFromZone added in v1.27.0

func ParseRegionFromZone(zone scw.Zone) (region scw.Region, err error)

func ParseZoneFromClusterSpec added in v1.27.0

func ParseZoneFromClusterSpec(clusterSpec kops.ClusterSpec) (scw.Zone, error)

Types

type ScalewayVerifierOptions added in v1.27.0

type ScalewayVerifierOptions struct{}

type ScwAPITarget

type ScwAPITarget struct {
	Cloud ScwCloud
}

func NewScwAPITarget

func NewScwAPITarget(cloud ScwCloud) *ScwAPITarget

func (*ScwAPITarget) DefaultCheckExisting

func (t *ScwAPITarget) DefaultCheckExisting() bool

func (ScwAPITarget) Finish

func (s ScwAPITarget) Finish(taskMap map[string]fi.CloudupTask) error

func (ScwAPITarget) ProcessDeletions

func (s ScwAPITarget) ProcessDeletions() bool

type ScwCloud

type ScwCloud interface {
	fi.Cloud

	ClusterName(tags []string) string
	DNS() (dnsprovider.Interface, error)
	ProviderID() kops.CloudProviderID
	Region() string
	Zone() string

	DomainService() *domain.API
	IamService() *iam.API
	InstanceService() *instance.API
	LBService() *lb.ZonedAPI
	MarketplaceService() *marketplace.API

	DeleteGroup(group *cloudinstances.CloudInstanceGroup) error
	DeleteInstance(i *cloudinstances.CloudInstance) error
	DeregisterInstance(instance *cloudinstances.CloudInstance) error
	DetachInstance(instance *cloudinstances.CloudInstance) error
	FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error)
	FindVPCInfo(id string) (*fi.VPCInfo, error)
	GetApiIngressStatus(cluster *kops.Cluster) ([]fi.ApiIngressStatus, error)
	GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error)

	GetClusterDNSRecords(clusterName string) ([]*domain.Record, error)
	GetClusterLoadBalancers(clusterName string) ([]*lb.LB, error)
	GetClusterServers(clusterName string, instanceGroupName *string) ([]*instance.Server, error)
	GetClusterSSHKeys(clusterName string) ([]*iam.SSHKey, error)
	GetClusterVolumes(clusterName string) ([]*instance.Volume, error)

	DeleteDNSRecord(record *domain.Record, clusterName string) error
	DeleteLoadBalancer(loadBalancer *lb.LB) error
	DeleteServer(server *instance.Server) error
	DeleteSSHKey(sshkey *iam.SSHKey) error
	DeleteVolume(volume *instance.Volume) error
}

ScwCloud exposes all the interfaces required to operate on Scaleway resources

func NewScwCloud

func NewScwCloud(tags map[string]string) (ScwCloud, error)

NewScwCloud returns a Cloud with a Scaleway Client using the env vars SCW_PROFILE or SCW_ACCESS_KEY, SCW_SECRET_KEY and SCW_DEFAULT_PROJECT_ID

Jump to

Keyboard shortcuts

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