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) 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 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: this method allows to create a new Kubernetes cluster on an account.
func (*API) CreateExternalNode ¶
func (s *API) CreateExternalNode(req *CreateExternalNodeRequest, opts ...scw.RequestOption) (*ExternalNode, error)
CreateExternalNode: this method returns metadata about a Kosmos node, it is not intended to be directly called by end users, rather by kapsule-node-agent.
func (*API) CreatePool ¶
func (s *API) CreatePool(req *CreatePoolRequest, opts ...scw.RequestOption) (*Pool, error)
CreatePool: this method allows to create a new pool in a specific Kubernetes cluster.
func (*API) DeleteCluster ¶
func (s *API) DeleteCluster(req *DeleteClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
DeleteCluster: this method allows to 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: this method allows to 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: this method allows to delete a specific pool from a cluster, deleting all the nodes associated with it.
func (*API) GetCluster ¶
func (s *API) GetCluster(req *GetClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
GetCluster: this method allows to 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: this method allows to get details about a specific Kubernetes node.
func (*API) GetPool ¶
func (s *API) GetPool(req *GetPoolRequest, opts ...scw.RequestOption) (*Pool, error)
GetPool: this method allows to get details about a specific pool.
func (*API) GetVersion ¶
func (s *API) GetVersion(req *GetVersionRequest, opts ...scw.RequestOption) (*Version, error)
GetVersion: this method allows to 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: this method allows to list the versions that a specific Kubernetes cluster is allowed to upgrade to. Note that it will be every patch version greater than the actual one as well a one minor version ahead of the actual one. Upgrades skipping a minor version will not work.
func (*API) ListClusters ¶
func (s *API) ListClusters(req *ListClustersRequest, opts ...scw.RequestOption) (*ListClustersResponse, error)
ListClusters: this method allows to list all the existing Kubernetes clusters in an account.
func (*API) ListNodes ¶
func (s *API) ListNodes(req *ListNodesRequest, opts ...scw.RequestOption) (*ListNodesResponse, error)
ListNodes: this method allows to 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: this method allows to 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: this method allows to 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: this method allows to reboot a specific node. This node will frist be cordoned, meaning that scheduling will be disabled. Then the existing pods on the node will be drained and reschedule 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: this method allows to 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: this method allows to reset the admin token for a specific Kubernetes cluster. This will invalidate the old admin token (which will not be usable after) and create a new one. Note that the redownload of the kubeconfig will be necessary to keep interacting with the cluster (if the old admin token was used).
func (*API) UpdateCluster ¶
func (s *API) UpdateCluster(req *UpdateClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
UpdateCluster: this method allows to update a specific Kubernetes cluster. Note that this method is not made to upgrade a Kubernetes cluster.
func (*API) UpdatePool ¶
func (s *API) UpdatePool(req *UpdatePoolRequest, opts ...scw.RequestOption) (*Pool, error)
UpdatePool: this method allows to update some attributes of a specific pool such as the size, the autoscaling enablement, the tags, ...
func (*API) UpgradeCluster ¶
func (s *API) UpgradeCluster(req *UpgradeClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
UpgradeCluster: this method allows to 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: this method allows to 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: the ID of the cluster. ID string `json:"id"` // Type: the type of the cluster. Type string `json:"type"` // Name: the name of the cluster. Name string `json:"name"` // Status: the status of the cluster. // Default value: unknown Status ClusterStatus `json:"status"` // Version: the Kubernetes version of the cluster. Version string `json:"version"` // Region: the region in which the cluster is. Region scw.Region `json:"region"` // OrganizationID: the ID of the organization owning the cluster. OrganizationID string `json:"organization_id"` // ProjectID: the ID of the project owning the cluster. ProjectID string `json:"project_id"` // Tags: the tags associated with the cluster. Tags []string `json:"tags"` // Cni: the Container Network Interface (CNI) plugin running in the cluster. // Default value: unknown_cni Cni CNI `json:"cni"` // Description: the description of the cluster. Description string `json:"description"` // ClusterURL: the Kubernetes API server URL of the cluster. ClusterURL string `json:"cluster_url"` // DNSWildcard: the DNS wildcard resovling all the ready nodes of the cluster. DNSWildcard string `json:"dns_wildcard"` // CreatedAt: the date at which the cluster was created. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: the date at which the cluster was last updated. UpdatedAt *time.Time `json:"updated_at"` // AutoscalerConfig: the autoscaler config for the cluster. AutoscalerConfig *ClusterAutoscalerConfig `json:"autoscaler_config"` // Deprecated: DashboardEnabled: the enablement of the Kubernetes Dashboard in the cluster. DashboardEnabled *bool `json:"dashboard_enabled,omitempty"` // Deprecated: Ingress: the ingress controller used in the cluster. // Default value: unknown_ingress Ingress *Ingress `json:"ingress,omitempty"` // AutoUpgrade: the auto upgrade configuration of the cluster. AutoUpgrade *ClusterAutoUpgrade `json:"auto_upgrade"` // UpgradeAvailable: true if 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: this feature is in ALPHA state, it may be deleted or modified. This configuration is the [OpenID Connect configuration](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens) 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"` }
Cluster: cluster.
type ClusterAutoUpgrade ¶
type ClusterAutoUpgrade struct { // Enabled: whether or not auto upgrade is enabled for the cluster. Enabled bool `json:"enabled"` // MaintenanceWindow: the 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. 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. 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. 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 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 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. 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: the organization ID where the cluster will be created. // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: the project ID where the cluster will be created. // Precisely one of OrganizationID, ProjectID must be set. ProjectID *string `json:"project_id,omitempty"` // Type: the type of the cluster (possible values are kapsule, multicloud). Type string `json:"type"` // Name: the name of the cluster. Name string `json:"name"` // Description: the description of the cluster. Description string `json:"description"` // Tags: the tags associated with the cluster. Tags []string `json:"tags"` // Version: the Kubernetes version of the cluster. Version string `json:"version"` // Cni: the Container Network Interface (CNI) plugin that will run in the cluster. // Default value: unknown_cni Cni CNI `json:"cni"` // Deprecated: EnableDashboard: the enablement of the Kubernetes Dashboard in the cluster. EnableDashboard *bool `json:"enable_dashboard,omitempty"` // Deprecated: Ingress: the Ingress Controller that will run in the cluster. // Default value: unknown_ingress Ingress *Ingress `json:"ingress,omitempty"` // Pools: the pools to be created along with the cluster. Pools []*CreateClusterRequestPoolConfig `json:"pools"` // AutoscalerConfig: 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: 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: this feature is in ALPHA state, it may be deleted or modified. This configuration enables to set the [OpenID Connect configuration](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens) 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"` }
type CreateClusterRequestAutoUpgrade ¶
type CreateClusterRequestAutoUpgrade struct { // Enable: whether or not auto upgrade is enabled for the cluster. Enable bool `json:"enable"` // MaintenanceWindow: the 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. 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. 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. 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 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 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. 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: the name of the pool. Name string `json:"name"` // NodeType: the 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: the placement group ID in which all the nodes of the pool will be created. PlacementGroupID *string `json:"placement_group_id"` // Autoscaling: the enablement of the autoscaling feature for the pool. Autoscaling bool `json:"autoscaling"` // Size: the size (number of nodes) of the pool. Size uint32 `json:"size"` // MinSize: the minimum size of the pool. Note that this field will be used only when autoscaling is enabled. MinSize *uint32 `json:"min_size"` // MaxSize: the maximum size of the pool. Note that this field will be used only when autoscaling is enabled. MaxSize *uint32 `json:"max_size"` // ContainerRuntime: the 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: the enablement of the autohealing feature for the pool. Autohealing bool `json:"autohealing"` // Tags: the tags associated with the pool. Tags []string `json:"tags"` // KubeletArgs: the 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: the Pool upgrade policy. UpgradePolicy *CreateClusterRequestPoolConfigUpgradePolicy `json:"upgrade_policy"` // Zone: the Zone in which the Pool's node will be spawn in. Zone scw.Zone `json:"zone"` // RootVolumeType: 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: the 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: the ID of the cluster in which the pool will be created. ClusterID string `json:"-"` // Name: the name of the pool. Name string `json:"name"` // NodeType: the 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: the placement group ID in which all the nodes of the pool will be created. PlacementGroupID *string `json:"placement_group_id"` // Autoscaling: the enablement of the autoscaling feature for the pool. Autoscaling bool `json:"autoscaling"` // Size: the size (number of nodes) of the pool. Size uint32 `json:"size"` // MinSize: the minimum size of the pool. Note that this field will be used only when autoscaling is enabled. MinSize *uint32 `json:"min_size"` // MaxSize: the maximum size of the pool. Note that this field will be used only when autoscaling is enabled. MaxSize *uint32 `json:"max_size"` // ContainerRuntime: the 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: the enablement of the autohealing feature for the pool. Autohealing bool `json:"autohealing"` // Tags: the tags associated with the pool. Tags []string `json:"tags"` // KubeletArgs: the 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: the Pool upgrade policy. UpgradePolicy *CreatePoolRequestUpgradePolicy `json:"upgrade_policy"` // Zone: the Zone in which the Pool's node will be spawn in. Zone scw.Zone `json:"zone"` // RootVolumeType: 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: the 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: the 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: the 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: the 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: the organization ID on which to filter the returned clusters. OrganizationID *string `json:"-"` // ProjectID: the project ID on which to filter the returned clusters. ProjectID *string `json:"-"` // OrderBy: the sort order of the returned clusters. // Default value: created_at_asc OrderBy ListClustersRequestOrderBy `json:"-"` // Page: the page number for the returned clusters. Page *int32 `json:"-"` // PageSize: the maximum number of clusters per page. PageSize *uint32 `json:"-"` // Name: the name on which to filter the returned clusters. Name *string `json:"-"` // Status: the status on which to filter the returned clusters. // Default value: unknown Status ClusterStatus `json:"-"` // Type: the 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: the total number of clusters. TotalCount uint32 `json:"total_count"` // Clusters: the 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: the cluster ID from which the nodes will be listed from. ClusterID string `json:"-"` // PoolID: the pool ID on which to filter the returned nodes. PoolID *string `json:"-"` // OrderBy: the sort order of the returned nodes. // Default value: created_at_asc OrderBy ListNodesRequestOrderBy `json:"-"` // Page: the page number for the returned nodes. Page *int32 `json:"-"` // PageSize: the maximum number of nodes per page. PageSize *uint32 `json:"-"` // Name: the name on which to filter the returned nodes. Name *string `json:"-"` // Status: the 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: the total number of nodes. TotalCount uint32 `json:"total_count"` // Nodes: the 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: the ID of the cluster from which the pools will be listed from. ClusterID string `json:"-"` // OrderBy: the sort order of the returned pools. // Default value: created_at_asc OrderBy ListPoolsRequestOrderBy `json:"-"` // Page: the page number for the returned pools. Page *int32 `json:"-"` // PageSize: the maximum number of pools per page. PageSize *uint32 `json:"-"` // Name: the name on which to filter the returned pools. Name *string `json:"-"` // Status: the 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: the total number of pools that exists for the cluster. TotalCount uint32 `json:"total_count"` // Pools: the 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: the available Kubernetes versions. Versions []*Version `json:"versions"` }
ListVersionsResponse: list versions response.
type MaintenanceWindow ¶
type MaintenanceWindow struct { // StartHour: the start hour of the 2-hour maintenance window. StartHour uint32 `json:"start_hour"` // Day: the 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: the ID of the node. ID string `json:"id"` // PoolID: the pool ID of the node. PoolID string `json:"pool_id"` // ClusterID: the cluster ID of the node. ClusterID string `json:"cluster_id"` // ProviderID: 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: the cluster region of the node. Region scw.Region `json:"region"` // Name: the name of the node. Name string `json:"name"` // Deprecated: PublicIPV4: the public IPv4 address of the node. PublicIPV4 *net.IP `json:"public_ip_v4,omitempty"` // Deprecated: PublicIPV6: the public IPv6 address of the node. PublicIPV6 *net.IP `json:"public_ip_v6,omitempty"` // Deprecated: Conditions: these conditions contains the Node Problem Detector conditions, as well as some in house conditions. Conditions *map[string]string `json:"conditions,omitempty"` // Status: the 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: the date at which the node was created. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: the 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: the ID of the pool. ID string `json:"id"` // ClusterID: the cluster ID of the pool. ClusterID string `json:"cluster_id"` // CreatedAt: the date at which the pool was created. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: the date at which the pool was last updated. UpdatedAt *time.Time `json:"updated_at"` // Name: the name of the pool. Name string `json:"name"` // Status: the status of the pool. // Default value: unknown Status PoolStatus `json:"status"` // Version: the version of the pool. Version string `json:"version"` // NodeType: the 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: the enablement of the autoscaling feature for the pool. Autoscaling bool `json:"autoscaling"` // Size: the size (number of nodes) of the pool. Size uint32 `json:"size"` // MinSize: the minimum size of the pool. Note that this field will be used only when autoscaling is enabled. MinSize uint32 `json:"min_size"` // MaxSize: the maximum size of the pool. Note that this field will be used only when autoscaling is enabled. MaxSize uint32 `json:"max_size"` // ContainerRuntime: the 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: the enablement of the autohealing feature for the pool. Autohealing bool `json:"autohealing"` // Tags: the tags associated with the pool. Tags []string `json:"tags"` // PlacementGroupID: the placement group ID in which all the nodes of the pool will be created. PlacementGroupID *string `json:"placement_group_id"` // KubeletArgs: the 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: the Pool upgrade policy. UpgradePolicy *PoolUpgradePolicy `json:"upgrade_policy"` // Zone: the Zone in which the Pool's node will be spawn in. Zone scw.Zone `json:"zone"` // RootVolumeType: 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: the system volume disk size. RootVolumeSize *scw.Size `json:"root_volume_size"` // Region: the 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 UpdateClusterRequest ¶
type UpdateClusterRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ClusterID: the ID of the cluster to update. ClusterID string `json:"-"` // Name: this field allows to update the external name of the cluster. The internal name (used for instance in hostname) won't change. Name *string `json:"name"` // Description: the new description of the cluster. Description *string `json:"description"` // Tags: the new tags associated with the cluster. Tags *[]string `json:"tags"` // AutoscalerConfig: this field allows to update some 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: the new value of the Kubernetes Dashboard enablement. EnableDashboard *bool `json:"enable_dashboard,omitempty"` // Deprecated: Ingress: the new Ingress Controller for the cluster. // Default value: unknown_ingress Ingress *Ingress `json:"ingress,omitempty"` // AutoUpgrade: the 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: this feature is in ALPHA state, it may be deleted or modified. This configuration enables to update the [OpenID Connect configuration](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens) 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: the 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. 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. 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. 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 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 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. 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: the ID of the pool to update. PoolID string `json:"-"` // Autoscaling: the new value for the enablement of autoscaling for the pool. Autoscaling *bool `json:"autoscaling"` // Size: the new size for the pool. Size *uint32 `json:"size"` // MinSize: the new minimun size for the pool. MinSize *uint32 `json:"min_size"` // MaxSize: the new maximum size for the pool. MaxSize *uint32 `json:"max_size"` // Autohealing: the new value for the enablement of autohealing for the pool. Autohealing *bool `json:"autohealing"` // Tags: the new tags associated with the pool. Tags *[]string `json:"tags"` // KubeletArgs: the 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: the Pool upgrade policy. 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: the ID of the cluster to upgrade. ClusterID string `json:"-"` // Version: the 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: this field makes the upgrade upgrades the pool once the Kubernetes master in upgrade. UpgradePools bool `json:"upgrade_pools"` }
type UpgradePoolRequest ¶
type UpgradePoolRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // PoolID: the ID of the pool to upgrade. PoolID string `json:"-"` // Version: the new Kubernetes version for the pool. Version string `json:"version"` }
type Version ¶
type Version struct { // Name: the name of the Kubernetes version. Name string `json:"name"` // Label: the label of the Kubernetes version. Label string `json:"label"` // Region: the region in which this version is available. Region scw.Region `json:"region"` // AvailableCnis: the supported Container Network Interface (CNI) plugins for this version. AvailableCnis []CNI `json:"available_cnis"` // Deprecated: AvailableIngresses: the supported Ingress Controllers for this version. AvailableIngresses *[]Ingress `json:"available_ingresses,omitempty"` // AvailableContainerRuntimes: the supported container runtimes for this version. AvailableContainerRuntimes []Runtime `json:"available_container_runtimes"` // AvailableFeatureGates: the supported feature gates for this version. AvailableFeatureGates []string `json:"available_feature_gates"` // AvailableAdmissionPlugins: the supported admission plugins for this version. AvailableAdmissionPlugins []string `json:"available_admission_plugins"` // AvailableKubeletArgs: the 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.