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) 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) GetVersion(req *GetVersionRequest, opts ...scw.RequestOption) (*Version, error)
- func (s *API) ListClusterAvailableVersions(req *ListClusterAvailableVersionsRequest, opts ...scw.RequestOption) (*ListClusterAvailableVersionsResponse, error)
- func (s *API) ListClusters(req *ListClustersRequest, opts ...scw.RequestOption) (*ListClustersResponse, error)
- func (s *API) ListNodes(req *ListNodesRequest, opts ...scw.RequestOption) (*ListNodesResponse, error)
- func (s *API) ListPools(req *ListPoolsRequest, opts ...scw.RequestOption) (*ListPoolsResponse, error)
- func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) (*ListVersionsResponse, error)
- func (s *API) RebootNode(req *RebootNodeRequest, opts ...scw.RequestOption) (*Node, error)
- func (s *API) 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, opts ...scw.RequestOption) (*Cluster, error)
- func (s *API) WaitForClusterPool(req *WaitForClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
- func (s *API) WaitForNode(req *WaitForNodeRequest, opts ...scw.RequestOption) (*Node, error)
- func (s *API) WaitForPool(req *WaitForPoolRequest, opts ...scw.RequestOption) (*Pool, error)
- type AutoscalerEstimator
- type AutoscalerExpander
- type CNI
- type Cluster
- type ClusterAutoUpgrade
- type ClusterAutoscalerConfig
- type ClusterOpenIDConnectConfig
- type ClusterStatus
- type CreateClusterRequest
- type CreateClusterRequestAutoUpgrade
- type CreateClusterRequestAutoscalerConfig
- type CreateClusterRequestOpenIDConnectConfig
- type CreateClusterRequestPoolConfig
- type CreateClusterRequestPoolConfigUpgradePolicy
- type CreatePoolRequest
- type CreatePoolRequestUpgradePolicy
- type DeleteClusterRequest
- type DeletePoolRequest
- type GetClusterKubeConfigRequest
- type GetClusterRequest
- type GetNodeRequest
- type GetPoolRequest
- type GetVersionRequest
- type Ingress
- type Kubeconfig
- type KubeconfigCluster
- type KubeconfigClusterWithName
- type KubeconfigContext
- type KubeconfigContextWithName
- type KubeconfigUser
- type KubeconfigUserWithName
- type ListClusterAvailableVersionsRequest
- type ListClusterAvailableVersionsResponse
- type ListClustersRequest
- type ListClustersRequestOrderBy
- type ListClustersResponse
- type ListNodesRequest
- type ListNodesRequestOrderBy
- type ListNodesResponse
- type ListPoolsRequest
- type ListPoolsRequestOrderBy
- type ListPoolsResponse
- type ListVersionsRequest
- type ListVersionsResponse
- type MaintenanceWindow
- type MaintenanceWindowDayOfTheWeek
- type Node
- type NodeStatus
- type Pool
- type PoolStatus
- type PoolUpgradePolicy
- type RebootNodeRequest
- type ReplaceNodeRequest
- type ResetClusterAdminTokenRequest
- type Runtime
- type UpdateClusterRequest
- type UpdateClusterRequestAutoUpgrade
- type UpdateClusterRequestAutoscalerConfig
- type UpdateClusterRequestOpenIDConnectConfig
- type UpdatePoolRequest
- type UpdatePoolRequestUpgradePolicy
- type UpgradeClusterRequest
- type UpgradePoolRequest
- type Version
- type WaitForClusterPoolRequest
- type WaitForClusterRequest
- type WaitForNodeRequest
- type WaitForPoolRequest
Constants ¶
const ( // AutoscalerEstimatorUnknownEstimator is [insert doc]. AutoscalerEstimatorUnknownEstimator = AutoscalerEstimator("unknown_estimator") // AutoscalerEstimatorBinpacking is [insert doc]. AutoscalerEstimatorBinpacking = AutoscalerEstimator("binpacking") )
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") // AutoscalerExpanderPrice is [insert doc]. AutoscalerExpanderPrice = AutoscalerExpander("price") )
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") // CNIKilo is [insert doc]. CNIKilo = CNI("kilo") )
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") // ClusterStatusLocked is [insert doc]. ClusterStatusLocked = ClusterStatus("locked") // ClusterStatusPoolRequired is [insert doc]. ClusterStatusPoolRequired = ClusterStatus("pool_required") )
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") // IngressTraefik2 is [insert doc]. IngressTraefik2 = Ingress("traefik2") )
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") // NodeStatusNotReady is [insert doc]. NodeStatusNotReady = NodeStatus("not_ready") // NodeStatusReady is [insert doc]. NodeStatusReady = NodeStatus("ready") // NodeStatusDeleting is [insert doc]. NodeStatusDeleting = NodeStatus("deleting") // NodeStatusDeleted is [insert doc]. NodeStatusDeleted = NodeStatus("deleted") // NodeStatusLocked is [insert doc]. NodeStatusLocked = NodeStatus("locked") // NodeStatusRebooting is [insert doc]. NodeStatusRebooting = NodeStatus("rebooting") // NodeStatusCreationError is [insert doc]. NodeStatusCreationError = NodeStatus("creation_error") // NodeStatusUpgrading is [insert doc]. NodeStatusUpgrading = NodeStatus("upgrading") )
const ( // PoolStatusUnknown is [insert doc]. PoolStatusUnknown = PoolStatus("unknown") // PoolStatusReady is [insert doc]. PoolStatusReady = PoolStatus("ready") // PoolStatusDeleting is [insert doc]. PoolStatusDeleting = PoolStatus("deleting") // PoolStatusDeleted is [insert doc]. PoolStatusDeleted = PoolStatus("deleted") // PoolStatusScaling is [insert doc]. PoolStatusScaling = PoolStatus("scaling") // PoolStatusWarning is [insert doc]. PoolStatusWarning = PoolStatus("warning") // 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: kapsule API
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) GetVersion ¶
func (s *API) GetVersion(req *GetVersionRequest, opts ...scw.RequestOption) (*Version, error)
GetVersion: get details about a specific version
This method allows to get a specific Kubernetes version and the details about the version.
func (*API) ListClusterAvailableVersions ¶
func (s *API) ListClusterAvailableVersions(req *ListClusterAvailableVersionsRequest, opts ...scw.RequestOption) (*ListClusterAvailableVersionsResponse, error)
ListClusterAvailableVersions: 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 some attributes of a specific pool such as the size, the autoscaling enablement, the tags, ...
func (*API) UpgradeCluster ¶
func (s *API) UpgradeCluster(req *UpgradeClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
UpgradeCluster: 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 the Kubernetes version of a specific pool. Note that this will work when the targeted version is the same than the version of the cluster.
func (*API) WaitForCluster ¶
func (s *API) WaitForCluster(req *WaitForClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
WaitForCluster waits for the cluster to be in a "terminal state" before returning.
func (*API) WaitForClusterPool ¶
func (s *API) WaitForClusterPool(req *WaitForClusterRequest, opts ...scw.RequestOption) (*Cluster, error)
WaitForClusterPool waits for the pool be associated with a cluster as a "terminal state" before returning.
func (*API) WaitForNode ¶
func (s *API) WaitForNode(req *WaitForNodeRequest, opts ...scw.RequestOption) (*Node, error)
WaitForNode waits for a Node to be ready
func (*API) WaitForPool ¶
func (s *API) WaitForPool(req *WaitForPoolRequest, opts ...scw.RequestOption) (*Pool, error)
WaitForPool waits for a pool to be ready
type AutoscalerEstimator ¶
type AutoscalerEstimator string
func (AutoscalerEstimator) MarshalJSON ¶
func (enum AutoscalerEstimator) MarshalJSON() ([]byte, error)
func (AutoscalerEstimator) String ¶
func (enum AutoscalerEstimator) String() string
func (*AutoscalerEstimator) UnmarshalJSON ¶
func (enum *AutoscalerEstimator) UnmarshalJSON(data []byte) error
type AutoscalerExpander ¶
type AutoscalerExpander string
func (AutoscalerExpander) MarshalJSON ¶
func (enum AutoscalerExpander) MarshalJSON() ([]byte, error)
func (AutoscalerExpander) String ¶
func (enum AutoscalerExpander) String() string
func (*AutoscalerExpander) UnmarshalJSON ¶
func (enum *AutoscalerExpander) UnmarshalJSON(data []byte) error
type Cluster ¶
type Cluster struct { // ID: the ID of the cluster ID string `json:"id"` // Type: the type of the cluster Type string `json:"type"` // Name: the name of the cluster Name string `json:"name"` // Status: the status of the cluster // // Default value: unknown Status ClusterStatus `json:"status"` // Version: the Kubernetes version of the cluster Version string `json:"version"` // Region: the region in which the cluster is Region scw.Region `json:"region"` // OrganizationID: the ID of the organization owning the cluster OrganizationID string `json:"organization_id"` // ProjectID: the ID of the project owning the cluster ProjectID string `json:"project_id"` // Tags: the tags associated with the cluster Tags []string `json:"tags"` // Cni: the Container Network Interface (CNI) plugin running in the cluster // // Default value: unknown_cni Cni CNI `json:"cni"` // Description: the description of the cluster Description string `json:"description"` // ClusterURL: the Kubernetes API server URL of the cluster ClusterURL string `json:"cluster_url"` // DNSWildcard: the DNS wildcard resovling all the ready nodes of the cluster DNSWildcard string `json:"dns_wildcard"` // CreatedAt: the date at which the cluster was created CreatedAt *time.Time `json:"created_at"` // UpdatedAt: the date at which the cluster was last updated UpdatedAt *time.Time `json:"updated_at"` // AutoscalerConfig: the autoscaler config for the cluster AutoscalerConfig *ClusterAutoscalerConfig `json:"autoscaler_config"` // Deprecated: DashboardEnabled: the enablement of the Kubernetes Dashboard in the cluster DashboardEnabled bool `json:"dashboard_enabled"` // 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"` // OpenIDConnectConfig: aLPHA - The OpenID Connect configuration of the cluster // // This feature is in ALPHA state, it may be deleted or modified. This configuration is the [OpenID Connect configuration](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens) of the Kubernetes API server. OpenIDConnectConfig *ClusterOpenIDConnectConfig `json:"open_id_connect_config"` // ApiserverCertSans: additional Subject Alternative Names for the Kubernetes API server certificate ApiserverCertSans []string `json:"apiserver_cert_sans"` }
Cluster: cluster
type ClusterAutoUpgrade ¶
type ClusterAutoUpgrade struct { // Enabled: whether or not auto upgrade is enabled for the cluster Enabled bool `json:"enabled"` // MaintenanceWindow: the maintenance window of the cluster auto upgrades MaintenanceWindow *MaintenanceWindow `json:"maintenance_window"` }
ClusterAutoUpgrade: cluster. auto upgrade
type ClusterAutoscalerConfig ¶
type ClusterAutoscalerConfig struct { // ScaleDownDisabled: disable the cluster autoscaler ScaleDownDisabled bool `json:"scale_down_disabled"` // ScaleDownDelayAfterAdd: how long after scale up that scale down evaluation resumes ScaleDownDelayAfterAdd string `json:"scale_down_delay_after_add"` // Estimator: type of resource estimator to be used in scale up // // Default value: unknown_estimator Estimator AutoscalerEstimator `json:"estimator"` // Expander: type of node group expander to be used in scale up // // Default value: unknown_expander Expander AutoscalerExpander `json:"expander"` // IgnoreDaemonsetsUtilization: ignore DaemonSet pods when calculating resource utilization for scaling down IgnoreDaemonsetsUtilization bool `json:"ignore_daemonsets_utilization"` // BalanceSimilarNodeGroups: detect similar node groups and balance the number of nodes between them BalanceSimilarNodeGroups bool `json:"balance_similar_node_groups"` // ExpendablePodsPriorityCutoff: pods with priority below cutoff will be expendable // // Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they don't cause scale up. Pods with null priority (PodPriority disabled) are non expendable. ExpendablePodsPriorityCutoff int32 `json:"expendable_pods_priority_cutoff"` // ScaleDownUnneededTime: how long a node should be unneeded before it is eligible for scale down ScaleDownUnneededTime string `json:"scale_down_unneeded_time"` // ScaleDownUtilizationThreshold: node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down ScaleDownUtilizationThreshold float32 `json:"scale_down_utilization_threshold"` // MaxGracefulTerminationSec: maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node MaxGracefulTerminationSec uint32 `json:"max_graceful_termination_sec"` }
ClusterAutoscalerConfig: cluster. autoscaler config
type ClusterOpenIDConnectConfig ¶
type ClusterOpenIDConnectConfig struct { // IssuerURL: URL of the provider which allows the API server to discover public signing keys // // URL of the provider which allows the API server to discover public signing keys. Only URLs which use the `https://` scheme are accepted. This is typically the provider's discovery URL without a path, for example "https://accounts.google.com" or "https://login.salesforce.com". This URL should point to the level below .well-known/openid-configuration. // IssuerURL string `json:"issuer_url"` // ClientID: a client id that all tokens must be issued for ClientID string `json:"client_id"` // UsernameClaim: jWT claim to use as the user name // // JWT claim to use as the user name. By default `sub`, which is expected to be a unique identifier of the end user. Admins can choose other claims, such as `email` or `name`, depending on their provider. However, claims other than `email` will be prefixed with the issuer URL to prevent naming clashes with other plugins. // UsernameClaim string `json:"username_claim"` // UsernamePrefix: prefix prepended to username // // Prefix prepended to username claims to prevent clashes with existing names (such as `system:` users). For example, the value `oidc:` will create usernames like `oidc:jane.doe`. If this flag isn't provided and `username_claim` is a value other than `email` the prefix defaults to `( Issuer URL )#` where `( Issuer URL )` is the value of `issuer_url`. The value `-` can be used to disable all prefixing. // UsernamePrefix string `json:"username_prefix"` // GroupsClaim: jWT claim to use as the user's group GroupsClaim []string `json:"groups_claim"` // GroupsPrefix: prefix prepended to group claims // // Prefix prepended to group claims to prevent clashes with existing names (such as `system:` groups). For example, the value `oidc:` will create group names like `oidc:engineering` and `oidc:infra`. // GroupsPrefix string `json:"groups_prefix"` // RequiredClaim: multiple key=value pairs that describes a required claim in the ID Token // // Multiple key=value pairs that describes a required claim in the ID Token. If set, the claims are verified to be present in the ID Token with a matching value. // RequiredClaim []string `json:"required_claim"` }
ClusterOpenIDConnectConfig: cluster. open id connect config
type ClusterStatus ¶
type ClusterStatus string
func (ClusterStatus) MarshalJSON ¶
func (enum ClusterStatus) MarshalJSON() ([]byte, error)
func (ClusterStatus) String ¶
func (enum ClusterStatus) String() string
func (*ClusterStatus) UnmarshalJSON ¶
func (enum *ClusterStatus) UnmarshalJSON(data []byte) error
type CreateClusterRequest ¶
type CreateClusterRequest struct { Region scw.Region `json:"-"` // Deprecated: OrganizationID: the organization ID where the cluster will be created // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: the project ID where the cluster will be created // Precisely one of OrganizationID, ProjectID must be set. ProjectID *string `json:"project_id,omitempty"` // Type: the type of the cluster Type string `json:"type"` // Name: the name of the cluster Name string `json:"name"` // Description: the description of the cluster Description string `json:"description"` // Tags: the tags associated with the cluster Tags []string `json:"tags"` // Version: the Kubernetes version of the cluster Version string `json:"version"` // Cni: the Container Network Interface (CNI) plugin that will run in the cluster // // Default value: unknown_cni Cni CNI `json:"cni"` // Deprecated: EnableDashboard: the enablement of the Kubernetes Dashboard in the cluster EnableDashboard bool `json:"enable_dashboard"` // Ingress: the Ingress Controller that will run in the cluster // // Default value: unknown_ingress Ingress Ingress `json:"ingress"` // Pools: the pools to be created along with the cluster Pools []*CreateClusterRequestPoolConfig `json:"pools"` // 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"` // OpenIDConnectConfig: aLPHA - The OpenID Connect configuration of the cluster // // This feature is in ALPHA state, it may be deleted or modified. This configuration enables to set the [OpenID Connect configuration](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens) of the Kubernetes API server. OpenIDConnectConfig *CreateClusterRequestOpenIDConnectConfig `json:"open_id_connect_config"` // ApiserverCertSans: additional Subject Alternative Names for the Kubernetes API server certificate ApiserverCertSans []string `json:"apiserver_cert_sans"` }
type CreateClusterRequestAutoUpgrade ¶
type CreateClusterRequestAutoUpgrade struct { // Enable: whether or not auto upgrade is enabled for the cluster Enable bool `json:"enable"` // MaintenanceWindow: the maintenance window of the cluster auto upgrades MaintenanceWindow *MaintenanceWindow `json:"maintenance_window"` }
CreateClusterRequestAutoUpgrade: create cluster request. auto upgrade
type CreateClusterRequestAutoscalerConfig ¶
type CreateClusterRequestAutoscalerConfig struct { // ScaleDownDisabled: disable the cluster autoscaler ScaleDownDisabled *bool `json:"scale_down_disabled"` // ScaleDownDelayAfterAdd: how long after scale up that scale down evaluation resumes ScaleDownDelayAfterAdd *string `json:"scale_down_delay_after_add"` // Estimator: type of resource estimator to be used in scale up // // Default value: unknown_estimator Estimator AutoscalerEstimator `json:"estimator"` // Expander: type of node group expander to be used in scale up // // Default value: unknown_expander Expander AutoscalerExpander `json:"expander"` // IgnoreDaemonsetsUtilization: ignore DaemonSet pods when calculating resource utilization for scaling down IgnoreDaemonsetsUtilization *bool `json:"ignore_daemonsets_utilization"` // BalanceSimilarNodeGroups: detect similar node groups and balance the number of nodes between them BalanceSimilarNodeGroups *bool `json:"balance_similar_node_groups"` // ExpendablePodsPriorityCutoff: pods with priority below cutoff will be expendable // // Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they don't cause scale up. Pods with null priority (PodPriority disabled) are non expendable. ExpendablePodsPriorityCutoff *int32 `json:"expendable_pods_priority_cutoff"` // ScaleDownUnneededTime: how long a node should be unneeded before it is eligible for scale down ScaleDownUnneededTime *string `json:"scale_down_unneeded_time"` // ScaleDownUtilizationThreshold: node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down ScaleDownUtilizationThreshold *float32 `json:"scale_down_utilization_threshold"` // MaxGracefulTerminationSec: maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node MaxGracefulTerminationSec *uint32 `json:"max_graceful_termination_sec"` }
CreateClusterRequestAutoscalerConfig: create cluster request. autoscaler config
type CreateClusterRequestOpenIDConnectConfig ¶
type CreateClusterRequestOpenIDConnectConfig struct { // IssuerURL: URL of the provider which allows the API server to discover public signing keys // // URL of the provider which allows the API server to discover public signing keys. Only URLs which use the `https://` scheme are accepted. This is typically the provider's discovery URL without a path, for example "https://accounts.google.com" or "https://login.salesforce.com". This URL should point to the level below .well-known/openid-configuration. // IssuerURL string `json:"issuer_url"` // ClientID: a client id that all tokens must be issued for ClientID string `json:"client_id"` // UsernameClaim: jWT claim to use as the user name // // JWT claim to use as the user name. By default `sub`, which is expected to be a unique identifier of the end user. Admins can choose other claims, such as `email` or `name`, depending on their provider. However, claims other than `email` will be prefixed with the issuer URL to prevent naming clashes with other plugins. // UsernameClaim *string `json:"username_claim"` // UsernamePrefix: prefix prepended to username // // Prefix prepended to username claims to prevent clashes with existing names (such as `system:` users). For example, the value `oidc:` will create usernames like `oidc:jane.doe`. If this flag isn't provided and `username_claim` is a value other than `email` the prefix defaults to `( Issuer URL )#` where `( Issuer URL )` is the value of `issuer_url`. The value `-` can be used to disable all prefixing. // UsernamePrefix *string `json:"username_prefix"` // GroupsClaim: jWT claim to use as the user's group GroupsClaim *[]string `json:"groups_claim"` // GroupsPrefix: prefix prepended to group claims // // Prefix prepended to group claims to prevent clashes with existing names (such as `system:` groups). For example, the value `oidc:` will create group names like `oidc:engineering` and `oidc:infra`. // GroupsPrefix *string `json:"groups_prefix"` // RequiredClaim: multiple key=value pairs that describes a required claim in the ID Token // // Multiple key=value pairs that describes a required claim in the ID Token. If set, the claims are verified to be present in the ID Token with a matching value. // RequiredClaim *[]string `json:"required_claim"` }
CreateClusterRequestOpenIDConnectConfig: create cluster request. open id connect config
type CreateClusterRequestPoolConfig ¶
type CreateClusterRequestPoolConfig struct { // Name: 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"` // KubeletArgs: the Kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental KubeletArgs map[string]string `json:"kubelet_args"` // UpgradePolicy: the Pool upgrade policy UpgradePolicy *CreateClusterRequestPoolConfigUpgradePolicy `json:"upgrade_policy"` // Zone: the Zone in which the Pool's node will be spawn in Zone scw.Zone `json:"zone"` }
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 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"` // KubeletArgs: the Kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental KubeletArgs map[string]string `json:"kubelet_args"` // UpgradePolicy: the Pool upgrade policy UpgradePolicy *CreatePoolRequestUpgradePolicy `json:"upgrade_policy"` // Zone: the Zone in which the Pool's node will be spawn in Zone scw.Zone `json:"zone"` }
type CreatePoolRequestUpgradePolicy ¶
type CreatePoolRequestUpgradePolicy struct { MaxSurge *uint32 `json:"max_surge"` }
type DeleteClusterRequest ¶
type DeleteClusterRequest struct { Region scw.Region `json:"-"` // ClusterID: the ID of the cluster to delete ClusterID string `json:"-"` // WithAdditionalResources: set true if you want to delete all volumes (including retain volume type) and loadbalancers whose name start with cluster ID WithAdditionalResources bool `json:"-"` }
type DeletePoolRequest ¶
type GetClusterRequest ¶
type GetNodeRequest ¶
type GetPoolRequest ¶
type GetVersionRequest ¶
type Kubeconfig ¶
type Kubeconfig struct { APIVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` CurrentContext string `yaml:"current-context"` Clusters []*KubeconfigClusterWithName `yaml:"clusters"` Contexts []*KubeconfigContextWithName `yaml:"contexts"` Users []*KubeconfigUserWithName `yaml:"users"` // contains filtered or unexported fields }
Kubeconfig represents a kubernetes kubeconfig file
func (*Kubeconfig) GetCertificateAuthorityData ¶
func (k *Kubeconfig) GetCertificateAuthorityData() (string, error)
GetCertificateAuthorityData returns the server certificate authority data of the cluster in the kubeconfig
func (*Kubeconfig) GetRaw ¶
func (k *Kubeconfig) GetRaw() []byte
GetRaw returns the raw bytes of the kubeconfig
func (*Kubeconfig) GetServer ¶
func (k *Kubeconfig) GetServer() (string, error)
GetServer returns the server URL of the cluster in the kubeconfig
func (*Kubeconfig) GetToken ¶
func (k *Kubeconfig) GetToken() (string, error)
GetToken returns the token for the cluster in the kubeconfig
type KubeconfigCluster ¶
type KubeconfigCluster struct { Server string `yaml:"server,omitempty"` CertificateAuthorityData string `yaml:"certificate-authority-data,omitempty"` }
KubeconfigCluster represents a cluster in the kubeconfig file
type KubeconfigClusterWithName ¶
type KubeconfigClusterWithName struct { Name string `yaml:"name"` Cluster KubeconfigCluster `yaml:"cluster"` }
KubeconfigUserWithName represents a named cluster in the kubeconfig file
type KubeconfigContext ¶
type KubeconfigContext struct { Cluster string `yaml:"cluster"` Namespace string `yaml:"namespace,omitempty"` User string `yaml:"user"` }
KubeconfigContext represents a context in the kubeconfig file
type KubeconfigContextWithName ¶
type KubeconfigContextWithName struct { Name string `yaml:"name"` Context KubeconfigContext `yaml:"context"` }
KubeconfigContextWithName represents a named context in the kubeconfig file
type KubeconfigUser ¶
type KubeconfigUser struct { ClientCertificateData string `yaml:"client-certificate-data,omitempty"` ClientKeyData string `yaml:"client-key-data,omitempty"` Password string `yaml:"password,omitempty"` Username string `yaml:"username,omitempty"` Token string `yaml:"token,omitempty"` }
KubeconfigUser represents a user in the kubeconfig file
type KubeconfigUserWithName ¶
type KubeconfigUserWithName struct { Name string `yaml:"name"` User KubeconfigUser `yaml:"user"` }
KubeconfigUserWithName represents a named user in the kubeconfig file
type ListClusterAvailableVersionsResponse ¶
type ListClusterAvailableVersionsResponse struct { // Versions: the available Kubernetes version for the cluster Versions []*Version `json:"versions"` }
ListClusterAvailableVersionsResponse: list cluster available versions response
type ListClustersRequest ¶
type ListClustersRequest struct { Region scw.Region `json:"-"` // OrganizationID: the organization ID on which to filter the returned clusters OrganizationID *string `json:"-"` // ProjectID: the project ID on which to filter the returned clusters ProjectID *string `json:"-"` // OrderBy: the sort order of the returned clusters // // Default value: created_at_asc OrderBy ListClustersRequestOrderBy `json:"-"` // Page: the page number for the returned clusters Page *int32 `json:"-"` // PageSize: the maximum number of clusters per page PageSize *uint32 `json:"-"` // Name: the name on which to filter the returned clusters Name *string `json:"-"` // Status: the status on which to filter the returned clusters // // Default value: unknown Status ClusterStatus `json:"-"` // Type: the type on which to filter the returned clusters Type *string `json:"-"` }
type ListClustersRequestOrderBy ¶
type ListClustersRequestOrderBy string
func (ListClustersRequestOrderBy) MarshalJSON ¶
func (enum ListClustersRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListClustersRequestOrderBy) String ¶
func (enum ListClustersRequestOrderBy) String() string
func (*ListClustersRequestOrderBy) UnmarshalJSON ¶
func (enum *ListClustersRequestOrderBy) UnmarshalJSON(data []byte) error
type ListClustersResponse ¶
type ListClustersResponse struct { // TotalCount: the total number of clusters TotalCount uint32 `json:"total_count"` // Clusters: the paginated returned clusters Clusters []*Cluster `json:"clusters"` }
ListClustersResponse: list clusters response
func (*ListClustersResponse) UnsafeAppend ¶
func (r *ListClustersResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListClustersResponse) UnsafeGetTotalCount ¶
func (r *ListClustersResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListNodesRequest ¶
type ListNodesRequest struct { Region 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: the start hour of the 2-hour maintenance window StartHour uint32 `json:"start_hour"` // Day: the day of the week for the maintenance window // // Default value: any Day MaintenanceWindowDayOfTheWeek `json:"day"` }
MaintenanceWindow: maintenance window
type MaintenanceWindowDayOfTheWeek ¶
type MaintenanceWindowDayOfTheWeek string
func (MaintenanceWindowDayOfTheWeek) MarshalJSON ¶
func (enum MaintenanceWindowDayOfTheWeek) MarshalJSON() ([]byte, error)
func (MaintenanceWindowDayOfTheWeek) String ¶
func (enum MaintenanceWindowDayOfTheWeek) String() string
func (*MaintenanceWindowDayOfTheWeek) UnmarshalJSON ¶
func (enum *MaintenanceWindowDayOfTheWeek) UnmarshalJSON(data []byte) error
type Node ¶
type Node struct { // ID: the ID of the node ID string `json:"id"` // PoolID: the pool ID of the node PoolID string `json:"pool_id"` // ClusterID: the cluster ID of the node ClusterID string `json:"cluster_id"` // 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"` // 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"` // 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"` // KubeletArgs: the Kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental KubeletArgs map[string]string `json:"kubelet_args"` // UpgradePolicy: the Pool upgrade policy UpgradePolicy *PoolUpgradePolicy `json:"upgrade_policy"` // Zone: the Zone in which the Pool's node will be spawn in Zone scw.Zone `json:"zone"` // Region: the cluster region of the pool Region scw.Region `json:"region"` }
Pool: pool
type PoolStatus ¶
type PoolStatus string
func (PoolStatus) MarshalJSON ¶
func (enum PoolStatus) MarshalJSON() ([]byte, error)
func (PoolStatus) String ¶
func (enum PoolStatus) String() string
func (*PoolStatus) UnmarshalJSON ¶
func (enum *PoolStatus) UnmarshalJSON(data []byte) error
type PoolUpgradePolicy ¶
type PoolUpgradePolicy struct { MaxSurge uint32 `json:"max_surge"` }
type 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"` // Deprecated: 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"` // OpenIDConnectConfig: aLPHA - The new OpenID Connect configuration of the cluster // // This feature is in ALPHA state, it may be deleted or modified. This configuration enables to update the [OpenID Connect configuration](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens) of the Kubernetes API server. OpenIDConnectConfig *UpdateClusterRequestOpenIDConnectConfig `json:"open_id_connect_config"` // ApiserverCertSans: additional Subject Alternative Names for the Kubernetes API server certificate ApiserverCertSans *[]string `json:"apiserver_cert_sans"` }
type UpdateClusterRequestAutoUpgrade ¶
type UpdateClusterRequestAutoUpgrade struct { // Enable: whether or not auto upgrade is enabled for the cluster Enable *bool `json:"enable"` // MaintenanceWindow: the maintenance window of the cluster auto upgrades MaintenanceWindow *MaintenanceWindow `json:"maintenance_window"` }
UpdateClusterRequestAutoUpgrade: update cluster request. auto upgrade
type UpdateClusterRequestAutoscalerConfig ¶
type UpdateClusterRequestAutoscalerConfig struct { // ScaleDownDisabled: disable the cluster autoscaler ScaleDownDisabled *bool `json:"scale_down_disabled"` // ScaleDownDelayAfterAdd: how long after scale up that scale down evaluation resumes ScaleDownDelayAfterAdd *string `json:"scale_down_delay_after_add"` // Estimator: type of resource estimator to be used in scale up // // Default value: unknown_estimator Estimator AutoscalerEstimator `json:"estimator"` // Expander: type of node group expander to be used in scale up // // Default value: unknown_expander Expander AutoscalerExpander `json:"expander"` // IgnoreDaemonsetsUtilization: ignore DaemonSet pods when calculating resource utilization for scaling down IgnoreDaemonsetsUtilization *bool `json:"ignore_daemonsets_utilization"` // BalanceSimilarNodeGroups: detect similar node groups and balance the number of nodes between them BalanceSimilarNodeGroups *bool `json:"balance_similar_node_groups"` // ExpendablePodsPriorityCutoff: pods with priority below cutoff will be expendable // // Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they don't cause scale up. Pods with null priority (PodPriority disabled) are non expendable. ExpendablePodsPriorityCutoff *int32 `json:"expendable_pods_priority_cutoff"` // ScaleDownUnneededTime: how long a node should be unneeded before it is eligible for scale down ScaleDownUnneededTime *string `json:"scale_down_unneeded_time"` // ScaleDownUtilizationThreshold: node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down ScaleDownUtilizationThreshold *float32 `json:"scale_down_utilization_threshold"` // MaxGracefulTerminationSec: maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node MaxGracefulTerminationSec *uint32 `json:"max_graceful_termination_sec"` }
UpdateClusterRequestAutoscalerConfig: update cluster request. autoscaler config
type UpdateClusterRequestOpenIDConnectConfig ¶
type UpdateClusterRequestOpenIDConnectConfig struct { // IssuerURL: URL of the provider which allows the API server to discover public signing keys // // URL of the provider which allows the API server to discover public signing keys. Only URLs which use the `https://` scheme are accepted. This is typically the provider's discovery URL without a path, for example "https://accounts.google.com" or "https://login.salesforce.com". This URL should point to the level below .well-known/openid-configuration. // IssuerURL *string `json:"issuer_url"` // ClientID: a client id that all tokens must be issued for ClientID *string `json:"client_id"` // UsernameClaim: jWT claim to use as the user name // // JWT claim to use as the user name. By default `sub`, which is expected to be a unique identifier of the end user. Admins can choose other claims, such as `email` or `name`, depending on their provider. However, claims other than `email` will be prefixed with the issuer URL to prevent naming clashes with other plugins. // UsernameClaim *string `json:"username_claim"` // UsernamePrefix: prefix prepended to username // // Prefix prepended to username claims to prevent clashes with existing names (such as `system:` users). For example, the value `oidc:` will create usernames like `oidc:jane.doe`. If this flag isn't provided and `username_claim` is a value other than `email` the prefix defaults to `( Issuer URL )#` where `( Issuer URL )` is the value of `issuer_url`. The value `-` can be used to disable all prefixing. // UsernamePrefix *string `json:"username_prefix"` // GroupsClaim: jWT claim to use as the user's group GroupsClaim *[]string `json:"groups_claim"` // GroupsPrefix: prefix prepended to group claims // // Prefix prepended to group claims to prevent clashes with existing names (such as `system:` groups). For example, the value `oidc:` will create group names like `oidc:engineering` and `oidc:infra`. // GroupsPrefix *string `json:"groups_prefix"` // RequiredClaim: multiple key=value pairs that describes a required claim in the ID Token // // Multiple key=value pairs that describes a required claim in the ID Token. If set, the claims are verified to be present in the ID Token with a matching value. // RequiredClaim *[]string `json:"required_claim"` }
UpdateClusterRequestOpenIDConnectConfig: update cluster request. open id connect config
type UpdatePoolRequest ¶
type UpdatePoolRequest struct { Region scw.Region `json:"-"` // PoolID: the ID of the pool to update PoolID string `json:"-"` // Autoscaling: the new value for the enablement of autoscaling for the pool Autoscaling *bool `json:"autoscaling"` // Size: the new size for the pool Size *uint32 `json:"size"` // MinSize: the new minimun size for the pool MinSize *uint32 `json:"min_size"` // MaxSize: the new maximum size for the pool MaxSize *uint32 `json:"max_size"` // Autohealing: the new value for the enablement of autohealing for the pool Autohealing *bool `json:"autohealing"` // Tags: the new tags associated with the pool Tags *[]string `json:"tags"` // KubeletArgs: the new Kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental KubeletArgs *map[string]string `json:"kubelet_args"` // UpgradePolicy: the Pool upgrade policy UpgradePolicy *UpdatePoolRequestUpgradePolicy `json:"upgrade_policy"` }
type UpdatePoolRequestUpgradePolicy ¶
type UpdatePoolRequestUpgradePolicy struct { MaxSurge *uint32 `json:"max_surge"` }
type UpgradeClusterRequest ¶
type UpgradeClusterRequest struct { Region 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 { // Name: the name of the Kubernetes version Name string `json:"name"` // Label: the label of the Kubernetes version Label string `json:"label"` // Region: the region in which this version is available Region scw.Region `json:"region"` // AvailableCnis: the supported Container Network Interface (CNI) plugins for this version AvailableCnis []CNI `json:"available_cnis"` // 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"` // AvailableKubeletArgs: the supported kubelet arguments for this version AvailableKubeletArgs map[string]string `json:"available_kubelet_args"` }
Version: version
type WaitForClusterPoolRequest ¶
type WaitForClusterPoolRequest struct { ClusterID string Region scw.Region Status ClusterStatus Timeout *time.Duration RetryInterval *time.Duration }
WaitForClusterPoolRequest is used by WaitForClusterPool method.
type WaitForClusterRequest ¶
type WaitForClusterRequest struct { ClusterID string Region scw.Region Status ClusterStatus Timeout *time.Duration RetryInterval *time.Duration }
WaitForClusterRequest is used by WaitForCluster method.