Documentation
¶
Overview ¶
Package k8s provides methods and message types of the k8s v1beta4 API.
Index ¶
- Constants
- type API
- func (s *API) CreateCluster(req *CreateClusterRequest, opts ...scw.RequestOption) (*Cluster, 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) 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) 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) ReplaceNode(req *ReplaceNodeRequest, opts ...scw.RequestOption) (*Node, error)
- 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) (*Cluster, error)
- func (s *API) WaitForPool(req *WaitForPoolRequest) (*Pool, error)
- type AutoscalerEstimator
- type AutoscalerExpander
- type CNI
- type Cluster
- type ClusterAutoUpgrade
- type ClusterAutoscalerConfig
- type ClusterStatus
- type CreateClusterRequest
- type CreateClusterRequestAutoUpgrade
- type CreateClusterRequestAutoscalerConfig
- type CreateClusterRequestDefaultPoolConfig
- type CreatePoolRequest
- type DeleteClusterRequest
- type DeletePoolRequest
- type GetClusterKubeConfigRequest
- type GetClusterRequest
- type GetNodeRequest
- type GetPoolRequest
- 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 RebootNodeRequest
- type ReplaceNodeRequest
- type ResetClusterAdminTokenRequest
- type Runtime
- type UpdateClusterRequest
- type UpdateClusterRequestAutoUpgrade
- type UpdateClusterRequestAutoscalerConfig
- type UpdatePoolRequest
- type UpgradeClusterRequest
- type UpgradePoolRequest
- type Version
- type WaitForClusterRequest
- type WaitForPoolRequest
Constants ¶
const ( // AutoscalerEstimatorUnknownEstimator is [insert doc]. AutoscalerEstimatorUnknownEstimator = AutoscalerEstimator("unknown_estimator") // AutoscalerEstimatorBinpacking is [insert doc]. AutoscalerEstimatorBinpacking = AutoscalerEstimator("binpacking") // AutoscalerEstimatorOldbinpacking is [insert doc]. AutoscalerEstimatorOldbinpacking = AutoscalerEstimator("oldbinpacking") )
const ( // AutoscalerExpanderUnknownExpander is [insert doc]. AutoscalerExpanderUnknownExpander = AutoscalerExpander("unknown_expander") // AutoscalerExpanderRandom is [insert doc]. AutoscalerExpanderRandom = AutoscalerExpander("random") // AutoscalerExpanderMostPods is [insert doc]. AutoscalerExpanderMostPods = AutoscalerExpander("most_pods") // AutoscalerExpanderLeastWaste is [insert doc]. AutoscalerExpanderLeastWaste = AutoscalerExpander("least_waste") // AutoscalerExpanderPriority is [insert doc]. AutoscalerExpanderPriority = AutoscalerExpander("priority") )
const ( // CNIUnknownCni is [insert doc]. CNIUnknownCni = CNI("unknown_cni") // CNICilium is [insert doc]. CNICilium = CNI("cilium") // CNICalico is [insert doc]. CNICalico = CNI("calico") // CNIWeave is [insert doc]. CNIWeave = CNI("weave") // CNIFlannel is [insert doc]. CNIFlannel = CNI("flannel") )
const ( // ClusterStatusUnknown is [insert doc]. ClusterStatusUnknown = ClusterStatus("unknown") // ClusterStatusCreating is [insert doc]. ClusterStatusCreating = ClusterStatus("creating") // ClusterStatusReady is [insert doc]. ClusterStatusReady = ClusterStatus("ready") // ClusterStatusDeleting is [insert doc]. ClusterStatusDeleting = ClusterStatus("deleting") // ClusterStatusDeleted is [insert doc]. ClusterStatusDeleted = ClusterStatus("deleted") // ClusterStatusUpdating is [insert doc]. ClusterStatusUpdating = ClusterStatus("updating") // ClusterStatusWarning is [insert doc]. ClusterStatusWarning = ClusterStatus("warning") // ClusterStatusError is [insert doc]. ClusterStatusError = ClusterStatus("error") // ClusterStatusLocked is [insert doc]. ClusterStatusLocked = ClusterStatus("locked") )
const ( // IngressUnknownIngress is [insert doc]. IngressUnknownIngress = Ingress("unknown_ingress") // IngressNone is [insert doc]. IngressNone = Ingress("none") // IngressNginx is [insert doc]. IngressNginx = Ingress("nginx") // IngressTraefik is [insert doc]. IngressTraefik = Ingress("traefik") )
const ( // ListClustersRequestOrderByCreatedAtAsc is [insert doc]. ListClustersRequestOrderByCreatedAtAsc = ListClustersRequestOrderBy("created_at_asc") // ListClustersRequestOrderByCreatedAtDesc is [insert doc]. ListClustersRequestOrderByCreatedAtDesc = ListClustersRequestOrderBy("created_at_desc") // ListClustersRequestOrderByUpdatedAtAsc is [insert doc]. ListClustersRequestOrderByUpdatedAtAsc = ListClustersRequestOrderBy("updated_at_asc") // ListClustersRequestOrderByUpdatedAtDesc is [insert doc]. ListClustersRequestOrderByUpdatedAtDesc = ListClustersRequestOrderBy("updated_at_desc") // ListClustersRequestOrderByNameAsc is [insert doc]. ListClustersRequestOrderByNameAsc = ListClustersRequestOrderBy("name_asc") // ListClustersRequestOrderByNameDesc is [insert doc]. ListClustersRequestOrderByNameDesc = ListClustersRequestOrderBy("name_desc") // ListClustersRequestOrderByStatusAsc is [insert doc]. ListClustersRequestOrderByStatusAsc = ListClustersRequestOrderBy("status_asc") // ListClustersRequestOrderByStatusDesc is [insert doc]. ListClustersRequestOrderByStatusDesc = ListClustersRequestOrderBy("status_desc") // ListClustersRequestOrderByVersionAsc is [insert doc]. ListClustersRequestOrderByVersionAsc = ListClustersRequestOrderBy("version_asc") // ListClustersRequestOrderByVersionDesc is [insert doc]. ListClustersRequestOrderByVersionDesc = ListClustersRequestOrderBy("version_desc") )
const ( // ListNodesRequestOrderByCreatedAtAsc is [insert doc]. ListNodesRequestOrderByCreatedAtAsc = ListNodesRequestOrderBy("created_at_asc") // ListNodesRequestOrderByCreatedAtDesc is [insert doc]. ListNodesRequestOrderByCreatedAtDesc = ListNodesRequestOrderBy("created_at_desc") )
const ( // ListPoolsRequestOrderByCreatedAtAsc is [insert doc]. ListPoolsRequestOrderByCreatedAtAsc = ListPoolsRequestOrderBy("created_at_asc") // ListPoolsRequestOrderByCreatedAtDesc is [insert doc]. ListPoolsRequestOrderByCreatedAtDesc = ListPoolsRequestOrderBy("created_at_desc") // ListPoolsRequestOrderByUpdatedAtAsc is [insert doc]. ListPoolsRequestOrderByUpdatedAtAsc = ListPoolsRequestOrderBy("updated_at_asc") // ListPoolsRequestOrderByUpdatedAtDesc is [insert doc]. ListPoolsRequestOrderByUpdatedAtDesc = ListPoolsRequestOrderBy("updated_at_desc") // ListPoolsRequestOrderByNameAsc is [insert doc]. ListPoolsRequestOrderByNameAsc = ListPoolsRequestOrderBy("name_asc") // ListPoolsRequestOrderByNameDesc is [insert doc]. ListPoolsRequestOrderByNameDesc = ListPoolsRequestOrderBy("name_desc") // ListPoolsRequestOrderByStatusAsc is [insert doc]. ListPoolsRequestOrderByStatusAsc = ListPoolsRequestOrderBy("status_asc") // ListPoolsRequestOrderByStatusDesc is [insert doc]. ListPoolsRequestOrderByStatusDesc = ListPoolsRequestOrderBy("status_desc") // ListPoolsRequestOrderByVersionAsc is [insert doc]. ListPoolsRequestOrderByVersionAsc = ListPoolsRequestOrderBy("version_asc") // ListPoolsRequestOrderByVersionDesc is [insert doc]. ListPoolsRequestOrderByVersionDesc = ListPoolsRequestOrderBy("version_desc") )
const ( // MaintenanceWindowDayOfTheWeekAny is [insert doc]. MaintenanceWindowDayOfTheWeekAny = MaintenanceWindowDayOfTheWeek("any") // MaintenanceWindowDayOfTheWeekMonday is [insert doc]. MaintenanceWindowDayOfTheWeekMonday = MaintenanceWindowDayOfTheWeek("monday") // MaintenanceWindowDayOfTheWeekTuesday is [insert doc]. MaintenanceWindowDayOfTheWeekTuesday = MaintenanceWindowDayOfTheWeek("tuesday") // MaintenanceWindowDayOfTheWeekWednesday is [insert doc]. MaintenanceWindowDayOfTheWeekWednesday = MaintenanceWindowDayOfTheWeek("wednesday") // MaintenanceWindowDayOfTheWeekThursday is [insert doc]. MaintenanceWindowDayOfTheWeekThursday = MaintenanceWindowDayOfTheWeek("thursday") // MaintenanceWindowDayOfTheWeekFriday is [insert doc]. MaintenanceWindowDayOfTheWeekFriday = MaintenanceWindowDayOfTheWeek("friday") // MaintenanceWindowDayOfTheWeekSaturday is [insert doc]. MaintenanceWindowDayOfTheWeekSaturday = MaintenanceWindowDayOfTheWeek("saturday") // MaintenanceWindowDayOfTheWeekSunday is [insert doc]. MaintenanceWindowDayOfTheWeekSunday = MaintenanceWindowDayOfTheWeek("sunday") )
const ( // NodeStatusUnknown is [insert doc]. NodeStatusUnknown = NodeStatus("unknown") // NodeStatusCreating is [insert doc]. NodeStatusCreating = NodeStatus("creating") // NodeStatusRebuilding is [insert doc]. NodeStatusRebuilding = NodeStatus("rebuilding") // NodeStatusNotready is [insert doc]. NodeStatusNotready = NodeStatus("notready") // NodeStatusReady is [insert doc]. NodeStatusReady = NodeStatus("ready") // NodeStatusDeleting is [insert doc]. NodeStatusDeleting = NodeStatus("deleting") // NodeStatusDeleted is [insert doc]. NodeStatusDeleted = NodeStatus("deleted") // NodeStatusWarning is [insert doc]. NodeStatusWarning = NodeStatus("warning") // NodeStatusError is [insert doc]. NodeStatusError = NodeStatus("error") // NodeStatusLocked is [insert doc]. NodeStatusLocked = NodeStatus("locked") // NodeStatusRebooting is [insert doc]. NodeStatusRebooting = NodeStatus("rebooting") // NodeStatusCreationError is [insert doc]. NodeStatusCreationError = NodeStatus("creation_error") )
const ( // PoolStatusUnknown is [insert doc]. PoolStatusUnknown = PoolStatus("unknown") // PoolStatusCreating is [insert doc]. PoolStatusCreating = PoolStatus("creating") // PoolStatusReady is [insert doc]. PoolStatusReady = PoolStatus("ready") // PoolStatusDeleting is [insert doc]. PoolStatusDeleting = PoolStatus("deleting") // PoolStatusDeleted is [insert doc]. PoolStatusDeleted = PoolStatus("deleted") // PoolStatusUpdating is [insert doc]. PoolStatusUpdating = PoolStatus("updating") // PoolStatusScaling is [insert doc]. PoolStatusScaling = PoolStatus("scaling") // PoolStatusWarning is [insert doc]. PoolStatusWarning = PoolStatus("warning") // PoolStatusError is [insert doc]. PoolStatusError = PoolStatus("error") // PoolStatusLocked is [insert doc]. PoolStatusLocked = PoolStatus("locked") // PoolStatusUpgrading is [insert doc]. PoolStatusUpgrading = PoolStatus("upgrading") )
const ( // RuntimeUnknownRuntime is [insert doc]. RuntimeUnknownRuntime = Runtime("unknown_runtime") // RuntimeDocker is [insert doc]. RuntimeDocker = Runtime("docker") // RuntimeContainerd is [insert doc]. RuntimeContainerd = Runtime("containerd") // RuntimeCrio is [insert doc]. 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 this API allows you to manage your kapsule clusters
func (*API) CreateCluster ¶
func (s *API) CreateCluster(req *CreateClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
CreateCluster create a new cluster
This method allows to create a new Kubernetes cluster on an account.
func (*API) CreatePool ¶
func (s *API) CreatePool(req *CreatePoolRequest, opts ...scw.RequestOption) (*Pool, error)
CreatePool create a new pool in a cluster
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 delete a cluster
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) DeletePool ¶
func (s *API) DeletePool(req *DeletePoolRequest, opts ...scw.RequestOption) (*Pool, error)
DeletePool delete a pool in a cluster
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 get a cluster
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 get a node in a cluster
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 get a pool in a cluster
This method allows to get details about a specific pool.
func (*API) ListClusterAvailableVersions ¶
func (s *API) ListClusterAvailableVersions(req *ListClusterAvailableVersionsRequest, opts ...scw.RequestOption) (*ListClusterAvailableVersionsResponse, error)
ListClusterAvailableVersions list available versions for a cluster
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 list all the clusters
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 list all the nodes in a cluster
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 list all the pools in a cluster
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 list all available versions
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 reboot a node in a cluster
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 ¶
func (s *API) ReplaceNode(req *ReplaceNodeRequest, opts ...scw.RequestOption) (*Node, error)
ReplaceNode replace a node in a cluster
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 reset the admin token of a cluster
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 update a cluster
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 update a pool in a cluster
This method allows to update a specific pool.
func (*API) UpgradeCluster ¶
func (s *API) UpgradeCluster(req *UpgradeClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
UpgradeCluster upgrade a cluster
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 upgrade a pool in a cluster
This method allows to upgrade 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) (*Cluster, error)
WaitForCluster waits for the cluster to be in a "terminal state" before returning.
func (*API) WaitForPool ¶
func (s *API) WaitForPool(req *WaitForPoolRequest) (*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"` // Region the region in which is the cluster Region scw.Region `json:"region"` // Name the name of the cluster Name string `json:"name"` // Description the description of the cluster Description string `json:"description"` // OrganizationID the ID of the organization owning the cluster OrganizationID string `json:"organization_id"` // Tags the tags associated to the cluster Tags []string `json:"tags"` // Status the status of the cluster // // Default value: unknown Status ClusterStatus `json:"status"` // Version the Kubernetes version of the cluster Version string `json:"version"` // Cni the Container Network Interface (CNI) plugin running in the cluster // // Default value: unknown_cni Cni CNI `json:"cni"` // 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"` // CurrentCoreCount the total number of cores of all the nodes in the cluster CurrentCoreCount uint32 `json:"current_core_count"` // CurrentNodeCount the total number of nodes in the cluster CurrentNodeCount uint32 `json:"current_node_count"` // CurrentMemCount the total amount of memory of all the nodes in the cluster CurrentMemCount uint64 `json:"current_mem_count"` // AutoscalerConfig the autoscaler config for the cluster AutoscalerConfig *ClusterAutoscalerConfig `json:"autoscaler_config"` // DashboardEnabled the enablement of the Kubernetes Dashboard in the cluster DashboardEnabled bool `json:"dashboard_enabled"` // Ingress the ingress controller used in the cluster // // Default value: unknown_ingress Ingress Ingress `json:"ingress"` // AutoUpgrade the auo 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"` }
Cluster cluster
type ClusterAutoUpgrade ¶
type ClusterAutoUpgrade struct { Enabled bool `json:"enabled"` MaintenanceWindow *MaintenanceWindow `json:"maintenance_window"` }
type ClusterAutoscalerConfig ¶
type ClusterAutoscalerConfig struct { ScaleDownDisabled bool `json:"scale_down_disabled"` ScaleDownDelayAfterAdd string `json:"scale_down_delay_after_add"` // Estimator // // Default value: unknown_estimator Estimator AutoscalerEstimator `json:"estimator"` // Expander // // Default value: unknown_expander Expander AutoscalerExpander `json:"expander"` IgnoreDaemonsetsUtilization bool `json:"ignore_daemonsets_utilization"` BalanceSimilarNodeGroups bool `json:"balance_similar_node_groups"` ExpendablePodsPriorityCutoff int32 `json:"expendable_pods_priority_cutoff"` }
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 scw.Region `json:"-"` // OrganizationID the organization ID where the cluster will be created OrganizationID string `json:"organization_id"` // 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"` // EnableDashboard the enablement of the Kubernetes Dashboard in the cluster EnableDashboard bool `json:"enable_dashboard"` // Ingress the Ingress Controller that will run in the cluster // // Default value: unknown_ingress Ingress Ingress `json:"ingress"` // DefaultPoolConfig the config of the defaul pool of the cluster DefaultPoolConfig *CreateClusterRequestDefaultPoolConfig `json:"default_pool_config"` // AutoscalerConfig the autoscaler config for the cluster // // This field allows to specify some configuration for the autoscaler, which is an implementation of the [cluster-autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/). AutoscalerConfig *CreateClusterRequestAutoscalerConfig `json:"autoscaler_config"` // AutoUpgrade the auo upgrade configuration of the cluster // // This configuratiom enables to set a speicific 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"` }
type CreateClusterRequestAutoUpgrade ¶
type CreateClusterRequestAutoUpgrade struct { Enable bool `json:"enable"` MaintenanceWindow *MaintenanceWindow `json:"maintenance_window"` }
type CreateClusterRequestAutoscalerConfig ¶
type CreateClusterRequestAutoscalerConfig struct { ScaleDownDisabled *bool `json:"scale_down_disabled"` ScaleDownDelayAfterAdd *string `json:"scale_down_delay_after_add"` // Estimator // // Default value: unknown_estimator Estimator AutoscalerEstimator `json:"estimator"` // Expander // // Default value: unknown_expander Expander AutoscalerExpander `json:"expander"` IgnoreDaemonsetsUtilization *bool `json:"ignore_daemonsets_utilization"` BalanceSimilarNodeGroups *bool `json:"balance_similar_node_groups"` ExpendablePodsPriorityCutoff *int32 `json:"expendable_pods_priority_cutoff"` }
type CreateClusterRequestDefaultPoolConfig ¶
type CreateClusterRequestDefaultPoolConfig struct { NodeType string `json:"node_type"` PlacementGroupID *string `json:"placement_group_id"` Autoscaling bool `json:"autoscaling"` Size uint32 `json:"size"` MinSize *uint32 `json:"min_size"` MaxSize *uint32 `json:"max_size"` // ContainerRuntime // // Default value: unknown_runtime ContainerRuntime Runtime `json:"container_runtime"` Autohealing bool `json:"autohealing"` Tags []string `json:"tags"` }
type CreatePoolRequest ¶
type CreatePoolRequest struct { 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 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 minimun size of the pool // // The minimun size of the pool. Note that this fields will be used only when autoscaling is enabled. MinSize *uint32 `json:"min_size"` // MaxSize the maximum size of the pool // // The maximum size of the pool. Note that this fields will be used only when autoscaling is enabled. MaxSize *uint32 `json:"max_size"` // ContainerRuntime the container runtime for the nodes of the pool // // The customization of the container runtime is available for each pool. Note that `docker` is the only supporter runtime at the moment. Others are to be considered experimental. // // 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"` }
type DeleteClusterRequest ¶
type DeletePoolRequest ¶
type GetClusterRequest ¶
type GetNodeRequest ¶
type GetPoolRequest ¶
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 []byte `yaml:"client-certificate-data,omitempty"` ClientKeyData []byte `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 scw.Region `json:"-"` // OrganizationID the organization ID on which to filter the returned clusters OrganizationID *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 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 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 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 uint32 `json:"start_hour"` // Day // // Default value: any Day MaintenanceWindowDayOfTheWeek `json:"day"` }
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"` // Region the cluster region of the node Region scw.Region `json:"region"` // Name the name of the node Name string `json:"name"` // PublicIPV4 the public IPv4 address of the node PublicIPV4 *net.IP `json:"public_ip_v4"` // PublicIPV6 the public IPv6 address of the node PublicIPV6 *net.IP `json:"public_ip_v6"` // Conditions the conditions of the node // // These conditions contains the Node Problem Detector conditions, as well as some in house conditions. Conditions map[string]string `json:"conditions"` // Status the status of the node // // Default value: unknown Status NodeStatus `json:"status"` // 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"` // CurrentNodeCount the total number of nodes in the pool CurrentNodeCount uint32 `json:"current_node_count"` // 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 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 minimun size of the pool // // The minimun size of the pool. Note that this fields will be used only when autoscaling is enabled. MinSize uint32 `json:"min_size"` // MaxSize the maximum size of the pool // // The maximum size of the pool. Note that this fields will be used only when autoscaling is enabled. MaxSize uint32 `json:"max_size"` // CurrentCoreCount the total number of cores of all the nodes in the pool CurrentCoreCount uint32 `json:"current_core_count"` // CurrentMemCount the total amount of memory of all the nodes in the pool CurrentMemCount uint64 `json:"current_mem_count"` // ContainerRuntime the container runtime for the nodes of the pool // // The customization of the container runtime is available for each pool. Note that `docker` is the only supporter runtime at the moment. Others are to be considered experimental. // // 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"` // 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 RebootNodeRequest ¶
type ReplaceNodeRequest ¶
type UpdateClusterRequest ¶
type UpdateClusterRequest struct { Region scw.Region `json:"-"` // ClusterID the ID of the cluster to update ClusterID string `json:"-"` // Name the new name of the cluster // // 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 the new autoscaler config for the cluster // // 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"` // EnableDashboard the new value of the Kubernetes Dashboard enablement EnableDashboard *bool `json:"enable_dashboard"` // Ingress the new Ingress Controller for the cluster // // Default value: unknown_ingress Ingress Ingress `json:"ingress"` // AutoUpgrade the new auo upgrade configuration of the cluster // // The new auo upgrade configuration of the cluster. Note that all the fields needs 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"` }
type UpdateClusterRequestAutoUpgrade ¶
type UpdateClusterRequestAutoUpgrade struct { Enable *bool `json:"enable"` MaintenanceWindow *MaintenanceWindow `json:"maintenance_window"` }
type UpdateClusterRequestAutoscalerConfig ¶
type UpdateClusterRequestAutoscalerConfig struct { ScaleDownDisabled *bool `json:"scale_down_disabled"` ScaleDownDelayAfterAdd *string `json:"scale_down_delay_after_add"` // Estimator // // Default value: unknown_estimator Estimator AutoscalerEstimator `json:"estimator"` // Expander // // Default value: unknown_expander Expander AutoscalerExpander `json:"expander"` IgnoreDaemonsetsUtilization *bool `json:"ignore_daemonsets_utilization"` BalanceSimilarNodeGroups *bool `json:"balance_similar_node_groups"` ExpendablePodsPriorityCutoff *int32 `json:"expendable_pods_priority_cutoff"` }
type UpdatePoolRequest ¶
type UpdatePoolRequest struct { 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"` }
type UpgradeClusterRequest ¶
type UpgradeClusterRequest struct { Region scw.Region `json:"-"` // ClusterID the ID of the cluster to upgrade ClusterID string `json:"-"` // Version the new Kubernetes version of the cluster // // 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 the enablement of the pools upgrade // // This field makes the upgrade upgrades the pool once the Kubernetes master in upgrade. UpgradePools bool `json:"upgrade_pools"` }
type UpgradePoolRequest ¶
type Version ¶
type Version struct { // Region the regions in which this version is available Region scw.Region `json:"region"` // Name the name of the Kubernetes version Name string `json:"name"` // Label the label of the Kubernetes version Label string `json:"label"` // AvailableCnis the supported Container Network Interface (CNI) plugins for this version AvailableCnis []CNI `json:"available_cnis"` // AvailableIngresses the supported Ingress Controllers for this version AvailableIngresses []Ingress `json:"available_ingresses"` // 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"` }
Version version
type WaitForClusterRequest ¶
type WaitForClusterRequest struct { ClusterID string Region scw.Region Status ClusterStatus Timeout *time.Duration }
WaitForClusterRequest is used by WaitForCluster method.