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) ListClusterAvailableTypes(req *ListClusterAvailableTypesRequest, opts ...scw.RequestOption) (*ListClusterAvailableTypesResponse, error)
- func (s *API) ListClusterAvailableVersions(req *ListClusterAvailableVersionsRequest, opts ...scw.RequestOption) (*ListClusterAvailableVersionsResponse, error)
- func (s *API) ListClusterTypes(req *ListClusterTypesRequest, opts ...scw.RequestOption) (*ListClusterTypesResponse, 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) MigrateToPrivateNetworkCluster(req *MigrateToPrivateNetworkClusterRequest, opts ...scw.RequestOption) (*Cluster, 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 ClusterType
- type ClusterTypeAvailability
- type ClusterTypeResiliency
- 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 ListClusterAvailableTypesRequest
- type ListClusterAvailableTypesResponse
- type ListClusterAvailableVersionsRequest
- type ListClusterAvailableVersionsResponse
- type ListClusterTypesRequest
- type ListClusterTypesResponse
- 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 MigrateToPrivateNetworkClusterRequest
- 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") // Cilium CNI will be configured (https://github.com/cilium/cilium) CNICilium = CNI("cilium") // Calico CNI will be configured (https://github.com/projectcalico/calico) CNICalico = CNI("calico") CNIWeave = CNI("weave") CNIFlannel = CNI("flannel") // Kilo CNI will be configured (https://github.com/squat/kilo/). Note that this CNI is only available for Kosmos clusters CNIKilo = CNI("kilo") )
const ( ClusterStatusUnknown = ClusterStatus("unknown") // Cluster is provisioning ClusterStatusCreating = ClusterStatus("creating") // Cluster is ready to use ClusterStatusReady = ClusterStatus("ready") // Cluster is waiting to be processed for deletion ClusterStatusDeleting = ClusterStatus("deleting") ClusterStatusDeleted = ClusterStatus("deleted") // Cluster is updating its own configuration, it can be a version upgrade too ClusterStatusUpdating = ClusterStatus("updating") // Cluster is locked because an abuse has been detected or reported ClusterStatusLocked = ClusterStatus("locked") // Cluster has no associated pool ClusterStatusPoolRequired = ClusterStatus("pool_required") )
const ( // Type is available in quantity ClusterTypeAvailabilityAvailable = ClusterTypeAvailability("available") // Limited availability ClusterTypeAvailabilityScarce = ClusterTypeAvailability("scarce") // Out of stock ClusterTypeAvailabilityShortage = ClusterTypeAvailability("shortage") )
const ( ClusterTypeResiliencyUnknownResiliency = ClusterTypeResiliency("unknown_resiliency") // The control plane is rescheduled on other machines in case of failure of a lower layer ClusterTypeResiliencyStandard = ClusterTypeResiliency("standard") // The control plane has replicas to ensure service continuity in case of failure of a lower layer. ClusterTypeResiliencyHighAvailability = ClusterTypeResiliency("high_availability") )
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") // Node is provisioning NodeStatusCreating = NodeStatus("creating") // Node is unable to connect to apiserver NodeStatusNotReady = NodeStatus("not_ready") // Node is ready to execute workload (marked schedulable by k8s scheduler) NodeStatusReady = NodeStatus("ready") // Node is waiting to be processed for deletion NodeStatusDeleting = NodeStatus("deleting") NodeStatusDeleted = NodeStatus("deleted") // Node is locked because an abuse has been detected or reported NodeStatusLocked = NodeStatus("locked") // Node is rebooting NodeStatusRebooting = NodeStatus("rebooting") NodeStatusCreationError = NodeStatus("creation_error") NodeStatusUpgrading = NodeStatus("upgrading") NodeStatusStarting = NodeStatus("starting") NodeStatusRegistering = NodeStatus("registering") )
const ( PoolStatusUnknown = PoolStatus("unknown") // Pool has the right amount of nodes and is ready to process the workload PoolStatusReady = PoolStatus("ready") // Pool is waiting to be processed for deletion PoolStatusDeleting = PoolStatus("deleting") PoolStatusDeleted = PoolStatus("deleted") // Pool is growing or shrinking PoolStatusScaling = PoolStatus("scaling") PoolStatusWarning = PoolStatus("warning") // Pool is locked because an abuse has been detected or reported PoolStatusLocked = PoolStatus("locked") // Pool is upgrading its Kubernetes version PoolStatusUpgrading = PoolStatus("upgrading") )
const ( PoolVolumeTypeDefaultVolumeType = PoolVolumeType("default_volume_type") // Local Block Storage: your system is stored locally on your node hypervisor. Lower latency, no persistence across node replacements PoolVolumeTypeLSSD = PoolVolumeType("l_ssd") // Remote Block Storage: your system is stored on a centralized and resilient cluster. Higher latency, persistence across node replacements PoolVolumeTypeBSSD = PoolVolumeType("b_ssd") )
const ( RuntimeUnknownRuntime = Runtime("unknown_runtime") RuntimeDocker = Runtime("docker") // Containerd Runtime will be configured (https://github.com/containerd/containerd) 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: kubernetes 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 in a Scaleway region.
func (*API) CreateExternalNode ¶
func (s *API) CreateExternalNode(req *CreateExternalNodeRequest, opts ...scw.RequestOption) (*ExternalNode, error)
CreateExternalNode: create a Kosmos node. Retrieve metadata for a Kosmos node. This method is not intended to be called by end users but rather programmatically 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 Kubernetes cluster and all its associated pools and nodes. Note that this method will not delete any Load Balancer or Block Volume 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 (such as in a one-node cluster), disruption of your applications can be expected.
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. Note that all the pool's nodes will also be deleted.
func (*API) GetCluster ¶
func (s *API) GetCluster(req *GetClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
GetCluster: get a Cluster. Retrieve information 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. Retrieve 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. Retrieve 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 a Version. Retrieve a specific Kubernetes version and its details.
func (*API) ListClusterAvailableTypes ¶
func (s *API) ListClusterAvailableTypes(req *ListClusterAvailableTypesRequest, opts ...scw.RequestOption) (*ListClusterAvailableTypesResponse, error)
ListClusterAvailableTypes: list available cluster types for a cluster. List the cluster types that a specific Kubernetes cluster is allowed to switch to.
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 include 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) ListClusterTypes ¶
func (s *API) ListClusterTypes(req *ListClusterTypesRequest, opts ...scw.RequestOption) (*ListClusterTypesResponse, error)
ListClusterTypes: list cluster types. List available cluster types and their technical details.
func (*API) ListClusters ¶
func (s *API) ListClusters(req *ListClustersRequest, opts ...scw.RequestOption) (*ListClustersResponse, error)
ListClusters: list Clusters. List all existing Kubernetes clusters in a specific region.
func (*API) ListNodes ¶
func (s *API) ListNodes(req *ListNodesRequest, opts ...scw.RequestOption) (*ListNodesResponse, error)
ListNodes: list 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 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) MigrateToPrivateNetworkCluster ¶
func (s *API) MigrateToPrivateNetworkCluster(req *MigrateToPrivateNetworkClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
MigrateToPrivateNetworkCluster: migrate an existing cluster to a Private Network cluster. Migrate a cluster that was created before the release of Private Network clusters to a new one with a Private Network.
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. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected.
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 first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected.
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 revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download kubeconfig again to keep interacting with the cluster.
func (*API) SetClusterType ¶
func (s *API) SetClusterType(req *SetClusterTypeRequest, opts ...scw.RequestOption) (*Cluster, error)
SetClusterType: change the Cluster type. Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the `type` field, [list available cluster types](#path-clusters-list-available-cluster-types-for-a-cluster).
func (*API) UpdateCluster ¶
func (s *API) UpdateCluster(req *UpdateClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
UpdateCluster: update a Cluster. Update information on a specific Kubernetes cluster. You can update details such as its name, description, tags and configuration. To upgrade a cluster, you will need to 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 the attributes of a specific pool, such as its desired 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 possibly 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 it only works if the targeted version matches the cluster's version.
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: cluster ID. ID string `json:"id"` // Type: cluster type. Type string `json:"type"` // Name: cluster name. 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: cluster description. Description string `json:"description"` // ClusterURL: kubernetes API server URL of the cluster. ClusterURL string `json:"cluster_url"` // DNSWildcard: wildcard DNS resolving all the ready cluster nodes. DNSWildcard string `json:"dns_wildcard"` // CreatedAt: date on which the cluster was created. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: date on 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: managed Ingress controller used in the cluster (deprecated feature). // 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: 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"` // CommitmentEndsAt: date on which it will be possible to switch to a smaller offer. CommitmentEndsAt *time.Time `json:"commitment_ends_at"` }
Cluster: cluster.
type ClusterAutoUpgrade ¶
type ClusterAutoUpgrade struct { // Enabled: defines whether 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. They can be killed without any consideration during scale down and they won'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 to be scaled down. ScaleDownUnneededTime string `json:"scale_down_unneeded_time"` // ScaleDownUtilizationThreshold: node utilization level, defined as a 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 using 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". 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. The default is `sub`, which is expected to be the end user's unique identifier. 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 name collision. UsernameClaim string `json:"username_claim"` // UsernamePrefix: prefix prepended to username claims to prevent name collision (such as `system:` users). For example, the value `oidc:` will create usernames like `oidc:jane.doe`. If this flag is not 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 name collision (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 describing 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 ClusterType ¶
type ClusterType struct { // Name: cluster type name. Name string `json:"name"` // Availability: cluster type availability. // Default value: available Availability ClusterTypeAvailability `json:"availability"` // MaxNodes: maximum number of nodes supported by the offer. MaxNodes uint32 `json:"max_nodes"` // CommitmentDelay: time period during which you can no longer switch to a lower offer. CommitmentDelay *scw.Duration `json:"commitment_delay"` // SLA: value of the Service Level Agreement of the offer. SLA float32 `json:"sla"` // Resiliency: resiliency offered by the offer. // Default value: unknown_resiliency Resiliency ClusterTypeResiliency `json:"resiliency"` // Memory: max RAM allowed for the control plane. Memory scw.Size `json:"memory"` // Dedicated: returns information if this offer uses dedicated resources. Dedicated bool `json:"dedicated"` }
ClusterType: cluster type.
type ClusterTypeAvailability ¶
type ClusterTypeAvailability string
func (ClusterTypeAvailability) MarshalJSON ¶
func (enum ClusterTypeAvailability) MarshalJSON() ([]byte, error)
func (ClusterTypeAvailability) String ¶
func (enum ClusterTypeAvailability) String() string
func (*ClusterTypeAvailability) UnmarshalJSON ¶
func (enum *ClusterTypeAvailability) UnmarshalJSON(data []byte) error
type ClusterTypeResiliency ¶
type ClusterTypeResiliency string
func (ClusterTypeResiliency) MarshalJSON ¶
func (enum ClusterTypeResiliency) MarshalJSON() ([]byte, error)
func (ClusterTypeResiliency) String ¶
func (enum ClusterTypeResiliency) String() string
func (*ClusterTypeResiliency) UnmarshalJSON ¶
func (enum *ClusterTypeResiliency) 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 (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16). Type string `json:"type"` // Name: cluster name. Name string `json:"name"` // Description: cluster description. 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 running in the cluster. // Default value: unknown_cni Cni CNI `json:"cni"` // Deprecated: EnableDashboard: defines whether the Kubernetes Dashboard is enabled in the cluster. EnableDashboard *bool `json:"enable_dashboard,omitempty"` // Deprecated: Ingress: ingress Controller running in the cluster (deprecated feature). // Default value: unknown_ingress Ingress *Ingress `json:"ingress,omitempty"` // Pools: pools created along with the cluster. Pools []*CreateClusterRequestPoolConfig `json:"pools"` // AutoscalerConfig: autoscaler configuration for the cluster. It allows you to set (to an extent) your preferred autoscaler configuration, 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. 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: defines whether 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. They can be killed without any consideration during scale down and they won'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 to be scaled down. ScaleDownUnneededTime *string `json:"scale_down_unneeded_time"` // ScaleDownUtilizationThreshold: node utilization level, defined as a 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 using 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". 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. The default is `sub`, which is expected to be the end user's unique identifier. 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 name collision. UsernameClaim *string `json:"username_claim"` // UsernamePrefix: prefix prepended to username claims to prevent name collision (such as `system:` users). For example, the value `oidc:` will create usernames like `oidc:jane.doe`. If this flag is not 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 name collision (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 describing 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. 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 in a Kosmos Cluster. 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: defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool. MinSize *uint32 `json:"min_size"` // MaxSize: defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool. MaxSize *uint32 `json:"max_size"` // ContainerRuntime: customization of the container runtime is available for each pool. Note that `docker` has been deprecated since version 1.20 and will be removed by version 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 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: defines the system volume disk type. Two different types of volume (`volume_type`) are provided: `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. `b_ssd` is a remote block storage which means your system is stored on a centralized 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: cluster ID to which the pool will be attached. ClusterID string `json:"-"` // Name: pool name. Name string `json:"name"` // NodeType: 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 in a Kosmos Cluster. 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: defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool. MinSize *uint32 `json:"min_size"` // MaxSize: defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool. MaxSize *uint32 `json:"max_size"` // ContainerRuntime: customization of the container runtime is available for each pool. Note that `docker` has been deprecated since version 1.20 and will be removed by version 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 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: defines the system volume disk type. Two different types of volume (`volume_type`) are provided: `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. `b_ssd` is a remote block storage which means your system is stored on a centralized 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: defines whether all volumes (including retain volume type), empty Private Networks and Load Balancers with a name starting with the cluster ID will also be deleted. 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 ExternalNode struct { ID string `json:"id"` Name string `json:"name"` ClusterURL string `json:"cluster_url"` PoolVersion string `json:"pool_version"` ClusterCa string `json:"cluster_ca"` KubeToken string `json:"kube_token"` KubeletConfig string `json:"kubelet_config"` ExternalIP string `json:"external_ip"` }
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 ListClusterAvailableTypesResponse ¶
type ListClusterAvailableTypesResponse struct { // ClusterTypes: available cluster types for the cluster. ClusterTypes []*ClusterType `json:"cluster_types"` // TotalCount: total number of types. TotalCount uint32 `json:"total_count"` }
ListClusterAvailableTypesResponse: list cluster available types response.
type ListClusterAvailableVersionsResponse ¶
type ListClusterAvailableVersionsResponse struct { // Versions: available Kubernetes versions for the cluster. Versions []*Version `json:"versions"` }
ListClusterAvailableVersionsResponse: list cluster available versions response.
type ListClusterTypesRequest ¶
type ListClusterTypesRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // Page: page number, from the paginated results, to return for cluster-types. Page *int32 `json:"-"` // PageSize: maximum number of clusters per page. PageSize *uint32 `json:"-"` }
type ListClusterTypesResponse ¶
type ListClusterTypesResponse struct { // TotalCount: total number of cluster-types. TotalCount uint32 `json:"total_count"` // ClusterTypes: paginated returned cluster-types. ClusterTypes []*ClusterType `json:"cluster_types"` }
ListClusterTypesResponse: list cluster types response.
func (*ListClusterTypesResponse) UnsafeAppend ¶
func (r *ListClusterTypesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListClusterTypesResponse) UnsafeGetTotalCount ¶
func (r *ListClusterTypesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
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 returned clusters. // Default value: created_at_asc OrderBy ListClustersRequestOrderBy `json:"-"` // Page: page number to return for clusters, from the paginated results. Page *int32 `json:"-"` // PageSize: maximum number of clusters per page. PageSize *uint32 `json:"-"` // Name: name to filter on, only clusters containing this substring in their name will be returned. Name *string `json:"-"` // Status: status to filter on, only clusters with this status will be returned. // Default value: unknown Status ClusterStatus `json:"-"` // Type: type to filter on, only clusters with this type will be returned. 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 to filter on, only nodes containing this substring in their name will be returned. Name *string `json:"-"` // Status: status to filter on, only nodes with this status will be returned. // 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 whose pools will be listed. ClusterID string `json:"-"` // OrderBy: sort order of 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 to filter on, only pools containing this substring in their name will be returned. Name *string `json:"-"` // Status: status to filter on, only pools with this status will be returned. // 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 MigrateToPrivateNetworkClusterRequest ¶
type MigrateToPrivateNetworkClusterRequest 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. ClusterID string `json:"-"` // PrivateNetworkID: ID of the Private Network to link to the cluster. PrivateNetworkID string `json:"private_network_id"` }
type Node ¶
type Node struct { // ID: node ID. 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 contain 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 occurred 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 on 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: pool ID. ID string `json:"id"` // ClusterID: cluster ID of the pool. ClusterID string `json:"cluster_id"` // CreatedAt: date on which the pool was created. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: date on which the pool was last updated. UpdatedAt *time.Time `json:"updated_at"` // Name: pool name. Name string `json:"name"` // Status: pool status. // Default value: unknown Status PoolStatus `json:"status"` // Version: pool version. Version string `json:"version"` // NodeType: 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 in a Kosmos Cluster. 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: defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool. MinSize uint32 `json:"min_size"` // MaxSize: defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool. MaxSize uint32 `json:"max_size"` // ContainerRuntime: customization of the container runtime is available for each pool. Note that `docker` has been deprecated since version 1.20 and will be removed by version 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 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: defines the system volume disk type. Two different types of volume (`volume_type`) are provided: `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. `b_ssd` is a remote block storage which means your system is stored on a centralized 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. 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 for the cluster. Name *string `json:"name"` // Description: new description for the cluster. Description *string `json:"description"` // Tags: new tags associated with the cluster. Tags *[]string `json:"tags"` // AutoscalerConfig: new autoscaler config for the cluster. AutoscalerConfig *UpdateClusterRequestAutoscalerConfig `json:"autoscaler_config"` // Deprecated: EnableDashboard: new value for the Kubernetes Dashboard enablement. EnableDashboard *bool `json:"enable_dashboard,omitempty"` // Deprecated: Ingress: new Ingress Controller for the cluster (deprecated feature). // Default value: unknown_ingress Ingress *Ingress `json:"ingress,omitempty"` // AutoUpgrade: new auto upgrade configuration for 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: defines whether 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. They can be killed without any consideration during scale down and they won'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 to be scaled down. ScaleDownUnneededTime *string `json:"scale_down_unneeded_time"` // ScaleDownUtilizationThreshold: node utilization level, defined as a 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 using 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". 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. The default is `sub`, which is expected to be the end user's unique identifier. 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 name collision. UsernameClaim *string `json:"username_claim"` // UsernamePrefix: prefix prepended to username claims to prevent name collision (such as `system:` users). For example, the value `oidc:` will create usernames like `oidc:jane.doe`. If this flag is not 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 name collision (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 describing 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 pool autoscaling enablement. Autoscaling *bool `json:"autoscaling"` // Size: new desired pool size. Size *uint32 `json:"size"` // MinSize: new minimum 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 pool autohealing enablement. 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 experimental. KubeletArgs *map[string]string `json:"kubelet_args"` // UpgradePolicy: new 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. Note that the version should 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: defines whether pools will also be upgraded 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.