Documentation ¶
Overview ¶
Package k8s provides methods and message types of the k8s v1 API.
Index ¶
- Constants
- type API
- func (s *API) CreateCluster(req *CreateClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
- func (s *API) CreateExternalNode(req *CreateExternalNodeRequest, opts ...scw.RequestOption) (*ExternalNode, error)
- func (s *API) CreatePool(req *CreatePoolRequest, opts ...scw.RequestOption) (*Pool, error)
- func (s *API) DeleteCluster(req *DeleteClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
- func (s *API) DeleteNode(req *DeleteNodeRequest, opts ...scw.RequestOption) (*Node, error)
- func (s *API) DeletePool(req *DeletePoolRequest, opts ...scw.RequestOption) (*Pool, error)
- func (s *API) GetCluster(req *GetClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
- func (s *API) GetClusterKubeConfig(req *GetClusterKubeConfigRequest, opts ...scw.RequestOption) (*Kubeconfig, error)
- func (s *API) GetNode(req *GetNodeRequest, opts ...scw.RequestOption) (*Node, error)
- func (s *API) GetPool(req *GetPoolRequest, opts ...scw.RequestOption) (*Pool, error)
- func (s *API) GetVersion(req *GetVersionRequest, opts ...scw.RequestOption) (*Version, error)
- func (s *API) ListClusterAvailableVersions(req *ListClusterAvailableVersionsRequest, opts ...scw.RequestOption) (*ListClusterAvailableVersionsResponse, error)
- func (s *API) ListClusters(req *ListClustersRequest, opts ...scw.RequestOption) (*ListClustersResponse, error)
- func (s *API) ListNodes(req *ListNodesRequest, opts ...scw.RequestOption) (*ListNodesResponse, error)
- func (s *API) ListPools(req *ListPoolsRequest, opts ...scw.RequestOption) (*ListPoolsResponse, error)
- func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) (*ListVersionsResponse, error)
- func (s *API) RebootNode(req *RebootNodeRequest, opts ...scw.RequestOption) (*Node, error)
- func (s *API) Regions() []scw.Region
- func (s *API) ReplaceNode(req *ReplaceNodeRequest, opts ...scw.RequestOption) (*Node, error)deprecated
- func (s *API) ResetClusterAdminToken(req *ResetClusterAdminTokenRequest, opts ...scw.RequestOption) error
- func (s *API) SetClusterType(req *SetClusterTypeRequest, opts ...scw.RequestOption) (*Cluster, error)
- func (s *API) UpdateCluster(req *UpdateClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
- func (s *API) UpdatePool(req *UpdatePoolRequest, opts ...scw.RequestOption) (*Pool, error)
- func (s *API) UpgradeCluster(req *UpgradeClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
- func (s *API) UpgradePool(req *UpgradePoolRequest, opts ...scw.RequestOption) (*Pool, error)
- func (s *API) WaitForCluster(req *WaitForClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
- func (s *API) WaitForClusterPool(req *WaitForClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
- func (s *API) WaitForNode(req *WaitForNodeRequest, opts ...scw.RequestOption) (*Node, error)
- func (s *API) WaitForPool(req *WaitForPoolRequest, opts ...scw.RequestOption) (*Pool, error)
- type AutoscalerEstimator
- type AutoscalerExpander
- type CNI
- type Cluster
- type ClusterAutoUpgrade
- type ClusterAutoscalerConfig
- type ClusterOpenIDConnectConfig
- type ClusterStatus
- type CreateClusterRequest
- type CreateClusterRequestAutoUpgrade
- type CreateClusterRequestAutoscalerConfig
- type CreateClusterRequestOpenIDConnectConfig
- type CreateClusterRequestPoolConfig
- type CreateClusterRequestPoolConfigUpgradePolicy
- type CreateExternalNodeRequest
- type CreatePoolRequest
- type CreatePoolRequestUpgradePolicy
- type DeleteClusterRequest
- type DeleteNodeRequest
- type DeletePoolRequest
- type ExternalNode
- type GetClusterKubeConfigRequest
- type GetClusterRequest
- type GetNodeRequest
- type GetPoolRequest
- type GetVersionRequest
- type Ingress
- type Kubeconfig
- type KubeconfigCluster
- type KubeconfigClusterWithName
- type KubeconfigContext
- type KubeconfigContextWithName
- type KubeconfigUser
- type KubeconfigUserWithName
- type ListClusterAvailableVersionsRequest
- type ListClusterAvailableVersionsResponse
- type ListClustersRequest
- type ListClustersRequestOrderBy
- type ListClustersResponse
- type ListNodesRequest
- type ListNodesRequestOrderBy
- type ListNodesResponse
- type ListPoolsRequest
- type ListPoolsRequestOrderBy
- type ListPoolsResponse
- type ListVersionsRequest
- type ListVersionsResponse
- type MaintenanceWindow
- type MaintenanceWindowDayOfTheWeek
- type Node
- type NodeStatus
- type Pool
- type PoolStatus
- type PoolUpgradePolicy
- type PoolVolumeType
- type RebootNodeRequest
- type ReplaceNodeRequest
- type ResetClusterAdminTokenRequest
- type Runtime
- type SetClusterTypeRequest
- type UpdateClusterRequest
- type UpdateClusterRequestAutoUpgrade
- type UpdateClusterRequestAutoscalerConfig
- type UpdateClusterRequestOpenIDConnectConfig
- type UpdatePoolRequest
- type UpdatePoolRequestUpgradePolicy
- type UpgradeClusterRequest
- type UpgradePoolRequest
- type Version
- type WaitForClusterPoolRequest
- type WaitForClusterRequest
- type WaitForNodeRequest
- type WaitForPoolRequest
Constants ¶
const ( AutoscalerEstimatorUnknownEstimator = AutoscalerEstimator("unknown_estimator") AutoscalerEstimatorBinpacking = AutoscalerEstimator("binpacking") )
const ( AutoscalerExpanderUnknownExpander = AutoscalerExpander("unknown_expander") AutoscalerExpanderRandom = AutoscalerExpander("random") AutoscalerExpanderMostPods = AutoscalerExpander("most_pods") AutoscalerExpanderLeastWaste = AutoscalerExpander("least_waste") AutoscalerExpanderPriority = AutoscalerExpander("priority") AutoscalerExpanderPrice = AutoscalerExpander("price") )
const ( CNIUnknownCni = CNI("unknown_cni") CNICilium = CNI("cilium") CNICalico = CNI("calico") CNIWeave = CNI("weave") CNIFlannel = CNI("flannel") CNIKilo = CNI("kilo") )
const ( ClusterStatusUnknown = ClusterStatus("unknown") ClusterStatusCreating = ClusterStatus("creating") ClusterStatusReady = ClusterStatus("ready") ClusterStatusDeleting = ClusterStatus("deleting") ClusterStatusDeleted = ClusterStatus("deleted") ClusterStatusUpdating = ClusterStatus("updating") ClusterStatusLocked = ClusterStatus("locked") ClusterStatusPoolRequired = ClusterStatus("pool_required") )
const ( IngressUnknownIngress = Ingress("unknown_ingress") IngressNone = Ingress("none") IngressNginx = Ingress("nginx") IngressTraefik = Ingress("traefik") IngressTraefik2 = Ingress("traefik2") )
const ( ListClustersRequestOrderByCreatedAtAsc = ListClustersRequestOrderBy("created_at_asc") ListClustersRequestOrderByCreatedAtDesc = ListClustersRequestOrderBy("created_at_desc") ListClustersRequestOrderByUpdatedAtAsc = ListClustersRequestOrderBy("updated_at_asc") ListClustersRequestOrderByUpdatedAtDesc = ListClustersRequestOrderBy("updated_at_desc") ListClustersRequestOrderByNameAsc = ListClustersRequestOrderBy("name_asc") ListClustersRequestOrderByNameDesc = ListClustersRequestOrderBy("name_desc") ListClustersRequestOrderByStatusAsc = ListClustersRequestOrderBy("status_asc") ListClustersRequestOrderByStatusDesc = ListClustersRequestOrderBy("status_desc") ListClustersRequestOrderByVersionAsc = ListClustersRequestOrderBy("version_asc") ListClustersRequestOrderByVersionDesc = ListClustersRequestOrderBy("version_desc") )
const ( ListNodesRequestOrderByCreatedAtAsc = ListNodesRequestOrderBy("created_at_asc") ListNodesRequestOrderByCreatedAtDesc = ListNodesRequestOrderBy("created_at_desc") )
const ( ListPoolsRequestOrderByCreatedAtAsc = ListPoolsRequestOrderBy("created_at_asc") ListPoolsRequestOrderByCreatedAtDesc = ListPoolsRequestOrderBy("created_at_desc") ListPoolsRequestOrderByUpdatedAtAsc = ListPoolsRequestOrderBy("updated_at_asc") ListPoolsRequestOrderByUpdatedAtDesc = ListPoolsRequestOrderBy("updated_at_desc") ListPoolsRequestOrderByNameAsc = ListPoolsRequestOrderBy("name_asc") ListPoolsRequestOrderByNameDesc = ListPoolsRequestOrderBy("name_desc") ListPoolsRequestOrderByStatusAsc = ListPoolsRequestOrderBy("status_asc") ListPoolsRequestOrderByStatusDesc = ListPoolsRequestOrderBy("status_desc") ListPoolsRequestOrderByVersionAsc = ListPoolsRequestOrderBy("version_asc") ListPoolsRequestOrderByVersionDesc = ListPoolsRequestOrderBy("version_desc") )
const ( MaintenanceWindowDayOfTheWeekAny = MaintenanceWindowDayOfTheWeek("any") MaintenanceWindowDayOfTheWeekMonday = MaintenanceWindowDayOfTheWeek("monday") MaintenanceWindowDayOfTheWeekTuesday = MaintenanceWindowDayOfTheWeek("tuesday") MaintenanceWindowDayOfTheWeekWednesday = MaintenanceWindowDayOfTheWeek("wednesday") MaintenanceWindowDayOfTheWeekThursday = MaintenanceWindowDayOfTheWeek("thursday") MaintenanceWindowDayOfTheWeekFriday = MaintenanceWindowDayOfTheWeek("friday") MaintenanceWindowDayOfTheWeekSaturday = MaintenanceWindowDayOfTheWeek("saturday") MaintenanceWindowDayOfTheWeekSunday = MaintenanceWindowDayOfTheWeek("sunday") )
const ( NodeStatusUnknown = NodeStatus("unknown") NodeStatusCreating = NodeStatus("creating") NodeStatusNotReady = NodeStatus("not_ready") NodeStatusReady = NodeStatus("ready") NodeStatusDeleting = NodeStatus("deleting") NodeStatusDeleted = NodeStatus("deleted") NodeStatusLocked = NodeStatus("locked") NodeStatusRebooting = NodeStatus("rebooting") NodeStatusCreationError = NodeStatus("creation_error") NodeStatusUpgrading = NodeStatus("upgrading") NodeStatusStarting = NodeStatus("starting") NodeStatusRegistering = NodeStatus("registering") )
const ( PoolStatusUnknown = PoolStatus("unknown") PoolStatusReady = PoolStatus("ready") PoolStatusDeleting = PoolStatus("deleting") PoolStatusDeleted = PoolStatus("deleted") PoolStatusScaling = PoolStatus("scaling") PoolStatusWarning = PoolStatus("warning") PoolStatusLocked = PoolStatus("locked") PoolStatusUpgrading = PoolStatus("upgrading") )
const ( PoolVolumeTypeDefaultVolumeType = PoolVolumeType("default_volume_type") PoolVolumeTypeLSSD = PoolVolumeType("l_ssd") PoolVolumeTypeBSSD = PoolVolumeType("b_ssd") )
const ( RuntimeUnknownRuntime = Runtime("unknown_runtime") RuntimeDocker = Runtime("docker") RuntimeContainerd = Runtime("containerd") RuntimeCrio = Runtime("crio") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: kapsule API.
func (*API) CreateCluster ¶
func (s *API) CreateCluster(req *CreateClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
CreateCluster: create a new cluster. Create a new Kubernetes cluster on a Scaleway account.
func (*API) CreateExternalNode ¶
func (s *API) CreateExternalNode(req *CreateExternalNodeRequest, opts ...scw.RequestOption) (*ExternalNode, error)
CreateExternalNode: create a Kosmos node. Get metadata about a Kosmos node. This method is not intended to be directly called by end users, only by the kapsule-node-agent.
func (*API) CreatePool ¶
func (s *API) CreatePool(req *CreatePoolRequest, opts ...scw.RequestOption) (*Pool, error)
CreatePool: create a new pool in a cluster. Create a new pool in a specific Kubernetes cluster.
func (*API) DeleteCluster ¶
func (s *API) DeleteCluster(req *DeleteClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
DeleteCluster: delete a cluster. Delete a specific cluster and all its associated pools and nodes. Note that this method will not delete any Load Balancers or Block Volumes that are associated with the cluster.
func (*API) DeleteNode ¶
func (s *API) DeleteNode(req *DeleteNodeRequest, opts ...scw.RequestOption) (*Node, error)
DeleteNode: delete a node in a cluster. Delete a specific node. Note that when there is not enough space to reschedule all the pods (in a one-node cluster for instance), you may experience some disruption of your applications.
func (*API) DeletePool ¶
func (s *API) DeletePool(req *DeletePoolRequest, opts ...scw.RequestOption) (*Pool, error)
DeletePool: delete a pool in a cluster. Delete a specific pool from a cluster. All of the pool's nodes will also be deleted.
func (*API) GetCluster ¶
func (s *API) GetCluster(req *GetClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
GetCluster: get specific cluster information. Get details about a specific Kubernetes cluster.
func (*API) GetClusterKubeConfig ¶
func (s *API) GetClusterKubeConfig(req *GetClusterKubeConfigRequest, opts ...scw.RequestOption) (*Kubeconfig, error)
GetClusterKubeConfig downloads the kubeconfig for the given cluster
func (*API) GetNode ¶
func (s *API) GetNode(req *GetNodeRequest, opts ...scw.RequestOption) (*Node, error)
GetNode: get a node in a cluster. Get details about a specific Kubernetes node.
func (*API) GetPool ¶
func (s *API) GetPool(req *GetPoolRequest, opts ...scw.RequestOption) (*Pool, error)
GetPool: get a pool in a cluster. Get details about a specific pool in a Kubernetes cluster.
func (*API) GetVersion ¶
func (s *API) GetVersion(req *GetVersionRequest, opts ...scw.RequestOption) (*Version, error)
GetVersion: get details about a specific version. Get a specific Kubernetes version and the details about the version.
func (*API) ListClusterAvailableVersions ¶
func (s *API) ListClusterAvailableVersions(req *ListClusterAvailableVersionsRequest, opts ...scw.RequestOption) (*ListClusterAvailableVersionsResponse, error)
ListClusterAvailableVersions: list available versions for a cluster. List the versions that a specific Kubernetes cluster is allowed to upgrade to. Results will comprise every patch version greater than the current patch, as well as one minor version ahead of the current version. Any upgrade skipping a minor version will not work.
func (*API) ListClusters ¶
func (s *API) ListClusters(req *ListClustersRequest, opts ...scw.RequestOption) (*ListClustersResponse, error)
ListClusters: list all clusters. List all the existing Kubernetes clusters in a specific Region.
func (*API) ListNodes ¶
func (s *API) ListNodes(req *ListNodesRequest, opts ...scw.RequestOption) (*ListNodesResponse, error)
ListNodes: list all the nodes in a cluster. List all the existing nodes for a specific Kubernetes cluster.
func (*API) ListPools ¶
func (s *API) ListPools(req *ListPoolsRequest, opts ...scw.RequestOption) (*ListPoolsResponse, error)
ListPools: list all the pools in a cluster. List all the existing pools for a specific Kubernetes cluster.
func (*API) ListVersions ¶
func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) (*ListVersionsResponse, error)
ListVersions: list all available versions. List all available versions for the creation of a new Kubernetes cluster.
func (*API) RebootNode ¶
func (s *API) RebootNode(req *RebootNodeRequest, opts ...scw.RequestOption) (*Node, error)
RebootNode: reboot a node in a cluster. Reboot a specific node. This node will first be cordoned, meaning that scheduling will be disabled. Then the existing pods on the node will be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (in a one-node cluster, for instance), you may experience some disruption of your applications.
func (*API) ReplaceNode
deprecated
func (s *API) ReplaceNode(req *ReplaceNodeRequest, opts ...scw.RequestOption) (*Node, error)
Deprecated: ReplaceNode: replace a node in a cluster. Replace a specific node. The node will be set cordoned, meaning that scheduling will be disabled. Then the existing pods on the node will be drained and reschedule onto another schedulable node. Then the node will be deleted, and a new one will be created after the deletion. Note that when there is not enough space to reschedule all the pods (in a one node cluster for instance), you may experience some disruption of your applications.
func (*API) ResetClusterAdminToken ¶
func (s *API) ResetClusterAdminToken(req *ResetClusterAdminTokenRequest, opts ...scw.RequestOption) error
ResetClusterAdminToken: reset the admin token of a cluster. Reset the admin token for a specific Kubernetes cluster. This will invalidate the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to redownload kubeconfig in order to keep interacting with the cluster.
func (*API) SetClusterType ¶
func (s *API) SetClusterType(req *SetClusterTypeRequest, opts ...scw.RequestOption) (*Cluster, error)
SetClusterType: change type of a cluster. Change type of a specific Kubernetes cluster.
func (*API) UpdateCluster ¶
func (s *API) UpdateCluster(req *UpdateClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
UpdateCluster: update a cluster. Update a specific Kubernetes cluster. Note that this method is designed to update details such as name, description, tags and configuration. However, you cannot upgrade a cluster with this method. To do so, use the dedicated endpoint.
func (*API) UpdatePool ¶
func (s *API) UpdatePool(req *UpdatePoolRequest, opts ...scw.RequestOption) (*Pool, error)
UpdatePool: update a pool in a cluster. Update attributes of a specific pool, such as size, autoscaling settings, and tags.
func (*API) UpgradeCluster ¶
func (s *API) UpgradeCluster(req *UpgradeClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
UpgradeCluster: upgrade a cluster. Upgrade a specific Kubernetes cluster and/or its associated pools to a specific and supported Kubernetes version.
func (*API) UpgradePool ¶
func (s *API) UpgradePool(req *UpgradePoolRequest, opts ...scw.RequestOption) (*Pool, error)
UpgradePool: upgrade a pool in a cluster. Upgrade the Kubernetes version of a specific pool. Note that this will work when the targeted version is the same than the version of the cluster.
func (*API) WaitForCluster ¶
func (s *API) WaitForCluster(req *WaitForClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
WaitForCluster waits for the cluster to be in a "terminal state" before returning.
func (*API) WaitForClusterPool ¶
func (s *API) WaitForClusterPool(req *WaitForClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
WaitForClusterPool waits for the pool associated with a cluster to be in a "terminal state" before returning.
func (*API) WaitForNode ¶
func (s *API) WaitForNode(req *WaitForNodeRequest, opts ...scw.RequestOption) (*Node, error)
WaitForNode waits for a Node to be ready
func (*API) WaitForPool ¶
func (s *API) WaitForPool(req *WaitForPoolRequest, opts ...scw.RequestOption) (*Pool, error)
WaitForPool waits for a pool to be ready
type AutoscalerEstimator ¶
type AutoscalerEstimator string
func (AutoscalerEstimator) MarshalJSON ¶
func (enum AutoscalerEstimator) MarshalJSON() ([]byte, error)
func (AutoscalerEstimator) String ¶
func (enum AutoscalerEstimator) String() string
func (*AutoscalerEstimator) UnmarshalJSON ¶
func (enum *AutoscalerEstimator) UnmarshalJSON(data []byte) error
type AutoscalerExpander ¶
type AutoscalerExpander string
func (AutoscalerExpander) MarshalJSON ¶
func (enum AutoscalerExpander) MarshalJSON() ([]byte, error)
func (AutoscalerExpander) String ¶
func (enum AutoscalerExpander) String() string
func (*AutoscalerExpander) UnmarshalJSON ¶
func (enum *AutoscalerExpander) UnmarshalJSON(data []byte) error
type Cluster ¶
type Cluster struct { // ID: ID of the cluster. ID string `json:"id"` // Type: type of the cluster. Type string `json:"type"` // Name: name of the cluster. Name string `json:"name"` // Status: status of the cluster. // Default value: unknown Status ClusterStatus `json:"status"` // Version: kubernetes version of the cluster. Version string `json:"version"` // Region: region in which the cluster is deployed. Region scw.Region `json:"region"` // OrganizationID: ID of the organization owning the cluster. OrganizationID string `json:"organization_id"` // ProjectID: ID of the project owning the cluster. ProjectID string `json:"project_id"` // Tags: tags associated with the cluster. Tags []string `json:"tags"` // Cni: container Network Interface (CNI) plugin running in the cluster. // Default value: unknown_cni Cni CNI `json:"cni"` // Description: description of the cluster. Description string `json:"description"` // ClusterURL: kubernetes API server URL of the cluster. ClusterURL string `json:"cluster_url"` // DNSWildcard: DNS wildcard resovling all the ready nodes of the cluster. DNSWildcard string `json:"dns_wildcard"` // CreatedAt: date at which the cluster was created. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: date at which the cluster was last updated. UpdatedAt *time.Time `json:"updated_at"` // AutoscalerConfig: autoscaler config for the cluster. AutoscalerConfig *ClusterAutoscalerConfig `json:"autoscaler_config"` // Deprecated: DashboardEnabled: defines whether the Kubernetes dashboard is enabled for the cluster. DashboardEnabled *bool `json:"dashboard_enabled,omitempty"` // Deprecated: Ingress: ingress controller used in the cluster. // Default value: unknown_ingress Ingress *Ingress `json:"ingress,omitempty"` // AutoUpgrade: auto upgrade configuration of the cluster. AutoUpgrade *ClusterAutoUpgrade `json:"auto_upgrade"` // UpgradeAvailable: defines whether a new Kubernetes version is available. UpgradeAvailable bool `json:"upgrade_available"` // FeatureGates: list of enabled feature gates. FeatureGates []string `json:"feature_gates"` // AdmissionPlugins: list of enabled admission plugins. AdmissionPlugins []string `json:"admission_plugins"` // OpenIDConnectConfig: openID Connect configuration of the cluster. // This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. OpenIDConnectConfig *ClusterOpenIDConnectConfig `json:"open_id_connect_config"` // ApiserverCertSans: additional Subject Alternative Names for the Kubernetes API server certificate. ApiserverCertSans []string `json:"apiserver_cert_sans"` // PrivateNetworkID: private network ID for internal cluster communication. PrivateNetworkID *string `json:"private_network_id"` }
Cluster: cluster.
type ClusterAutoUpgrade ¶
type ClusterAutoUpgrade struct { // Enabled: whether or not auto upgrade is enabled for the cluster. Enabled bool `json:"enabled"` // MaintenanceWindow: maintenance window of the cluster auto upgrades. MaintenanceWindow *MaintenanceWindow `json:"maintenance_window"` }
ClusterAutoUpgrade: cluster. auto upgrade.
type ClusterAutoscalerConfig ¶
type ClusterAutoscalerConfig struct { // ScaleDownDisabled: disable the cluster autoscaler. ScaleDownDisabled bool `json:"scale_down_disabled"` // ScaleDownDelayAfterAdd: how long after scale up that scale down evaluation resumes. ScaleDownDelayAfterAdd string `json:"scale_down_delay_after_add"` // Estimator: type of resource estimator to be used in scale up. // Default value: unknown_estimator Estimator AutoscalerEstimator `json:"estimator"` // Expander: type of node group expander to be used in scale up. // Default value: unknown_expander Expander AutoscalerExpander `json:"expander"` // IgnoreDaemonsetsUtilization: ignore DaemonSet pods when calculating resource utilization for scaling down. IgnoreDaemonsetsUtilization bool `json:"ignore_daemonsets_utilization"` // BalanceSimilarNodeGroups: detect similar node groups and balance the number of nodes between them. BalanceSimilarNodeGroups bool `json:"balance_similar_node_groups"` // ExpendablePodsPriorityCutoff: pods with priority below cutoff will be expendable. // Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they don't cause scale up. Pods with null priority (PodPriority disabled) are non expendable. ExpendablePodsPriorityCutoff int32 `json:"expendable_pods_priority_cutoff"` // ScaleDownUnneededTime: how long a node should be unneeded before it is eligible for scale down. ScaleDownUnneededTime string `json:"scale_down_unneeded_time"` // ScaleDownUtilizationThreshold: node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down. ScaleDownUtilizationThreshold float32 `json:"scale_down_utilization_threshold"` // MaxGracefulTerminationSec: maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. MaxGracefulTerminationSec uint32 `json:"max_graceful_termination_sec"` }
ClusterAutoscalerConfig: cluster. autoscaler config.
type ClusterOpenIDConnectConfig ¶
type ClusterOpenIDConnectConfig struct { // IssuerURL: URL of the provider which allows the API server to discover public signing keys. // URL of the provider which allows the API server to discover public signing keys. Only URLs which use the `https://` scheme are accepted. This is typically the provider's discovery URL without a path, for example "https://accounts.google.com" or "https://login.salesforce.com". This URL should point to the level below .well-known/openid-configuration. IssuerURL string `json:"issuer_url"` // ClientID: a client id that all tokens must be issued for. ClientID string `json:"client_id"` // UsernameClaim: jWT claim to use as the user name. // JWT claim to use as the user name. By default `sub`, which is expected to be a unique identifier of the end user. Admins can choose other claims, such as `email` or `name`, depending on their provider. However, claims other than `email` will be prefixed with the issuer URL to prevent naming clashes with other plugins. UsernameClaim string `json:"username_claim"` // UsernamePrefix: prefix prepended to username. // Prefix prepended to username claims to prevent clashes with existing names (such as `system:` users). For example, the value `oidc:` will create usernames like `oidc:jane.doe`. If this flag isn't provided and `username_claim` is a value other than `email` the prefix defaults to `( Issuer URL )#` where `( Issuer URL )` is the value of `issuer_url`. The value `-` can be used to disable all prefixing. UsernamePrefix string `json:"username_prefix"` // GroupsClaim: jWT claim to use as the user's group. GroupsClaim []string `json:"groups_claim"` // GroupsPrefix: prefix prepended to group claims. // Prefix prepended to group claims to prevent clashes with existing names (such as `system:` groups). For example, the value `oidc:` will create group names like `oidc:engineering` and `oidc:infra`. GroupsPrefix string `json:"groups_prefix"` // RequiredClaim: multiple key=value pairs that describes a required claim in the ID token. // Multiple key=value pairs that describes a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value. RequiredClaim []string `json:"required_claim"` }
ClusterOpenIDConnectConfig: cluster. open id connect config.
type ClusterStatus ¶
type ClusterStatus string
func (ClusterStatus) MarshalJSON ¶
func (enum ClusterStatus) MarshalJSON() ([]byte, error)
func (ClusterStatus) String ¶
func (enum ClusterStatus) String() string
func (*ClusterStatus) UnmarshalJSON ¶
func (enum *ClusterStatus) UnmarshalJSON(data []byte) error
type CreateClusterRequest ¶
type CreateClusterRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // Deprecated: OrganizationID: organization ID in which the cluster will be created. // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: project ID in which the cluster will be created. // Precisely one of OrganizationID, ProjectID must be set. ProjectID *string `json:"project_id,omitempty"` // Type: type of the cluster. // Type of the cluster (possible values are kapsule, multicloud). Type string `json:"type"` // Name: name of the cluster. Name string `json:"name"` // Description: description of the cluster. Description string `json:"description"` // Tags: tags associated with the cluster. Tags []string `json:"tags"` // Version: kubernetes version of the cluster. Version string `json:"version"` // Cni: container Network Interface (CNI) plugin that will run in the cluster. // Default value: unknown_cni Cni CNI `json:"cni"` // Deprecated: EnableDashboard: defines if the Kubernetes Dashboard is enabled in the cluster. EnableDashboard *bool `json:"enable_dashboard,omitempty"` // Deprecated: Ingress: ingress Controller that will run in the cluster. // Default value: unknown_ingress Ingress *Ingress `json:"ingress,omitempty"` // Pools: pools to be created along with the cluster. Pools []*CreateClusterRequestPoolConfig `json:"pools"` // AutoscalerConfig: autoscaler config for the cluster. // This field allows to specify some configuration for the autoscaler, which is an implementation of the [cluster-autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/). AutoscalerConfig *CreateClusterRequestAutoscalerConfig `json:"autoscaler_config"` // AutoUpgrade: auto upgrade configuration of the cluster. // This configuration enables to set a specific 2-hour time window in which the cluster can be automatically updated to the latest patch version in the current minor one. AutoUpgrade *CreateClusterRequestAutoUpgrade `json:"auto_upgrade"` // FeatureGates: list of feature gates to enable. FeatureGates []string `json:"feature_gates"` // AdmissionPlugins: list of admission plugins to enable. AdmissionPlugins []string `json:"admission_plugins"` // OpenIDConnectConfig: openID Connect configuration of the cluster. // This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. OpenIDConnectConfig *CreateClusterRequestOpenIDConnectConfig `json:"open_id_connect_config"` // ApiserverCertSans: additional Subject Alternative Names for the Kubernetes API server certificate. ApiserverCertSans []string `json:"apiserver_cert_sans"` // PrivateNetworkID: private network ID for internal cluster communication (cannot be changed later). PrivateNetworkID *string `json:"private_network_id"` }
type CreateClusterRequestAutoUpgrade ¶
type CreateClusterRequestAutoUpgrade struct { // Enable: whether or not auto upgrade is enabled for the cluster. Enable bool `json:"enable"` // MaintenanceWindow: maintenance window of the cluster auto upgrades. MaintenanceWindow *MaintenanceWindow `json:"maintenance_window"` }
CreateClusterRequestAutoUpgrade: create cluster request. auto upgrade.
type CreateClusterRequestAutoscalerConfig ¶
type CreateClusterRequestAutoscalerConfig struct { // ScaleDownDisabled: disable the cluster autoscaler. ScaleDownDisabled *bool `json:"scale_down_disabled"` // ScaleDownDelayAfterAdd: how long after scale up that scale down evaluation resumes. ScaleDownDelayAfterAdd *string `json:"scale_down_delay_after_add"` // Estimator: type of resource estimator to be used in scale up. // Default value: unknown_estimator Estimator AutoscalerEstimator `json:"estimator"` // Expander: type of node group expander to be used in scale up. // Default value: unknown_expander Expander AutoscalerExpander `json:"expander"` // IgnoreDaemonsetsUtilization: ignore DaemonSet pods when calculating resource utilization for scaling down. IgnoreDaemonsetsUtilization *bool `json:"ignore_daemonsets_utilization"` // BalanceSimilarNodeGroups: detect similar node groups and balance the number of nodes between them. BalanceSimilarNodeGroups *bool `json:"balance_similar_node_groups"` // ExpendablePodsPriorityCutoff: pods with priority below cutoff will be expendable. // Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they don't cause scale up. Pods with null priority (PodPriority disabled) are non expendable. ExpendablePodsPriorityCutoff *int32 `json:"expendable_pods_priority_cutoff"` // ScaleDownUnneededTime: how long a node should be unneeded before it is eligible for scale down. ScaleDownUnneededTime *string `json:"scale_down_unneeded_time"` // ScaleDownUtilizationThreshold: node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down. ScaleDownUtilizationThreshold *float32 `json:"scale_down_utilization_threshold"` // MaxGracefulTerminationSec: maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. MaxGracefulTerminationSec *uint32 `json:"max_graceful_termination_sec"` }
CreateClusterRequestAutoscalerConfig: create cluster request. autoscaler config.
type CreateClusterRequestOpenIDConnectConfig ¶
type CreateClusterRequestOpenIDConnectConfig struct { // IssuerURL: URL of the provider which allows the API server to discover public signing keys. // URL of the provider which allows the API server to discover public signing keys. Only URLs which use the `https://` scheme are accepted. This is typically the provider's discovery URL without a path, for example "https://accounts.google.com" or "https://login.salesforce.com". This URL should point to the level below .well-known/openid-configuration. IssuerURL string `json:"issuer_url"` // ClientID: a client id that all tokens must be issued for. ClientID string `json:"client_id"` // UsernameClaim: jWT claim to use as the user name. // JWT claim to use as the user name. By default `sub`, which is expected to be a unique identifier of the end user. Admins can choose other claims, such as `email` or `name`, depending on their provider. However, claims other than `email` will be prefixed with the issuer URL to prevent naming clashes with other plugins. UsernameClaim *string `json:"username_claim"` // UsernamePrefix: prefix prepended to username. // Prefix prepended to username claims to prevent clashes with existing names (such as `system:` users). For example, the value `oidc:` will create usernames like `oidc:jane.doe`. If this flag isn't provided and `username_claim` is a value other than `email` the prefix defaults to `( Issuer URL )#` where `( Issuer URL )` is the value of `issuer_url`. The value `-` can be used to disable all prefixing. UsernamePrefix *string `json:"username_prefix"` // GroupsClaim: jWT claim to use as the user's group. GroupsClaim *[]string `json:"groups_claim"` // GroupsPrefix: prefix prepended to group claims. // Prefix prepended to group claims to prevent clashes with existing names (such as `system:` groups). For example, the value `oidc:` will create group names like `oidc:engineering` and `oidc:infra`. GroupsPrefix *string `json:"groups_prefix"` // RequiredClaim: multiple key=value pairs that describes a required claim in the ID token. // Multiple key=value pairs that describes a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value. RequiredClaim *[]string `json:"required_claim"` }
CreateClusterRequestOpenIDConnectConfig: create cluster request. open id connect config.
type CreateClusterRequestPoolConfig ¶
type CreateClusterRequestPoolConfig struct { // Name: name of the pool. Name string `json:"name"` // NodeType: node type is the type of Scaleway Instance wanted for the pool. // Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). 'external' is a special node type used to provision instances from other cloud providers. NodeType string `json:"node_type"` // PlacementGroupID: placement group ID in which all the nodes of the pool will be created. PlacementGroupID *string `json:"placement_group_id"` // Autoscaling: defines whether the autoscaling feature is enabled for the pool. Autoscaling bool `json:"autoscaling"` // Size: size (number of nodes) of the pool. Size uint32 `json:"size"` // MinSize: minimum size of the pool. // Defines the minimum size of the pool. Note that this field will be used only when autoscaling is enabled. MinSize *uint32 `json:"min_size"` // MaxSize: maximum size of the pool. // Defines the maximum size of the pool. Note that this field will be used only when autoscaling is enabled. MaxSize *uint32 `json:"max_size"` // ContainerRuntime: container runtime for the nodes of the pool. // Customization of the container runtime is available for each pool. Note that `docker` is deprecated since 1.20 and will be removed in 1.24. // Default value: unknown_runtime ContainerRuntime Runtime `json:"container_runtime"` // Autohealing: defines whether the autohealing feature is enabled for the pool. Autohealing bool `json:"autohealing"` // Tags: tags associated with the pool. Tags []string `json:"tags"` // KubeletArgs: kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental. KubeletArgs map[string]string `json:"kubelet_args"` // UpgradePolicy: pool upgrade policy. UpgradePolicy *CreateClusterRequestPoolConfigUpgradePolicy `json:"upgrade_policy"` // Zone: zone in which the pool's nodes will be spawned. Zone scw.Zone `json:"zone"` // RootVolumeType: system volume disk type. // Defines the system volume disk type, we provide two different types of volume (`volume_type`): `l_ssd` is a local block storage: your system is stored locally on the hypervisor of your node. `b_ssd` is a remote block storage: your system is stored on a centralised and resilient cluster. // Default value: default_volume_type RootVolumeType PoolVolumeType `json:"root_volume_type"` // RootVolumeSize: system volume disk size. RootVolumeSize *scw.Size `json:"root_volume_size"` }
CreateClusterRequestPoolConfig: create cluster request. pool config.
type CreateClusterRequestPoolConfigUpgradePolicy ¶
type CreateClusterRequestPoolConfigUpgradePolicy struct { uint32 `json:"max_unavailable"` // MaxSurge: the maximum number of nodes to be created during the upgrade. MaxSurge *uint32 `json:"max_surge"` }MaxUnavailable *
CreateClusterRequestPoolConfigUpgradePolicy: create cluster request. pool config. upgrade policy.
type CreatePoolRequest ¶
type CreatePoolRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ClusterID: ID of the cluster in which the pool will be created. ClusterID string `json:"-"` // Name: name of the pool. Name string `json:"name"` // NodeType: node type is the type of Scaleway Instance wanted for the pool. // Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). 'external' is a special node type used to provision instances from other cloud providers. NodeType string `json:"node_type"` // PlacementGroupID: placement group ID in which all the nodes of the pool will be created. PlacementGroupID *string `json:"placement_group_id"` // Autoscaling: defines whether the autoscaling feature is enabled for the pool. Autoscaling bool `json:"autoscaling"` // Size: size (number of nodes) of the pool. Size uint32 `json:"size"` // MinSize: minimum size of the pool. // Defines the minimum size of the pool. Note that this field will be used only when autoscaling is enabled. MinSize *uint32 `json:"min_size"` // MaxSize: maximum size of the pool. // Defines the maximum size of the pool. Note that this field will be used only when autoscaling is enabled. MaxSize *uint32 `json:"max_size"` // ContainerRuntime: container runtime for the nodes of the pool. // Customization of the container runtime is available for each pool. Note that `docker` is deprecated since 1.20 and will be removed in 1.24. // Default value: unknown_runtime ContainerRuntime Runtime `json:"container_runtime"` // Autohealing: defines whether the autohealing feature is enabled for the pool. Autohealing bool `json:"autohealing"` // Tags: tags associated with the pool. Tags []string `json:"tags"` // KubeletArgs: kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental. KubeletArgs map[string]string `json:"kubelet_args"` // UpgradePolicy: pool upgrade policy. UpgradePolicy *CreatePoolRequestUpgradePolicy `json:"upgrade_policy"` // Zone: zone in which the pool's nodes will be spawned. Zone scw.Zone `json:"zone"` // RootVolumeType: system volume disk type. // Defines the system volume disk type, we provide two different types of volume (`volume_type`): `l_ssd` is a local block storage: your system is stored locally on the hypervisor of your node. `b_ssd` is a remote block storage: your system is stored on a centralised and resilient cluster. // Default value: default_volume_type RootVolumeType PoolVolumeType `json:"root_volume_type"` // RootVolumeSize: system volume disk size. RootVolumeSize *scw.Size `json:"root_volume_size"` }
type CreatePoolRequestUpgradePolicy ¶
type CreatePoolRequestUpgradePolicy struct { MaxSurge *uint32 `json:"max_surge"` }
type DeleteClusterRequest ¶
type DeleteClusterRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ClusterID: ID of the cluster to delete. ClusterID string `json:"-"` // WithAdditionalResources: set true if you want to delete all volumes (including retain volume type) and loadbalancers whose name start with cluster ID. WithAdditionalResources bool `json:"-"` }
type DeleteNodeRequest ¶
type DeleteNodeRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // NodeID: ID of the node to replace. NodeID string `json:"-"` // SkipDrain: skip draining node from its workload. SkipDrain bool `json:"-"` // Replace: add a new node after the deletion of this node. Replace bool `json:"-"` }
type DeletePoolRequest ¶
type ExternalNode ¶
type GetClusterRequest ¶
type GetNodeRequest ¶
type GetPoolRequest ¶
type GetVersionRequest ¶
type Kubeconfig ¶
type Kubeconfig struct { APIVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` CurrentContext string `yaml:"current-context"` Clusters []*KubeconfigClusterWithName `yaml:"clusters"` Contexts []*KubeconfigContextWithName `yaml:"contexts"` Users []*KubeconfigUserWithName `yaml:"users"` // contains filtered or unexported fields }
Kubeconfig represents a kubernetes kubeconfig file
func (*Kubeconfig) GetCertificateAuthorityData ¶
func (k *Kubeconfig) GetCertificateAuthorityData() (string, error)
GetCertificateAuthorityData returns the server certificate authority data of the cluster in the kubeconfig
func (*Kubeconfig) GetRaw ¶
func (k *Kubeconfig) GetRaw() []byte
GetRaw returns the raw bytes of the kubeconfig
func (*Kubeconfig) GetServer ¶
func (k *Kubeconfig) GetServer() (string, error)
GetServer returns the server URL of the cluster in the kubeconfig
func (*Kubeconfig) GetToken ¶
func (k *Kubeconfig) GetToken() (string, error)
GetToken returns the token for the cluster in the kubeconfig
type KubeconfigCluster ¶
type KubeconfigCluster struct { Server string `yaml:"server,omitempty"` CertificateAuthorityData string `yaml:"certificate-authority-data,omitempty"` }
KubeconfigCluster represents a cluster in the kubeconfig file
type KubeconfigClusterWithName ¶
type KubeconfigClusterWithName struct { Name string `yaml:"name"` Cluster KubeconfigCluster `yaml:"cluster"` }
KubeconfigUserWithName represents a named cluster in the kubeconfig file
type KubeconfigContext ¶
type KubeconfigContext struct { Cluster string `yaml:"cluster"` Namespace string `yaml:"namespace,omitempty"` User string `yaml:"user"` }
KubeconfigContext represents a context in the kubeconfig file
type KubeconfigContextWithName ¶
type KubeconfigContextWithName struct { Name string `yaml:"name"` Context KubeconfigContext `yaml:"context"` }
KubeconfigContextWithName represents a named context in the kubeconfig file
type KubeconfigUser ¶
type KubeconfigUser struct { ClientCertificateData string `yaml:"client-certificate-data,omitempty"` ClientKeyData string `yaml:"client-key-data,omitempty"` Password string `yaml:"password,omitempty"` Username string `yaml:"username,omitempty"` Token string `yaml:"token,omitempty"` }
KubeconfigUser represents a user in the kubeconfig file
type KubeconfigUserWithName ¶
type KubeconfigUserWithName struct { Name string `yaml:"name"` User KubeconfigUser `yaml:"user"` }
KubeconfigUserWithName represents a named user in the kubeconfig file
type ListClusterAvailableVersionsResponse ¶
type ListClusterAvailableVersionsResponse struct { // Versions: available Kubernetes version for the cluster. Versions []*Version `json:"versions"` }
ListClusterAvailableVersionsResponse: list cluster available versions response.
type ListClustersRequest ¶
type ListClustersRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // OrganizationID: organization ID on which to filter the returned clusters. OrganizationID *string `json:"-"` // ProjectID: project ID on which to filter the returned clusters. ProjectID *string `json:"-"` // OrderBy: sort order of the returned clusters. // Default value: created_at_asc OrderBy ListClustersRequestOrderBy `json:"-"` // Page: page number for the returned clusters. Page *int32 `json:"-"` // PageSize: maximum number of clusters per page. PageSize *uint32 `json:"-"` // Name: name on which to filter the returned clusters. Name *string `json:"-"` // Status: status on which to filter the returned clusters. // Default value: unknown Status ClusterStatus `json:"-"` // Type: type on which to filter the returned clusters. Type *string `json:"-"` }
type ListClustersRequestOrderBy ¶
type ListClustersRequestOrderBy string
func (ListClustersRequestOrderBy) MarshalJSON ¶
func (enum ListClustersRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListClustersRequestOrderBy) String ¶
func (enum ListClustersRequestOrderBy) String() string
func (*ListClustersRequestOrderBy) UnmarshalJSON ¶
func (enum *ListClustersRequestOrderBy) UnmarshalJSON(data []byte) error
type ListClustersResponse ¶
type ListClustersResponse struct { // TotalCount: total number of clusters. TotalCount uint32 `json:"total_count"` // Clusters: paginated returned clusters. Clusters []*Cluster `json:"clusters"` }
ListClustersResponse: list clusters response.
func (*ListClustersResponse) UnsafeAppend ¶
func (r *ListClustersResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListClustersResponse) UnsafeGetTotalCount ¶
func (r *ListClustersResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListNodesRequest ¶
type ListNodesRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ClusterID: cluster ID from which the nodes will be listed from. ClusterID string `json:"-"` // PoolID: pool ID on which to filter the returned nodes. PoolID *string `json:"-"` // OrderBy: sort order of the returned nodes. // Default value: created_at_asc OrderBy ListNodesRequestOrderBy `json:"-"` // Page: page number for the returned nodes. Page *int32 `json:"-"` // PageSize: maximum number of nodes per page. PageSize *uint32 `json:"-"` // Name: name on which to filter the returned nodes. Name *string `json:"-"` // Status: status on which to filter the returned nodes. // Default value: unknown Status NodeStatus `json:"-"` }
type ListNodesRequestOrderBy ¶
type ListNodesRequestOrderBy string
func (ListNodesRequestOrderBy) MarshalJSON ¶
func (enum ListNodesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListNodesRequestOrderBy) String ¶
func (enum ListNodesRequestOrderBy) String() string
func (*ListNodesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListNodesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListNodesResponse ¶
type ListNodesResponse struct { // TotalCount: total number of nodes. TotalCount uint32 `json:"total_count"` // Nodes: paginated returned nodes. Nodes []*Node `json:"nodes"` }
ListNodesResponse: list nodes response.
func (*ListNodesResponse) UnsafeAppend ¶
func (r *ListNodesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListNodesResponse) UnsafeGetTotalCount ¶
func (r *ListNodesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListPoolsRequest ¶
type ListPoolsRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ClusterID: ID of the cluster from which the pools will be listed from. ClusterID string `json:"-"` // OrderBy: sort order of the returned pools. // Default value: created_at_asc OrderBy ListPoolsRequestOrderBy `json:"-"` // Page: page number for the returned pools. Page *int32 `json:"-"` // PageSize: maximum number of pools per page. PageSize *uint32 `json:"-"` // Name: name on which to filter the returned pools. Name *string `json:"-"` // Status: status on which to filter the returned pools. // Default value: unknown Status PoolStatus `json:"-"` }
type ListPoolsRequestOrderBy ¶
type ListPoolsRequestOrderBy string
func (ListPoolsRequestOrderBy) MarshalJSON ¶
func (enum ListPoolsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListPoolsRequestOrderBy) String ¶
func (enum ListPoolsRequestOrderBy) String() string
func (*ListPoolsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListPoolsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListPoolsResponse ¶
type ListPoolsResponse struct { // TotalCount: total number of pools that exists for the cluster. TotalCount uint32 `json:"total_count"` // Pools: paginated returned pools. Pools []*Pool `json:"pools"` }
ListPoolsResponse: list pools response.
func (*ListPoolsResponse) UnsafeAppend ¶
func (r *ListPoolsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListPoolsResponse) UnsafeGetTotalCount ¶
func (r *ListPoolsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListVersionsRequest ¶
type ListVersionsResponse ¶
type ListVersionsResponse struct { // Versions: available Kubernetes versions. Versions []*Version `json:"versions"` }
ListVersionsResponse: list versions response.
type MaintenanceWindow ¶
type MaintenanceWindow struct { // StartHour: start time of the two-hour maintenance window. StartHour uint32 `json:"start_hour"` // Day: day of the week for the maintenance window. // Default value: any Day MaintenanceWindowDayOfTheWeek `json:"day"` }
MaintenanceWindow: maintenance window.
type MaintenanceWindowDayOfTheWeek ¶
type MaintenanceWindowDayOfTheWeek string
func (MaintenanceWindowDayOfTheWeek) MarshalJSON ¶
func (enum MaintenanceWindowDayOfTheWeek) MarshalJSON() ([]byte, error)
func (MaintenanceWindowDayOfTheWeek) String ¶
func (enum MaintenanceWindowDayOfTheWeek) String() string
func (*MaintenanceWindowDayOfTheWeek) UnmarshalJSON ¶
func (enum *MaintenanceWindowDayOfTheWeek) UnmarshalJSON(data []byte) error
type Node ¶
type Node struct { // ID: ID of the node. ID string `json:"id"` // PoolID: pool ID of the node. PoolID string `json:"pool_id"` // ClusterID: cluster ID of the node. ClusterID string `json:"cluster_id"` // ProviderID: underlying instance ID. // It is prefixed by instance type and location information (see https://pkg.go.dev/k8s.io/api/core/v1#NodeSpec.ProviderID). ProviderID string `json:"provider_id"` // Region: cluster region of the node. Region scw.Region `json:"region"` // Name: name of the node. Name string `json:"name"` // Deprecated: PublicIPV4: public IPv4 address of the node. PublicIPV4 *net.IP `json:"public_ip_v4,omitempty"` // Deprecated: PublicIPV6: public IPv6 address of the node. PublicIPV6 *net.IP `json:"public_ip_v6,omitempty"` // Deprecated: Conditions: conditions of the node. // These conditions contains the Node Problem Detector conditions, as well as some in house conditions. Conditions *map[string]string `json:"conditions,omitempty"` // Status: status of the node. // Default value: unknown Status NodeStatus `json:"status"` // ErrorMessage: details of the error, if any occured when managing the node. ErrorMessage *string `json:"error_message"` // CreatedAt: date on which the node was created. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: date at which the node was last updated. UpdatedAt *time.Time `json:"updated_at"` }
Node: node.
type NodeStatus ¶
type NodeStatus string
func (NodeStatus) MarshalJSON ¶
func (enum NodeStatus) MarshalJSON() ([]byte, error)
func (NodeStatus) String ¶
func (enum NodeStatus) String() string
func (*NodeStatus) UnmarshalJSON ¶
func (enum *NodeStatus) UnmarshalJSON(data []byte) error
type Pool ¶
type Pool struct { // ID: ID of the pool. ID string `json:"id"` // ClusterID: cluster ID of the pool. ClusterID string `json:"cluster_id"` // CreatedAt: date at which the pool was created. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: date at which the pool was last updated. UpdatedAt *time.Time `json:"updated_at"` // Name: name of the pool. Name string `json:"name"` // Status: status of the pool. // Default value: unknown Status PoolStatus `json:"status"` // Version: version of the pool. Version string `json:"version"` // NodeType: node type is the type of Scaleway Instance wanted for the pool. // Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). 'external' is a special node type used to provision instances from other cloud providers. NodeType string `json:"node_type"` // Autoscaling: defines whether the autoscaling feature is enabled for the pool. Autoscaling bool `json:"autoscaling"` // Size: size (number of nodes) of the pool. Size uint32 `json:"size"` // MinSize: minimum size of the pool. // Defines the minimum size of the pool. Note that this field will be used only when autoscaling is enabled. MinSize uint32 `json:"min_size"` // MaxSize: maximum size of the pool. // Defines the maximum size of the pool. Note that this field will be used only when autoscaling is enabled. MaxSize uint32 `json:"max_size"` // ContainerRuntime: container runtime for the nodes of the pool. // Customization of the container runtime is available for each pool. Note that `docker` is deprecated since 1.20 and will be removed in 1.24. // Default value: unknown_runtime ContainerRuntime Runtime `json:"container_runtime"` // Autohealing: defines whether the autohealing feature is enabled for the pool. Autohealing bool `json:"autohealing"` // Tags: tags associated with the pool. Tags []string `json:"tags"` // PlacementGroupID: placement group ID in which all the nodes of the pool will be created. PlacementGroupID *string `json:"placement_group_id"` // KubeletArgs: kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental. KubeletArgs map[string]string `json:"kubelet_args"` // UpgradePolicy: pool upgrade policy. UpgradePolicy *PoolUpgradePolicy `json:"upgrade_policy"` // Zone: zone in which the pool's nodes will be spawned. Zone scw.Zone `json:"zone"` // RootVolumeType: system volume disk type. // Defines the system volume disk type, we provide two different types of volume (`volume_type`): `l_ssd` is a local block storage: your system is stored locally on the hypervisor of your node. `b_ssd` is a remote block storage: your system is stored on a centralised and resilient cluster. // Default value: default_volume_type RootVolumeType PoolVolumeType `json:"root_volume_type"` // RootVolumeSize: system volume disk size. RootVolumeSize *scw.Size `json:"root_volume_size"` // Region: cluster region of the pool. Region scw.Region `json:"region"` }
Pool: pool.
type PoolStatus ¶
type PoolStatus string
func (PoolStatus) MarshalJSON ¶
func (enum PoolStatus) MarshalJSON() ([]byte, error)
func (PoolStatus) String ¶
func (enum PoolStatus) String() string
func (*PoolStatus) UnmarshalJSON ¶
func (enum *PoolStatus) UnmarshalJSON(data []byte) error
type PoolUpgradePolicy ¶
type PoolUpgradePolicy struct { MaxSurge uint32 `json:"max_surge"` }
type PoolVolumeType ¶
type PoolVolumeType string
func (PoolVolumeType) MarshalJSON ¶
func (enum PoolVolumeType) MarshalJSON() ([]byte, error)
func (PoolVolumeType) String ¶
func (enum PoolVolumeType) String() string
func (*PoolVolumeType) UnmarshalJSON ¶
func (enum *PoolVolumeType) UnmarshalJSON(data []byte) error
type RebootNodeRequest ¶
type ReplaceNodeRequest ¶
type SetClusterTypeRequest ¶
type SetClusterTypeRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ClusterID: ID of the cluster to migrate from one type to another. ClusterID string `json:"-"` // Type: type of the cluster. // Type of the cluster. Note that some migrations are not possible (please refer to product documentation). Type string `json:"type"` }
type UpdateClusterRequest ¶
type UpdateClusterRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ClusterID: ID of the cluster to update. ClusterID string `json:"-"` // Name: new external name of the cluster. Name *string `json:"name"` // Description: new description of the cluster. Description *string `json:"description"` // Tags: new tags associated with the cluster. Tags *[]string `json:"tags"` // AutoscalerConfig: new autoscaler config for the cluster. // Object defining the configuration for the autoscaler, which is an implementation of the [cluster-autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/). AutoscalerConfig *UpdateClusterRequestAutoscalerConfig `json:"autoscaler_config"` // Deprecated: EnableDashboard: new value of the Kubernetes Dashboard enablement. EnableDashboard *bool `json:"enable_dashboard,omitempty"` // Deprecated: Ingress: new Ingress Controller for the cluster. // Default value: unknown_ingress Ingress *Ingress `json:"ingress,omitempty"` // AutoUpgrade: new auto upgrade configuration of the cluster. // New auto upgrade configuration of the cluster. Note that all fields need to be set. AutoUpgrade *UpdateClusterRequestAutoUpgrade `json:"auto_upgrade"` // FeatureGates: list of feature gates to enable. FeatureGates *[]string `json:"feature_gates"` // AdmissionPlugins: list of admission plugins to enable. AdmissionPlugins *[]string `json:"admission_plugins"` // OpenIDConnectConfig: openID Connect configuration of the cluster. // This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. OpenIDConnectConfig *UpdateClusterRequestOpenIDConnectConfig `json:"open_id_connect_config"` // ApiserverCertSans: additional Subject Alternative Names for the Kubernetes API server certificate. ApiserverCertSans *[]string `json:"apiserver_cert_sans"` }
type UpdateClusterRequestAutoUpgrade ¶
type UpdateClusterRequestAutoUpgrade struct { // Enable: whether or not auto upgrade is enabled for the cluster. Enable *bool `json:"enable"` // MaintenanceWindow: maintenance window of the cluster auto upgrades. MaintenanceWindow *MaintenanceWindow `json:"maintenance_window"` }
UpdateClusterRequestAutoUpgrade: update cluster request. auto upgrade.
type UpdateClusterRequestAutoscalerConfig ¶
type UpdateClusterRequestAutoscalerConfig struct { // ScaleDownDisabled: disable the cluster autoscaler. ScaleDownDisabled *bool `json:"scale_down_disabled"` // ScaleDownDelayAfterAdd: how long after scale up that scale down evaluation resumes. ScaleDownDelayAfterAdd *string `json:"scale_down_delay_after_add"` // Estimator: type of resource estimator to be used in scale up. // Default value: unknown_estimator Estimator AutoscalerEstimator `json:"estimator"` // Expander: type of node group expander to be used in scale up. // Default value: unknown_expander Expander AutoscalerExpander `json:"expander"` // IgnoreDaemonsetsUtilization: ignore DaemonSet pods when calculating resource utilization for scaling down. IgnoreDaemonsetsUtilization *bool `json:"ignore_daemonsets_utilization"` // BalanceSimilarNodeGroups: detect similar node groups and balance the number of nodes between them. BalanceSimilarNodeGroups *bool `json:"balance_similar_node_groups"` // ExpendablePodsPriorityCutoff: pods with priority below cutoff will be expendable. // Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they don't cause scale up. Pods with null priority (PodPriority disabled) are non expendable. ExpendablePodsPriorityCutoff *int32 `json:"expendable_pods_priority_cutoff"` // ScaleDownUnneededTime: how long a node should be unneeded before it is eligible for scale down. ScaleDownUnneededTime *string `json:"scale_down_unneeded_time"` // ScaleDownUtilizationThreshold: node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down. ScaleDownUtilizationThreshold *float32 `json:"scale_down_utilization_threshold"` // MaxGracefulTerminationSec: maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. MaxGracefulTerminationSec *uint32 `json:"max_graceful_termination_sec"` }
UpdateClusterRequestAutoscalerConfig: update cluster request. autoscaler config.
type UpdateClusterRequestOpenIDConnectConfig ¶
type UpdateClusterRequestOpenIDConnectConfig struct { // IssuerURL: URL of the provider which allows the API server to discover public signing keys. // URL of the provider which allows the API server to discover public signing keys. Only URLs which use the `https://` scheme are accepted. This is typically the provider's discovery URL without a path, for example "https://accounts.google.com" or "https://login.salesforce.com". This URL should point to the level below .well-known/openid-configuration. IssuerURL *string `json:"issuer_url"` // ClientID: a client id that all tokens must be issued for. ClientID *string `json:"client_id"` // UsernameClaim: jWT claim to use as the user name. // JWT claim to use as the user name. By default `sub`, which is expected to be a unique identifier of the end user. Admins can choose other claims, such as `email` or `name`, depending on their provider. However, claims other than `email` will be prefixed with the issuer URL to prevent naming clashes with other plugins. UsernameClaim *string `json:"username_claim"` // UsernamePrefix: prefix prepended to username. // Prefix prepended to username claims to prevent clashes with existing names (such as `system:` users). For example, the value `oidc:` will create usernames like `oidc:jane.doe`. If this flag isn't provided and `username_claim` is a value other than `email` the prefix defaults to `( Issuer URL )#` where `( Issuer URL )` is the value of `issuer_url`. The value `-` can be used to disable all prefixing. UsernamePrefix *string `json:"username_prefix"` // GroupsClaim: jWT claim to use as the user's group. GroupsClaim *[]string `json:"groups_claim"` // GroupsPrefix: prefix prepended to group claims. // Prefix prepended to group claims to prevent clashes with existing names (such as `system:` groups). For example, the value `oidc:` will create group names like `oidc:engineering` and `oidc:infra`. GroupsPrefix *string `json:"groups_prefix"` // RequiredClaim: multiple key=value pairs that describes a required claim in the ID token. // Multiple key=value pairs that describes a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value. RequiredClaim *[]string `json:"required_claim"` }
UpdateClusterRequestOpenIDConnectConfig: update cluster request. open id connect config.
type UpdatePoolRequest ¶
type UpdatePoolRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // PoolID: ID of the pool to update. PoolID string `json:"-"` // Autoscaling: new value for the enablement of autoscaling for the pool. Autoscaling *bool `json:"autoscaling"` // Size: new size for the pool. Size *uint32 `json:"size"` // MinSize: new minimun size for the pool. MinSize *uint32 `json:"min_size"` // MaxSize: new maximum size for the pool. MaxSize *uint32 `json:"max_size"` // Autohealing: new value for the enablement of autohealing for the pool. Autohealing *bool `json:"autohealing"` // Tags: new tags associated with the pool. Tags *[]string `json:"tags"` // KubeletArgs: new Kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental. KubeletArgs *map[string]string `json:"kubelet_args"` // UpgradePolicy: upgrade policy for the pool. UpgradePolicy *UpdatePoolRequestUpgradePolicy `json:"upgrade_policy"` }
type UpdatePoolRequestUpgradePolicy ¶
type UpdatePoolRequestUpgradePolicy struct { MaxSurge *uint32 `json:"max_surge"` }
type UpgradeClusterRequest ¶
type UpgradeClusterRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ClusterID: ID of the cluster to upgrade. ClusterID string `json:"-"` // Version: new Kubernetes version of the cluster. // New Kubernetes version of the cluster. Note that the version shoud either be a higher patch version of the same minor version or the direct minor version after the current one. Version string `json:"version"` // UpgradePools: enablement of the pools upgrade. // This field also trigger pools upgrade once the control plane is upgraded. UpgradePools bool `json:"upgrade_pools"` }
type UpgradePoolRequest ¶
type Version ¶
type Version struct { // Name: name of the Kubernetes version. Name string `json:"name"` // Label: label of the Kubernetes version. Label string `json:"label"` // Region: region in which this version is available. Region scw.Region `json:"region"` // AvailableCnis: supported Container Network Interface (CNI) plugins for this version. AvailableCnis []CNI `json:"available_cnis"` // Deprecated: AvailableIngresses: supported Ingress Controllers for this version. AvailableIngresses *[]Ingress `json:"available_ingresses,omitempty"` // AvailableContainerRuntimes: supported container runtimes for this version. AvailableContainerRuntimes []Runtime `json:"available_container_runtimes"` // AvailableFeatureGates: supported feature gates for this version. AvailableFeatureGates []string `json:"available_feature_gates"` // AvailableAdmissionPlugins: supported admission plugins for this version. AvailableAdmissionPlugins []string `json:"available_admission_plugins"` // AvailableKubeletArgs: supported kubelet arguments for this version. AvailableKubeletArgs map[string]string `json:"available_kubelet_args"` }
Version: version.
type WaitForClusterPoolRequest ¶
type WaitForClusterPoolRequest struct { ClusterID string Region scw.Region Status ClusterStatus Timeout *time.Duration RetryInterval *time.Duration }
WaitForClusterPoolRequest is used by WaitForClusterPool method.
type WaitForClusterRequest ¶
type WaitForClusterRequest struct { ClusterID string Region scw.Region Status ClusterStatus Timeout *time.Duration RetryInterval *time.Duration }
WaitForClusterRequest is used by WaitForCluster method.