Documentation
¶
Index ¶
- Variables
- func IsForbiddenError(err error) bool
- func IsNotFoundError(err error) bool
- func IsPreconditionFailedError(err error) bool
- func TagsWithoutCreatedBy(tags []string) []string
- type Block
- type BlockAPI
- type Client
- func (c *Client) AddBackendServer(ctx context.Context, zone scw.Zone, backendID, ip string) error
- func (c *Client) AttachLBPrivateNetwork(ctx context.Context, zone scw.Zone, lbID, privateNetworkID string, ...) error
- func (c *Client) CleanAvailableIPs(ctx context.Context, privateNetworkID string) error
- func (c *Client) CreateBackend(ctx context.Context, zone scw.Zone, lbID, name string, servers []string, ...) (*lb.Backend, error)
- func (c *Client) CreateCluster(ctx context.Context, name, clusterType, version string, pnID *string, ...) (*k8s.Cluster, error)
- func (c *Client) CreateFrontend(ctx context.Context, zone scw.Zone, lbID, name, backendID string, port int32) (*lb.Frontend, error)
- func (c *Client) CreateGateway(ctx context.Context, zone scw.Zone, name, gwType string, tags []string, ...) (*vpcgw.Gateway, error)
- func (c *Client) CreateGatewayNetwork(ctx context.Context, zone scw.Zone, gatewayID, privateNetworkID string) error
- func (c *Client) CreateIP(ctx context.Context, zone scw.Zone, ipType instance.IPType, tags []string) (*instance.IP, error)
- func (c *Client) CreateLB(ctx context.Context, zone scw.Zone, name, lbType string, ipID *string, ...) (*lb.LB, error)
- func (c *Client) CreateLBACL(ctx context.Context, zone scw.Zone, frontendID, name string, index int32, ...) error
- func (c *Client) CreatePool(ctx context.Context, zone scw.Zone, clusterID, name, nodeType string, ...) (*k8s.Pool, error)
- func (c *Client) CreatePrivateNIC(ctx context.Context, zone scw.Zone, serverID, privateNetworkID string) (*instance.PrivateNIC, error)
- func (c *Client) CreatePrivateNetwork(ctx context.Context, name string, vpcID, subnet *string, tags []string) (*vpc.PrivateNetwork, error)
- func (c *Client) CreateServer(ctx context.Context, zone scw.Zone, name, commercialType, imageID string, ...) (*instance.Server, error)
- func (c *Client) DefaultZone() scw.Zone
- func (c *Client) DeleteCluster(ctx context.Context, id string, withAdditionalResources bool) error
- func (c *Client) DeleteDNSZoneRecords(ctx context.Context, zone, name string) error
- func (c *Client) DeleteGateway(ctx context.Context, zone scw.Zone, id string, deleteIP bool) error
- func (c *Client) DeleteIP(ctx context.Context, zone scw.Zone, ipID string) error
- func (c *Client) DeleteInstanceVolume(ctx context.Context, zone scw.Zone, volumeID string) error
- func (c *Client) DeleteLB(ctx context.Context, zone scw.Zone, id string, releaseIP bool) error
- func (c *Client) DeleteLBACL(ctx context.Context, zone scw.Zone, aclID string) error
- func (c *Client) DeletePool(ctx context.Context, id string) error
- func (c *Client) DeletePrivateNetwork(ctx context.Context, id string) error
- func (c *Client) DeleteServer(ctx context.Context, zone scw.Zone, serverID string) error
- func (c *Client) DeleteServerUserData(ctx context.Context, zone scw.Zone, serverID, key string) error
- func (c *Client) DeleteVolume(ctx context.Context, zone scw.Zone, volumeID string) error
- func (c *Client) DetachVolume(ctx context.Context, zone scw.Zone, volumeID string) error
- func (c *Client) FindAvailableIPs(ctx context.Context, privateNetworkID string) ([]*ipam.IP, error)
- func (c *Client) FindBackend(ctx context.Context, zone scw.Zone, lbID, name string) (*lb.Backend, error)
- func (c *Client) FindCluster(ctx context.Context, name string) (*k8s.Cluster, error)
- func (c *Client) FindFrontend(ctx context.Context, zone scw.Zone, lbID, name string) (*lb.Frontend, error)
- func (c *Client) FindGatewayIP(ctx context.Context, zone scw.Zone, ip string) (*vpcgw.IP, error)
- func (c *Client) FindGateways(ctx context.Context, tags []string) ([]*vpcgw.Gateway, error)
- func (c *Client) FindIPs(ctx context.Context, zone scw.Zone, tags []string) ([]*instance.IP, error)
- func (c *Client) FindImage(ctx context.Context, zone scw.Zone, name string) (*instance.Image, error)
- func (c *Client) FindInstanceVolume(ctx context.Context, zone scw.Zone, tags []string) (*instance.Volume, error)
- func (c *Client) FindLB(ctx context.Context, zone scw.Zone, tags []string) (*lb.LB, error)
- func (c *Client) FindLBACLByName(ctx context.Context, zone scw.Zone, frontendID, name string) (*lb.ACL, error)
- func (c *Client) FindLBIP(ctx context.Context, zone scw.Zone, ip string) (*lb.IP, error)
- func (c *Client) FindLBPrivateNetwork(ctx context.Context, zone scw.Zone, lbID, privateNetworkID string) (*lb.PrivateNetwork, error)
- func (c *Client) FindLBServersIPs(ctx context.Context, privateNetworkID string, lbIDs []string) ([]*ipam.IP, error)
- func (c *Client) FindLBs(ctx context.Context, tags []string) ([]*lb.LB, error)
- func (c *Client) FindPlacementGroup(ctx context.Context, zone scw.Zone, name string) (*instance.PlacementGroup, error)
- func (c *Client) FindPool(ctx context.Context, clusterID, name string) (*k8s.Pool, error)
- func (c *Client) FindPrivateNICIPs(ctx context.Context, privateNICID string) ([]*ipam.IP, error)
- func (c *Client) FindPrivateNetwork(ctx context.Context, tags []string, vpcID *string) (*vpc.PrivateNetwork, error)
- func (c *Client) FindSecurityGroup(ctx context.Context, zone scw.Zone, name string) (*instance.SecurityGroup, error)
- func (c *Client) FindServer(ctx context.Context, zone scw.Zone, tags []string) (*instance.Server, error)
- func (c *Client) FindVolume(ctx context.Context, zone scw.Zone, tags []string) (*block.Volume, error)
- func (c *Client) GetAllServerUserData(ctx context.Context, zone scw.Zone, serverID string) (map[string]io.Reader, error)
- func (c *Client) GetClusterKubeConfig(ctx context.Context, id string) (*k8s.Kubeconfig, error)
- func (c *Client) GetControlPlaneZones() []scw.Zone
- func (c *Client) GetLocalImageByLabel(ctx context.Context, zone scw.Zone, commercialType, imageLabel string, ...) (*marketplace.LocalImage, error)
- func (c *Client) GetPrivateNetwork(ctx context.Context, privateNetworkID string) (*vpc.PrivateNetwork, error)
- func (c *Client) GetSecretKey() string
- func (c *Client) GetZoneOrDefault(zone *string) (scw.Zone, error)
- func (c *Client) ListClusterACLRules(ctx context.Context, clusterID string) ([]*k8s.ACLRule, error)
- func (c *Client) ListDNSZoneRecords(ctx context.Context, zone, name string) ([]*domain.Record, error)
- func (c *Client) ListGatewayTypes(ctx context.Context, zone scw.Zone) ([]string, error)
- func (c *Client) ListLBACLs(ctx context.Context, zone scw.Zone, frontendID string) ([]*lb.ACL, error)
- func (c *Client) ListNodes(ctx context.Context, clusterID, poolID string) ([]*k8s.Node, error)
- func (c *Client) MigrateLB(ctx context.Context, zone scw.Zone, id string, newType string) (*lb.LB, error)
- func (c *Client) RemoveBackendServer(ctx context.Context, zone scw.Zone, backendID, ip string) error
- func (c *Client) ServerAction(ctx context.Context, zone scw.Zone, serverID string, ...) error
- func (c *Client) SetBackendServers(ctx context.Context, zone scw.Zone, backendID string, servers []string) (*lb.Backend, error)
- func (c *Client) SetClusterACLRules(ctx context.Context, clusterID string, rules []*k8s.ACLRuleRequest) error
- func (c *Client) SetClusterType(ctx context.Context, id, clusterType string) error
- func (c *Client) SetDNSZoneRecords(ctx context.Context, zone, name string, ips []string) error
- func (c *Client) SetLBACLs(ctx context.Context, zone scw.Zone, frontendID string, acls []*lb.ACLSpec) error
- func (c *Client) SetServerUserData(ctx context.Context, zone scw.Zone, serverID, key, content string) error
- func (c *Client) UpdateCluster(ctx context.Context, id string, ...) error
- func (c *Client) UpdateInstanceVolumeTags(ctx context.Context, zone scw.Zone, volumeID string, tags []string) error
- func (c *Client) UpdateLBACL(ctx context.Context, zone scw.Zone, aclID, name string, index int32, ...) error
- func (c *Client) UpdatePool(ctx context.Context, id string, autoscaling, autohealing *bool, ...) error
- func (c *Client) UpdateServerPublicIPs(ctx context.Context, zone scw.Zone, id string, publicIPIDs []string) (*instance.Server, error)
- func (c *Client) UpdateVolumeIOPS(ctx context.Context, zone scw.Zone, volumeID string, iops int64) error
- func (c *Client) UpdateVolumeTags(ctx context.Context, zone scw.Zone, volumeID string, tags []string) error
- func (c *Client) UpgradeCluster(ctx context.Context, id, version string) error
- func (c *Client) UpgradeGateway(ctx context.Context, zone scw.Zone, gatewayID, newType string) (*vpcgw.Gateway, error)
- func (c *Client) UpgradePool(ctx context.Context, id, version string) error
- type Config
- type Domain
- type DomainAPI
- type IPAM
- type IPAMAPI
- type Instance
- type InstanceAPI
- type Interface
- type K8s
- type K8sAPI
- type LB
- type LBAPI
- type Marketplace
- type MarketplaceAPI
- type VPC
- type VPCAPI
- type VPCGW
- type VPCGWAPI
- type Zones
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoItemFound is returned when trying to find a resource that does not exist. ErrNoItemFound = errors.New("no item found") // ErrTooManyItemsFound is returned when trying to find a resource but more than one are found. ErrTooManyItemsFound = errors.New("expected to find only one item") )
Functions ¶
func IsForbiddenError ¶
IsForbiddenError returns true if err is an HTTP 403 error.
func IsNotFoundError ¶
IsNotFoundError returns true if err is an HTTP 404 error or ErrNoItemFound.
func IsPreconditionFailedError ¶
IsPreconditionFailedError returns true if err is a PreconditionFailedError.
func TagsWithoutCreatedBy ¶ added in v0.1.3
TagsWithoutCreatedBy returns tags on a Scaleway resource, without the "created-by=..." tag that is automatically added by the client.
Types ¶
type Block ¶ added in v0.1.1
type Block interface {
UpdateVolumeIOPS(ctx context.Context, zone scw.Zone, volumeID string, iops int64) error
UpdateVolumeTags(ctx context.Context, zone scw.Zone, volumeID string, tags []string) error
FindVolume(ctx context.Context, zone scw.Zone, tags []string) (*block.Volume, error)
DeleteVolume(ctx context.Context, zone scw.Zone, volumeID string) error
}
type BlockAPI ¶ added in v0.1.1
type BlockAPI interface {
UpdateVolume(req *block.UpdateVolumeRequest, opts ...scw.RequestOption) (*block.Volume, error)
ListVolumes(req *block.ListVolumesRequest, opts ...scw.RequestOption) (*block.ListVolumesResponse, error)
DeleteVolume(req *block.DeleteVolumeRequest, opts ...scw.RequestOption) error
// contains filtered or unexported methods
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper over scaleway-sdk-go to access Scaleway Product APIs in a specific region and project.
func New ¶
New returns a new Scaleway client based on the provided region and secretData. The secret data must contain a default projectID and credentials.
func (*Client) AddBackendServer ¶
func (*Client) AttachLBPrivateNetwork ¶
func (*Client) CleanAvailableIPs ¶ added in v0.1.1
func (*Client) CreateBackend ¶
func (*Client) CreateCluster ¶ added in v0.1.3
func (c *Client) CreateCluster( ctx context.Context, name, clusterType, version string, pnID *string, tags, featureGates, admissionPlugins, apiServerCertSANs []string, cni k8s.CNI, autoscalerConfig *k8s.CreateClusterRequestAutoscalerConfig, autoUpgrade *k8s.CreateClusterRequestAutoUpgrade, openIDConnectConfig *k8s.CreateClusterRequestOpenIDConnectConfig, podCIDR, serviceCIDR scw.IPNet, ) (*k8s.Cluster, error)
func (*Client) CreateFrontend ¶
func (*Client) CreateGateway ¶
func (*Client) CreateGatewayNetwork ¶
func (*Client) CreateLBACL ¶
func (*Client) CreatePool ¶ added in v0.1.3
func (c *Client) CreatePool( ctx context.Context, zone scw.Zone, clusterID, name, nodeType string, placementGroupID, securityGroupID *string, autoscaling, autohealing, publicIPDisabled bool, size uint32, minSize, maxSize *uint32, tags []string, kubeletArgs map[string]string, rootVolumeType k8s.PoolVolumeType, rootVolumeSizeGB *uint64, upgradePolicy *k8s.CreatePoolRequestUpgradePolicy, ) (*k8s.Pool, error)
func (*Client) CreatePrivateNIC ¶
func (*Client) CreatePrivateNetwork ¶
func (*Client) CreateServer ¶
func (*Client) DefaultZone ¶
DefaultZone returns the first zone of the region.
func (*Client) DeleteCluster ¶ added in v0.1.3
func (*Client) DeleteDNSZoneRecords ¶
func (*Client) DeleteGateway ¶
func (*Client) DeleteInstanceVolume ¶
func (*Client) DeleteLBACL ¶
func (*Client) DeletePool ¶ added in v0.1.3
func (*Client) DeletePrivateNetwork ¶
func (*Client) DeleteServer ¶
func (*Client) DeleteServerUserData ¶
func (*Client) DeleteVolume ¶
func (*Client) DetachVolume ¶
func (*Client) FindAvailableIPs ¶ added in v0.1.1
func (*Client) FindBackend ¶
func (*Client) FindCluster ¶ added in v0.1.3
func (*Client) FindFrontend ¶
func (*Client) FindGatewayIP ¶
func (*Client) FindGateways ¶
func (*Client) FindImage ¶
func (c *Client) FindImage(ctx context.Context, zone scw.Zone, name string) (*instance.Image, error)
FindImage finds an existing Instance image by name. It returns ErrNoItemFound if no matching image is found.
func (*Client) FindInstanceVolume ¶
func (*Client) FindLBACLByName ¶
func (*Client) FindLBPrivateNetwork ¶
func (*Client) FindLBServersIPs ¶ added in v0.1.1
func (*Client) FindPlacementGroup ¶ added in v0.1.1
func (*Client) FindPrivateNICIPs ¶
func (*Client) FindPrivateNetwork ¶
func (c *Client) FindPrivateNetwork(ctx context.Context, tags []string, vpcID *string) (*vpc.PrivateNetwork, error)
FindPrivateNetwork finds an existing Private Network by tags. It returns ErrNoItemFound if no matching Private Network is found.
func (*Client) FindSecurityGroup ¶ added in v0.1.1
func (*Client) FindServer ¶
func (c *Client) FindServer(ctx context.Context, zone scw.Zone, tags []string) (*instance.Server, error)
FindServer finds an existing Instance server by tags. It returns ErrNoItemFound if no matching server is found.
func (*Client) FindVolume ¶
func (*Client) GetAllServerUserData ¶
func (*Client) GetClusterKubeConfig ¶ added in v0.1.3
func (*Client) GetControlPlaneZones ¶
GetControlPlaneZones returns the availables zone for the control plane machines.
func (*Client) GetLocalImageByLabel ¶
func (*Client) GetPrivateNetwork ¶ added in v0.1.1
func (*Client) GetSecretKey ¶ added in v0.1.3
func (*Client) GetZoneOrDefault ¶
GetZoneOrDefault dereferences and parses the provided zone, or returns the default zone.
func (*Client) ListClusterACLRules ¶ added in v0.1.3
func (*Client) ListDNSZoneRecords ¶
func (*Client) ListGatewayTypes ¶ added in v0.1.1
func (*Client) ListLBACLs ¶
func (*Client) RemoveBackendServer ¶
func (*Client) ServerAction ¶
func (*Client) SetBackendServers ¶
func (*Client) SetClusterACLRules ¶ added in v0.1.3
func (*Client) SetClusterType ¶ added in v0.1.3
func (*Client) SetDNSZoneRecords ¶
func (*Client) SetServerUserData ¶
func (*Client) UpdateCluster ¶ added in v0.1.3
func (c *Client) UpdateCluster( ctx context.Context, id string, tags, featureGates, admissionPlugins, apiServerCertSANs *[]string, autoscalerConfig *k8s.UpdateClusterRequestAutoscalerConfig, autoUpgrade *k8s.UpdateClusterRequestAutoUpgrade, openIDConnectConfig *k8s.UpdateClusterRequestOpenIDConnectConfig, ) error
func (*Client) UpdateInstanceVolumeTags ¶
func (*Client) UpdateLBACL ¶
func (*Client) UpdatePool ¶ added in v0.1.3
func (*Client) UpdateServerPublicIPs ¶ added in v0.1.1
func (*Client) UpdateVolumeIOPS ¶
func (*Client) UpdateVolumeTags ¶
func (*Client) UpgradeCluster ¶ added in v0.1.3
func (*Client) UpgradeGateway ¶ added in v0.1.1
type DomainAPI ¶ added in v0.1.1
type DomainAPI interface {
ListDNSZoneRecords(req *domain.ListDNSZoneRecordsRequest, opts ...scw.RequestOption) (*domain.ListDNSZoneRecordsResponse, error)
UpdateDNSZoneRecords(req *domain.UpdateDNSZoneRecordsRequest, opts ...scw.RequestOption) (*domain.UpdateDNSZoneRecordsResponse, error)
}
type IPAM ¶ added in v0.1.1
type IPAM interface {
FindPrivateNICIPs(ctx context.Context, privateNICID string) ([]*ipam.IP, error)
FindLBServersIPs(ctx context.Context, privateNetworkID string, lbIDs []string) ([]*ipam.IP, error)
FindAvailableIPs(ctx context.Context, privateNetworkID string) ([]*ipam.IP, error)
CleanAvailableIPs(ctx context.Context, privateNetworkID string) error
}
type IPAMAPI ¶ added in v0.1.1
type IPAMAPI interface {
ListIPs(req *ipam.ListIPsRequest, opts ...scw.RequestOption) (*ipam.ListIPsResponse, error)
ReleaseIPSet(req *ipam.ReleaseIPSetRequest, opts ...scw.RequestOption) error
}
type Instance ¶ added in v0.1.1
type Instance interface {
FindServer(ctx context.Context, zone scw.Zone, tags []string) (*instance.Server, error)
CreateServer(
ctx context.Context,
zone scw.Zone,
name, commercialType, imageID string,
placementGroupID, securityGroupID *string,
rootVolumeSize scw.Size,
rootVolumeType instance.VolumeVolumeType,
tags []string,
) (*instance.Server, error)
FindImage(ctx context.Context, zone scw.Zone, name string) (*instance.Image, error)
FindIPs(ctx context.Context, zone scw.Zone, tags []string) ([]*instance.IP, error)
CreateIP(ctx context.Context, zone scw.Zone, ipType instance.IPType, tags []string) (*instance.IP, error)
DeleteIP(ctx context.Context, zone scw.Zone, ipID string) error
CreatePrivateNIC(ctx context.Context, zone scw.Zone, serverID, privateNetworkID string) (*instance.PrivateNIC, error)
GetAllServerUserData(ctx context.Context, zone scw.Zone, serverID string) (map[string]io.Reader, error)
SetServerUserData(ctx context.Context, zone scw.Zone, serverID, key, content string) error
DeleteServerUserData(ctx context.Context, zone scw.Zone, serverID, key string) error
ServerAction(ctx context.Context, zone scw.Zone, serverID string, action instance.ServerAction) error
DetachVolume(ctx context.Context, zone scw.Zone, volumeID string) error
UpdateInstanceVolumeTags(ctx context.Context, zone scw.Zone, volumeID string, tags []string) error
FindInstanceVolume(ctx context.Context, zone scw.Zone, tags []string) (*instance.Volume, error)
DeleteInstanceVolume(ctx context.Context, zone scw.Zone, volumeID string) error
DeleteServer(ctx context.Context, zone scw.Zone, serverID string) error
FindPlacementGroup(ctx context.Context, zone scw.Zone, name string) (*instance.PlacementGroup, error)
FindSecurityGroup(ctx context.Context, zone scw.Zone, name string) (*instance.SecurityGroup, error)
UpdateServerPublicIPs(ctx context.Context, zone scw.Zone, id string, publicIPIDs []string) (*instance.Server, error)
}
type InstanceAPI ¶ added in v0.1.1
type InstanceAPI interface {
ListServers(req *instance.ListServersRequest, opts ...scw.RequestOption) (*instance.ListServersResponse, error)
GetServerType(req *instance.GetServerTypeRequest) (*instance.ServerType, error)
CreateServer(req *instance.CreateServerRequest, opts ...scw.RequestOption) (*instance.CreateServerResponse, error)
ListImages(req *instance.ListImagesRequest, opts ...scw.RequestOption) (*instance.ListImagesResponse, error)
ListIPs(req *instance.ListIPsRequest, opts ...scw.RequestOption) (*instance.ListIPsResponse, error)
CreateIP(req *instance.CreateIPRequest, opts ...scw.RequestOption) (*instance.CreateIPResponse, error)
DeleteIP(req *instance.DeleteIPRequest, opts ...scw.RequestOption) error
CreatePrivateNIC(req *instance.CreatePrivateNICRequest, opts ...scw.RequestOption) (*instance.CreatePrivateNICResponse, error)
GetAllServerUserData(req *instance.GetAllServerUserDataRequest, opts ...scw.RequestOption) (*instance.GetAllServerUserDataResponse, error)
SetServerUserData(req *instance.SetServerUserDataRequest, opts ...scw.RequestOption) error
DeleteServerUserData(req *instance.DeleteServerUserDataRequest, opts ...scw.RequestOption) error
ServerAction(req *instance.ServerActionRequest, opts ...scw.RequestOption) (*instance.ServerActionResponse, error)
DetachVolume(req *instance.DetachVolumeRequest, opts ...scw.RequestOption) (*instance.DetachVolumeResponse, error)
UpdateVolume(req *instance.UpdateVolumeRequest, opts ...scw.RequestOption) (*instance.UpdateVolumeResponse, error)
ListVolumes(req *instance.ListVolumesRequest, opts ...scw.RequestOption) (*instance.ListVolumesResponse, error)
DeleteVolume(req *instance.DeleteVolumeRequest, opts ...scw.RequestOption) error
DeleteServer(req *instance.DeleteServerRequest, opts ...scw.RequestOption) error
ListPlacementGroups(req *instance.ListPlacementGroupsRequest, opts ...scw.RequestOption) (*instance.ListPlacementGroupsResponse, error)
ListSecurityGroups(req *instance.ListSecurityGroupsRequest, opts ...scw.RequestOption) (*instance.ListSecurityGroupsResponse, error)
UpdateServer(req *instance.UpdateServerRequest, opts ...scw.RequestOption) (*instance.UpdateServerResponse, error)
// contains filtered or unexported methods
}
type Interface ¶ added in v0.1.1
Interface of the scaleway-sdk-go wrapper to access Scaleway Product APIs in a specific region and project.
type K8s ¶ added in v0.1.3
type K8s interface {
FindCluster(ctx context.Context, name string) (*k8s.Cluster, error)
CreateCluster(
ctx context.Context,
name, clusterType, version string,
pnID *string,
tags, featureGates, admissionPlugins, apiServerCertSANs []string,
cni k8s.CNI,
autoscalerConfig *k8s.CreateClusterRequestAutoscalerConfig,
autoUpgrade *k8s.CreateClusterRequestAutoUpgrade,
openIDConnectConfig *k8s.CreateClusterRequestOpenIDConnectConfig,
podCIDR, serviceCIDR scw.IPNet,
) (*k8s.Cluster, error)
DeleteCluster(ctx context.Context, id string, withAdditionalResources bool) error
GetClusterKubeConfig(ctx context.Context, id string) (*k8s.Kubeconfig, error)
UpdateCluster(
ctx context.Context,
id string,
tags, featureGates, admissionPlugins, apiServerCertSANs *[]string,
autoscalerConfig *k8s.UpdateClusterRequestAutoscalerConfig,
autoUpgrade *k8s.UpdateClusterRequestAutoUpgrade,
openIDConnectConfig *k8s.UpdateClusterRequestOpenIDConnectConfig,
) error
UpgradeCluster(ctx context.Context, id, version string) error
SetClusterType(ctx context.Context, id, clusterType string) error
FindPool(ctx context.Context, clusterID, name string) (*k8s.Pool, error)
CreatePool(
ctx context.Context,
zone scw.Zone,
clusterID, name, nodeType string,
placementGroupID, securityGroupID *string,
autoscaling, autohealing, publicIPDisabled bool,
size uint32,
minSize, maxSize *uint32,
tags []string,
kubeletArgs map[string]string,
rootVolumeType k8s.PoolVolumeType,
rootVolumeSizeGB *uint64,
upgradePolicy *k8s.CreatePoolRequestUpgradePolicy,
) (*k8s.Pool, error)
UpdatePool(
ctx context.Context,
id string,
autoscaling, autohealing *bool,
size, minSize, maxSize *uint32,
tags *[]string,
kubeletArgs *map[string]string,
upgradePolicy *k8s.UpdatePoolRequestUpgradePolicy,
) error
UpgradePool(ctx context.Context, id, version string) error
DeletePool(ctx context.Context, id string) error
ListNodes(ctx context.Context, clusterID, poolID string) ([]*k8s.Node, error)
ListClusterACLRules(ctx context.Context, clusterID string) ([]*k8s.ACLRule, error)
SetClusterACLRules(ctx context.Context, clusterID string, rules []*k8s.ACLRuleRequest) error
}
type K8sAPI ¶ added in v0.1.3
type K8sAPI interface {
ListClusters(req *k8s.ListClustersRequest, opts ...scw.RequestOption) (*k8s.ListClustersResponse, error)
CreateCluster(req *k8s.CreateClusterRequest, opts ...scw.RequestOption) (*k8s.Cluster, error)
DeleteCluster(req *k8s.DeleteClusterRequest, opts ...scw.RequestOption) (*k8s.Cluster, error)
GetClusterKubeConfig(req *k8s.GetClusterKubeConfigRequest, opts ...scw.RequestOption) (*k8s.Kubeconfig, error)
UpdateCluster(req *k8s.UpdateClusterRequest, opts ...scw.RequestOption) (*k8s.Cluster, error)
UpgradeCluster(req *k8s.UpgradeClusterRequest, opts ...scw.RequestOption) (*k8s.Cluster, error)
SetClusterType(req *k8s.SetClusterTypeRequest, opts ...scw.RequestOption) (*k8s.Cluster, error)
ListPools(req *k8s.ListPoolsRequest, opts ...scw.RequestOption) (*k8s.ListPoolsResponse, error)
CreatePool(req *k8s.CreatePoolRequest, opts ...scw.RequestOption) (*k8s.Pool, error)
UpdatePool(req *k8s.UpdatePoolRequest, opts ...scw.RequestOption) (*k8s.Pool, error)
UpgradePool(req *k8s.UpgradePoolRequest, opts ...scw.RequestOption) (*k8s.Pool, error)
DeletePool(req *k8s.DeletePoolRequest, opts ...scw.RequestOption) (*k8s.Pool, error)
ListNodes(req *k8s.ListNodesRequest, opts ...scw.RequestOption) (*k8s.ListNodesResponse, error)
ListClusterACLRules(req *k8s.ListClusterACLRulesRequest, opts ...scw.RequestOption) (*k8s.ListClusterACLRulesResponse, error)
SetClusterACLRules(req *k8s.SetClusterACLRulesRequest, opts ...scw.RequestOption) (*k8s.SetClusterACLRulesResponse, error)
}
type LB ¶ added in v0.1.1
type LB interface {
FindLB(ctx context.Context, zone scw.Zone, tags []string) (*lb.LB, error)
MigrateLB(ctx context.Context, zone scw.Zone, id string, newType string) (*lb.LB, error)
FindLBIP(ctx context.Context, zone scw.Zone, ip string) (*lb.IP, error)
CreateLB(
ctx context.Context,
zone scw.Zone,
name, lbType string,
ipID *string,
private bool,
tags []string,
) (*lb.LB, error)
DeleteLB(ctx context.Context, zone scw.Zone, id string, releaseIP bool) error
FindLBs(ctx context.Context, tags []string) ([]*lb.LB, error)
FindBackend(ctx context.Context, zone scw.Zone, lbID, name string) (*lb.Backend, error)
CreateBackend(
ctx context.Context,
zone scw.Zone,
lbID,
name string,
servers []string,
port int32,
) (*lb.Backend, error)
SetBackendServers(
ctx context.Context,
zone scw.Zone,
backendID string,
servers []string,
) (*lb.Backend, error)
FindFrontend(ctx context.Context, zone scw.Zone, lbID, name string) (*lb.Frontend, error)
CreateFrontend(
ctx context.Context,
zone scw.Zone,
lbID, name, backendID string,
port int32,
) (*lb.Frontend, error)
FindLBPrivateNetwork(
ctx context.Context,
zone scw.Zone,
lbID, privateNetworkID string,
) (*lb.PrivateNetwork, error)
AttachLBPrivateNetwork(ctx context.Context, zone scw.Zone, lbID, privateNetworkID string, ipID *string) error
ListLBACLs(ctx context.Context, zone scw.Zone, frontendID string) ([]*lb.ACL, error)
SetLBACLs(ctx context.Context, zone scw.Zone, frontendID string, acls []*lb.ACLSpec) error
FindLBACLByName(ctx context.Context, zone scw.Zone, frontendID string, name string) (*lb.ACL, error)
DeleteLBACL(ctx context.Context, zone scw.Zone, aclID string) error
CreateLBACL(
ctx context.Context,
zone scw.Zone,
frontendID, name string,
index int32,
action lb.ACLActionType,
matchedSubnets []string,
) error
UpdateLBACL(
ctx context.Context,
zone scw.Zone,
aclID, name string,
index int32,
action lb.ACLActionType,
matchedSubnets []string,
) error
RemoveBackendServer(ctx context.Context, zone scw.Zone, backendID, ip string) error
AddBackendServer(ctx context.Context, zone scw.Zone, backendID, ip string) error
}
type LBAPI ¶ added in v0.1.1
type LBAPI interface {
ListLBs(req *lb.ZonedAPIListLBsRequest, opts ...scw.RequestOption) (*lb.ListLBsResponse, error)
MigrateLB(req *lb.ZonedAPIMigrateLBRequest, opts ...scw.RequestOption) (*lb.LB, error)
ListIPs(req *lb.ZonedAPIListIPsRequest, opts ...scw.RequestOption) (*lb.ListIPsResponse, error)
CreateLB(req *lb.ZonedAPICreateLBRequest, opts ...scw.RequestOption) (*lb.LB, error)
DeleteLB(req *lb.ZonedAPIDeleteLBRequest, opts ...scw.RequestOption) error
ListBackends(req *lb.ZonedAPIListBackendsRequest, opts ...scw.RequestOption) (*lb.ListBackendsResponse, error)
CreateBackend(req *lb.ZonedAPICreateBackendRequest, opts ...scw.RequestOption) (*lb.Backend, error)
SetBackendServers(req *lb.ZonedAPISetBackendServersRequest, opts ...scw.RequestOption) (*lb.Backend, error)
ListFrontends(req *lb.ZonedAPIListFrontendsRequest, opts ...scw.RequestOption) (*lb.ListFrontendsResponse, error)
CreateFrontend(req *lb.ZonedAPICreateFrontendRequest, opts ...scw.RequestOption) (*lb.Frontend, error)
ListLBPrivateNetworks(req *lb.ZonedAPIListLBPrivateNetworksRequest, opts ...scw.RequestOption) (*lb.ListLBPrivateNetworksResponse, error)
AttachPrivateNetwork(req *lb.ZonedAPIAttachPrivateNetworkRequest, opts ...scw.RequestOption) (*lb.PrivateNetwork, error)
ListACLs(req *lb.ZonedAPIListACLsRequest, opts ...scw.RequestOption) (*lb.ListACLResponse, error)
SetACLs(req *lb.ZonedAPISetACLsRequest, opts ...scw.RequestOption) (*lb.SetACLsResponse, error)
DeleteACL(req *lb.ZonedAPIDeleteACLRequest, opts ...scw.RequestOption) error
CreateACL(req *lb.ZonedAPICreateACLRequest, opts ...scw.RequestOption) (*lb.ACL, error)
UpdateACL(req *lb.ZonedAPIUpdateACLRequest, opts ...scw.RequestOption) (*lb.ACL, error)
RemoveBackendServers(req *lb.ZonedAPIRemoveBackendServersRequest, opts ...scw.RequestOption) (*lb.Backend, error)
AddBackendServers(req *lb.ZonedAPIAddBackendServersRequest, opts ...scw.RequestOption) (*lb.Backend, error)
// contains filtered or unexported methods
}
type Marketplace ¶ added in v0.1.1
type MarketplaceAPI ¶ added in v0.1.1
type MarketplaceAPI interface {
GetLocalImageByLabel(req *marketplace.GetLocalImageByLabelRequest, opts ...scw.RequestOption) (*marketplace.LocalImage, error)
}
type VPC ¶ added in v0.1.1
type VPC interface {
FindPrivateNetwork(ctx context.Context, tags []string, vpcID *string) (*vpc.PrivateNetwork, error)
DeletePrivateNetwork(ctx context.Context, id string) error
CreatePrivateNetwork(
ctx context.Context,
name string,
vpcID, subnet *string,
tags []string,
) (*vpc.PrivateNetwork, error)
GetPrivateNetwork(ctx context.Context, privateNetworkID string) (*vpc.PrivateNetwork, error)
}
type VPCAPI ¶ added in v0.1.1
type VPCAPI interface {
ListPrivateNetworks(req *vpc.ListPrivateNetworksRequest, opts ...scw.RequestOption) (*vpc.ListPrivateNetworksResponse, error)
DeletePrivateNetwork(req *vpc.DeletePrivateNetworkRequest, opts ...scw.RequestOption) error
CreatePrivateNetwork(req *vpc.CreatePrivateNetworkRequest, opts ...scw.RequestOption) (*vpc.PrivateNetwork, error)
GetPrivateNetwork(req *vpc.GetPrivateNetworkRequest, opts ...scw.RequestOption) (*vpc.PrivateNetwork, error)
}
type VPCGW ¶ added in v0.1.1
type VPCGW interface {
FindGateways(ctx context.Context, tags []string) ([]*vpcgw.Gateway, error)
DeleteGateway(ctx context.Context, zone scw.Zone, id string, deleteIP bool) error
FindGatewayIP(ctx context.Context, zone scw.Zone, ip string) (*vpcgw.IP, error)
CreateGateway(
ctx context.Context,
zone scw.Zone,
name, gwType string,
tags []string,
ipID *string,
) (*vpcgw.Gateway, error)
CreateGatewayNetwork(ctx context.Context, zone scw.Zone, gatewayID, privateNetworkID string) error
ListGatewayTypes(ctx context.Context, zone scw.Zone) ([]string, error)
UpgradeGateway(ctx context.Context, zone scw.Zone, gatewayID, newType string) (*vpcgw.Gateway, error)
}
type VPCGWAPI ¶ added in v0.1.1
type VPCGWAPI interface {
ListGateways(req *vpcgw.ListGatewaysRequest, opts ...scw.RequestOption) (*vpcgw.ListGatewaysResponse, error)
DeleteGateway(req *vpcgw.DeleteGatewayRequest, opts ...scw.RequestOption) (*vpcgw.Gateway, error)
ListIPs(req *vpcgw.ListIPsRequest, opts ...scw.RequestOption) (*vpcgw.ListIPsResponse, error)
CreateGateway(req *vpcgw.CreateGatewayRequest, opts ...scw.RequestOption) (*vpcgw.Gateway, error)
CreateGatewayNetwork(req *vpcgw.CreateGatewayNetworkRequest, opts ...scw.RequestOption) (*vpcgw.GatewayNetwork, error)
ListGatewayTypes(req *vpcgw.ListGatewayTypesRequest, opts ...scw.RequestOption) (*vpcgw.ListGatewayTypesResponse, error)
UpgradeGateway(req *vpcgw.UpgradeGatewayRequest, opts ...scw.RequestOption) (*vpcgw.Gateway, error)
// contains filtered or unexported methods
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mock_client is a generated GoMock package.
|
Package mock_client is a generated GoMock package. |