k8s

package
v1.5.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

API for Kubernetes clusters management

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRequest

type CreateRequest struct {
	// Name of Kubernetes cluster
	// Required: true
	Name string `url:"name" json:"name" validate:"required"`

	// Resource Group ID for cluster placement
	// Required: true
	RGID uint64 `url:"rgId" json:"rgId" validate:"required"`

	// ID of Kubernetes catalog item (k8sci) for cluster
	// Required: true
	K8SCIID uint64 `url:"k8ciId" json:"k8ciId" validate:"required"`

	// Name for first worker group created with cluster
	// Required: true
	WorkerGroupName string `url:"workerGroupName" json:"workerGroupName" validate:"required"`

	// Network plugin
	// Must be one of these values: flannel, weawenet, calico
	// Required: true
	NetworkPlugin string `url:"networkPlugin" json:"networkPlugin" validate:"required,networkPlugin"`

	// ID of SEP to create boot disks for master nodes. Uses images SEP ID if not set
	// Required: false
	MasterSEPID uint64 `url:"masterSepId,omitempty" json:"masterSepId,omitempty"`

	// Pool to use if master SEP ID is set, can be also empty if needed to be chosen by system
	// Required: false
	MasterSEPPool string `url:"masterSepPool,omitempty" json:"masterSepPool,omitempty"`

	// ID of SEP to create boot disks for default worker nodes group. Uses images SEP ID if not set
	// Required: false
	WorkerSEPID uint64 `url:"workerSepId,omitempty" json:"workerSepId,omitempty"`

	// Pool to use if worker SEP ID is set, can be also empty if needed to be chosen by system
	// Required: false
	WorkerSEPPool string `url:"workerSepPool,omitempty" json:"workerSepPool,omitempty"`

	// List of strings with labels for default worker group
	// i.e: ["label1=value1", "label2=value2"]
	// Required: false
	Labels []string `url:"labels,omitempty" json:"labels,omitempty"`

	// List of strings with taints for default worker group
	// i.e: ["key1=value1:NoSchedule", "key2=value2:NoExecute"]
	// Required: false
	Taints []string `url:"taints,omitempty" json:"taints,omitempty"`

	// List of strings with annotations for worker group
	// i.e: ["key1=value1", "key2=value2"]
	// Required: false
	Annotations []string `url:"annotations,omitempty" json:"annotations,omitempty"`

	// Number of master nodes to create
	// Required: false
	MasterNum uint `url:"masterNum,omitempty" json:"masterNum,omitempty"`

	// Master node CPU count
	// Required: false
	MasterCPU uint `url:"masterCpu,omitempty" json:"masterCpu,omitempty"`

	// Master node RAM volume in MB
	// Required: false
	MasterRAM uint `url:"masterRam,omitempty" json:"masterRam,omitempty"`

	// Master node boot disk size in GB If 0 is specified, size is defined by the OS image size
	// Required: false
	MasterDisk uint `url:"masterDisk,omitempty" json:"masterDisk,omitempty"`

	// Number of worker nodes to create in default worker group
	// Required: false
	WorkerNum uint `url:"workerNum,omitempty" json:"workerNum,omitempty"`

	// Worker node CPU count
	// Required: false
	WorkerCPU uint `url:"workerCpu,omitempty" json:"workerCpu,omitempty"`

	// Worker node RAM volume in MB
	// Required: false
	WorkerRAM uint `url:"workerRam,omitempty" json:"workerRam,omitempty"`

	// Worker node boot disk size in GB. If 0 is specified, size is defined by the OS image size
	// Required: false
	WorkerDisk uint `url:"workerDisk,omitempty" json:"workerDisk,omitempty"`

	// ID of the external network to connect load balancer and cluster ViNS. If 0 is specified, external network selects automatically to
	// Required: false
	ExtNetID uint64 `url:"extnetId,omitempty" json:"extnetId,omitempty"`

	// Create Kubernetes cluster with masters nodes behind load balancer if true.
	// Otherwise give all cluster nodes direct external addresses from selected ExtNet
	// Required: false
	WithLB bool `url:"withLB,omitempty" json:"withLB,omitempty"`

	// Text description of this Kubernetes cluster
	// Required: false
	Description string `url:"desc,omitempty" json:"desc,omitempty"`
}

Request struct for create kubernetes cluster

type DeleteMasterFromGroupRequest

type DeleteMasterFromGroupRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// ID of the masters compute group
	// Required: true
	MasterGroupID uint64 `url:"masterGroupId" json:"masterGroupId" validate:"required"`

	// List of Compute IDs of master nodes to delete
	// Required: true
	MasterIDs []string `url:"masterIds" json:"masterIds" validate:"min=1"`
}

Request struct for delete master from group

type DeleteRequest

type DeleteRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// True if cluster is destroyed permanently.
	// Otherwise it can be restored from Recycle Bin
	// Required: true
	Permanently bool `url:"permanently" json:"permanently" validate:"required"`
}

Request struct for delete kubernetes cluster

type DeleteWorkerFromGroupRequest

type DeleteWorkerFromGroupRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// ID of the workers compute group
	// Required: true
	WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId" validate:"required"`

	// Compute ID of worker node to delete
	// Required: true
	WorkerID uint64 `url:"workerId" json:"workerId" validate:"required"`
}

Request struct for delete worker from group

type DisableEnableRequest added in v1.4.2

type DisableEnableRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`
}

Request struct for disable/enable kubernetes cluster

type FindGroupByLabelRequest

type FindGroupByLabelRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// List of labels to search
	// Required: true
	Labels []string `url:"labels" json:"labels" validate:"min=1"`

	// If true and more than one label provided, select only groups that have all provided labels.
	// If false - groups that have at least one label
	// Required: false
	Strict bool `url:"strict,omitempty" json:"strict,omitempty"`
}

Request struct for get information about group of kubernetes cluster

type GetConfigRequest

type GetConfigRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`
}

Request struct for get configuration of kubernetes cluster

type GetNodeAnnotationsRequest

type GetNodeAnnotationsRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// Node ID
	// Required: true
	NodeID uint64 `url:"nodeId" json:"nodeId" validate:"required"`
}

Request struct for get node annotations

type GetNodeLabelsRequest

type GetNodeLabelsRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// Node ID
	// Required: true
	NodeID uint64 `url:"nodeId" json:"nodeId" validate:"required"`
}

Request struct for get node labels

type GetNodeTaintsRequest

type GetNodeTaintsRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// Node ID
	// Required: true
	NodeID uint64 `url:"nodeId" json:"nodeId" validate:"required"`
}

Request struct for get node taints

type GetRequest

type GetRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`
}

Request struct for get detailed information about kubernetes cluster

type ItemACL

type ItemACL struct {
	// Explicit
	Explicit bool `json:"explicit"`

	// GUID
	GUID string `json:"guid"`

	// Right
	Right string `json:"right"`

	// Status
	Status string `json:"status"`

	// Type
	Type string `json:"type"`

	// User group ID
	UserGroupID string `json:"userGroupId"`
}

Main information of Access Control List

type ItemDetailedInfo

type ItemDetailedInfo struct {
	// ID
	ID uint64 `json:"id"`

	// Name
	Name string `json:"name"`

	// Status
	Status string `json:"status"`

	// Tech status
	TechStatus string `json:"techStatus"`
}

Detailed information

type ItemK8SCluster

type ItemK8SCluster struct {
	// Account ID
	AccountID uint64 `json:"accountId"`

	// Account name
	AccountName string `json:"accountName"`

	// Access Control List
	ACL []interface{} `json:"acl"`

	// Basic Service ID
	BServiceID uint64 `json:"bserviceId"`

	// CIID
	CIID uint64 `json:"ciId"`

	// Config
	Config interface{} `json:"config"`

	// Create by
	CreatedBy string `json:"createdBy"`

	// Created time
	CreatedTime uint64 `json:"createdTime"`

	// Deleted by
	DeletedBy string `json:"deletedBy"`

	// Deleted time
	DeletedTime uint64 `json:"deletedTime"`

	// Description
	Description string `json:"desc"`

	// External network ID
	ExtNetID uint64 `json:"extnetId"`

	// Grid ID
	GID uint64 `json:"gid"`

	// GUID
	GUID uint64 `json:"guid"`

	// ID
	ID uint64 `json:"id"`

	// Load balancer ID
	LBID uint64 `json:"lbId"`

	// Milestones
	Milestones uint64 `json:"milestones"`

	// Name
	Name string `json:"name"`

	// Network plugin
	NetworkPlugin string `json:"networkPlugin"`

	// Resource group ID
	RGID uint64 `json:"rgId"`

	// Resource group name
	RGName string `json:"rgName"`

	// Information about service account
	ServiceAccount RecordServiceAccount `json:"serviceAccount"`

	// Status
	Status string `json:"status"`

	// Tech status
	TechStatus string `json:"techStatus"`

	// Updated by
	UpdatedBy string `json:"updatedBy"`

	// Updated time
	UpdatedTime uint64 `json:"updatedTime"`

	// VINS ID
	VINSID uint64 `json:"vinsId"`

	// List workers group
	WorkersGroup ListK8SGroups `json:"workersGroups"`
}

Main information about kubernetes cluster

func (ItemK8SCluster) Serialize

func (ikc ItemK8SCluster) Serialize(params ...string) (serialization.Serialized, error)

Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.

In order to serialize with indent make sure to follow these guidelines:

  • First argument -> prefix
  • Second argument -> indent

type ItemK8SGroup

type ItemK8SGroup struct {
	// List of Annotations
	Annotations []string `json:"annotations"`

	// Number of CPU
	CPU uint64 `json:"cpu"`

	// List detailed information
	DetailedInfo ListDetailedInfo `json:"detailedInfo"`

	// Disk ID
	Disk uint64 `json:"disk"`

	// GUID
	GUID string `json:"guid"`

	// ID
	ID uint64 `json:"id"`

	// List of Labels
	Labels []string `json:"labels"`

	// Name
	Name string `json:"name"`

	// Num
	Num uint64 `json:"num"`

	// Number of RAM
	RAM uint64 `json:"ram"`

	// List of taints
	Taints []string `json:"taints"`
}

Main information about kubernetes cluster

type K8S

type K8S struct {
	// contains filtered or unexported fields
}

Structure for creating request to K8S

func New

func New(client interfaces.Caller) *K8S

Builder for K8S endpoints

func (K8S) Create

func (k8s K8S) Create(ctx context.Context, req CreateRequest) (string, error)

Create creates a new Kubernetes cluster in the specified Resource Group

func (K8S) Delete

func (k8s K8S) Delete(ctx context.Context, req DeleteRequest) (bool, error)

Delete deletes kubernetes cluster

func (K8S) DeleteMasterFromGroup

func (k8s K8S) DeleteMasterFromGroup(ctx context.Context, req DeleteMasterFromGroupRequest) (bool, error)

DeleteMasterFromGroup deletes compute from masters group in selected Kubernetes cluster

func (K8S) DeleteWorkerFromGroup

func (k8s K8S) DeleteWorkerFromGroup(ctx context.Context, req DeleteWorkerFromGroupRequest) (bool, error)

DeleteWorkerFromGroup deletes worker compute from workers group in selected Kubernetes cluster

func (K8S) Disable

func (k8s K8S) Disable(ctx context.Context, req DisableEnableRequest) (bool, error)

Disable disables kubernetes cluster by ID

func (K8S) Enable

func (k8s K8S) Enable(ctx context.Context, req DisableEnableRequest) (bool, error)

Enable enables kubernetes cluster by ID

func (K8S) FindGroupByLabel

func (k8s K8S) FindGroupByLabel(ctx context.Context, req FindGroupByLabelRequest) (ListK8SGroups, error)

FindGroupByLabel find worker group information by one on more labels

func (K8S) Get

func (k8s K8S) Get(ctx context.Context, req GetRequest) (*RecordK8S, error)

Get gets information about Kubernetes cluster

func (K8S) GetConfig

func (k8s K8S) GetConfig(ctx context.Context, req GetConfigRequest) (string, error)

GetConfig gets configuration data to access Kubernetes cluster

func (K8S) GetNodeAnnotations

func (k8s K8S) GetNodeAnnotations(ctx context.Context, req GetNodeAnnotationsRequest) (string, error)

GetNodeAnnotations gets kubernetes cluster worker node annotations

func (K8S) GetNodeLabels

func (k8s K8S) GetNodeLabels(ctx context.Context, req GetNodeLabelsRequest) (string, error)

GetNodeLabels gets kubernetes cluster worker node labels

func (K8S) GetNodeTaints

func (k8s K8S) GetNodeTaints(ctx context.Context, req GetNodeTaintsRequest) (string, error)

GetNodeTaints gets kubernetes cluster worker node taints

func (K8S) List

func (k8s K8S) List(ctx context.Context, req ListRequest) (ListK8SClusters, error)

List gets list all kubernetes clusters the user has access to

func (K8S) ListDeleted

func (k8s K8S) ListDeleted(ctx context.Context, req ListDeletedRequest) (ListK8SClusters, error)

ListDeleted gets all deleted kubernetes clusters the user has access to

func (K8S) Restore

func (k8s K8S) Restore(ctx context.Context, req RestoreRequest) (bool, error)

Restore restore kubernetes cluster from Recycle Bin

func (K8S) Start

func (k8s K8S) Start(ctx context.Context, req StartRequest) (bool, error)

Start starts kubernetes cluster by ID

func (K8S) Stop

func (k8s K8S) Stop(ctx context.Context, req StopRequest) (bool, error)

Stop stops kubernetes cluster by ID

func (K8S) Update

func (k8s K8S) Update(ctx context.Context, req UpdateRequest) (bool, error)

Update updates name or description of Kubernetes cluster

func (K8S) WorkerAdd

func (k8s K8S) WorkerAdd(ctx context.Context, req WorkerAddRequest) ([]uint64, error)

WorkerAdd add worker nodes to a Kubernetes cluster

func (K8S) WorkerReset

func (k8s K8S) WorkerReset(ctx context.Context, req WorkerResetRequest) (bool, error)

WorkerReset hard reset (compute start + stop) worker node of the Kubernetes cluster

func (K8S) WorkerRestart

func (k8s K8S) WorkerRestart(ctx context.Context, req WorkerRestartRequest) (bool, error)

WorkerRestart soft restart (reboot OS) worker node of the Kubernetes cluster

func (K8S) WorkersGroupAdd

func (k8s K8S) WorkersGroupAdd(ctx context.Context, req WorkersGroupAddRequest) (uint64, error)

WorkersGroupAdd adds workers group to Kubernetes cluster

func (K8S) WorkersGroupDelete

func (k8s K8S) WorkersGroupDelete(ctx context.Context, req WorkersGroupDeleteRequest) (bool, error)

WorkersGroupDelete deletes workers group from Kubernetes cluster

func (K8S) WorkersGroupGetByName

func (k8s K8S) WorkersGroupGetByName(ctx context.Context, req WorkersGroupGetByNameRequest) (*RecordK8SGroups, error)

WorkersGroupGetByName gets worker group metadata by name

type ListACL

type ListACL []ItemACL

List of ACL

type ListDeletedRequest

type ListDeletedRequest struct {
	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

Request struct for get list deleted kubernetes cluster

type ListDetailedInfo

type ListDetailedInfo []ItemDetailedInfo

List detailed information

type ListK8SClusters

type ListK8SClusters []ItemK8SCluster

List of kubernetes clusters

func (ListK8SClusters) FilterByAccountID

func (lkc ListK8SClusters) FilterByAccountID(accountID uint64) ListK8SClusters

FilterByAccountID returns ListK8SClusters with specified AccountID.

func (ListK8SClusters) FilterByCreatedBy

func (lkc ListK8SClusters) FilterByCreatedBy(createdBy string) ListK8SClusters

FilterByCreatedBy returns ListK8SClusters created by specified user.

func (ListK8SClusters) FilterByDeletedBy

func (lkc ListK8SClusters) FilterByDeletedBy(deletedBy string) ListK8SClusters

FilterByDeletedBy returns ListK8SClusters deleted by specified user.

func (ListK8SClusters) FilterByID

func (lkc ListK8SClusters) FilterByID(id uint64) ListK8SClusters

FilterByID returns ListK8SClusters with specified ID.

func (ListK8SClusters) FilterByName

func (lkc ListK8SClusters) FilterByName(name string) ListK8SClusters

FilterByName returns ListK8SClusters with specified Name.

func (ListK8SClusters) FilterByRGID

func (lkc ListK8SClusters) FilterByRGID(rgID uint64) ListK8SClusters

FilterByRGID returns ListK8SClusters with specified RGID.

func (ListK8SClusters) FilterByStatus

func (lkc ListK8SClusters) FilterByStatus(status string) ListK8SClusters

FilterByStatus returns ListK8SClusters with specified Status.

func (ListK8SClusters) FilterByTechStatus

func (lkc ListK8SClusters) FilterByTechStatus(techStatus string) ListK8SClusters

FilterByTechStatus returns ListK8SClusters with specified TechStatus.

func (ListK8SClusters) FilterFunc

func (lkc ListK8SClusters) FilterFunc(predicate func(ItemK8SCluster) bool) ListK8SClusters

FilterFunc allows filtering ListK8SClusters based on a user-specified predicate.

func (ListK8SClusters) FindOne

func (lkc ListK8SClusters) FindOne() ItemK8SCluster

FindOne returns first found ItemK8SCluster If none was found, returns an empty struct.

func (ListK8SClusters) Serialize

func (lkc ListK8SClusters) Serialize(params ...string) (serialization.Serialized, error)

Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.

In order to serialize with indent make sure to follow these guidelines:

  • First argument -> prefix
  • Second argument -> indent

func (ListK8SClusters) SortByCreatedTime

func (lkc ListK8SClusters) SortByCreatedTime(inverse bool) ListK8SClusters

SortByCreatedTime sorts ListK8SClusters by the CreatedTime field in ascending order.

If inverse param is set to true, the order is reversed.

func (ListK8SClusters) SortByDeletedTime

func (lkc ListK8SClusters) SortByDeletedTime(inverse bool) ListK8SClusters

SortByDeletedTime sorts ListK8SClusters by the DeletedTime field in ascending order.

If inverse param is set to true, the order is reversed.

func (ListK8SClusters) SortByUpdatedTime

func (lkc ListK8SClusters) SortByUpdatedTime(inverse bool) ListK8SClusters

SortByUpdatedTime sorts ListK8SClusters by the UpdatedTime field in ascending order.

If inverse param is set to true, the order is reversed.

type ListK8SGroups

type ListK8SGroups []ItemK8SGroup

List kubernetes cluster groups

type ListRequest

type ListRequest struct {
	// Include deleted clusters in result
	// Required: false
	IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

Request struct for get list information K8S

type MasterGroup

type MasterGroup struct {
	// Number of CPU
	CPU uint64 `json:"cpu"`

	// Detailed information
	DetailedInfo ListDetailedInfo `json:"detailedInfo"`

	// Disk ID
	Disk uint64 `json:"disk"`

	// ID
	ID uint64 `json:"id"`

	// Name
	Name string `json:"name"`

	// Num
	Num uint64 `json:"num"`

	// Number of RAM
	RAM uint64 `json:"ram"`
}

Master group information

type RecordACL

type RecordACL struct {
	// Account ACL
	AccountACL ListACL `json:"accountAcl"`

	// K8S ACL
	K8SACL ListACL `json:"k8sAcl"`

	// RG ACL
	RGACL ListACL `json:"rgAcl"`
}

Access Control List

type RecordK8S

type RecordK8S struct {
	// Access Control List
	ACL RecordACL `json:"ACL"`

	// Account ID
	AccountID uint64 `json:"accountId"`

	// Account name
	AccountName string `json:"accountName"`

	// Basic Service ID
	BServiceID uint64 `json:"bserviceId"`

	// CIID
	CIID uint64 `json:"ciId"`

	// Created by
	CreatedBy string `json:"createdBy"`

	// Created time
	CreatedTime uint64 `json:"createdTime"`

	// Deleted by
	DeletedBy string `json:"deletedBy"`

	// Deleted time
	DeletedTime uint64 `json:"deletedTime"`

	// ID
	ID uint64 `json:"id"`

	// K8CI name
	K8CIName string `json:"k8ciName"`

	// Kubernetes cluster groups information
	K8SGroups RecordK8SGroups `json:"k8sGroups"`

	// Load balancer ID
	LBID uint64 `json:"lbId"`

	// Name
	Name string `json:"name"`

	// Network plugin
	NetworkPlugin string `json:"networkPlugin"`

	// Resource group ID
	RGID uint64 `json:"rgId"`

	// Resource group name
	RGName string `json:"rgName"`

	// Status
	Status string `json:"status"`

	// Tech status
	TechStatus string `json:"techStatus"`

	// Updated by
	UpdatedBy string `json:"updatedBy"`

	// Updated time
	UpdatedTime uint64 `json:"updatedTime"`
}

Deteal information about kubernetes cluster

type RecordK8SGroups

type RecordK8SGroups struct {

	// Master information
	Masters MasterGroup `json:"masters"`

	// Worker information
	Workers ListK8SGroups `json:"workers"`
}

Detailed information about kubernetes cluster groups

type RecordServiceAccount

type RecordServiceAccount struct {
	// GUID
	GUID string `json:"guid"`

	// Password
	Password string `json:"password"`

	// Username
	Username string `json:"username"`
}

Information about service account

type RestoreRequest

type RestoreRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`
}

Request struct for restore kubernetes cluster

type StartRequest

type StartRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`
}

Request struct for start kubernetes cluster

type StopRequest

type StopRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`
}

Request struct for stop kubernetes cluster

type UpdateRequest

type UpdateRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// New name to set.
	// If empty string is passed, name is not updated
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// New description to set.
	// If empty string is passed, description is not updated
	// Required: false
	Description string `url:"desc,omitempty" json:"desc,omitempty"`
}

Request struct for update kubernetes cluster

type WorkerAddRequest

type WorkerAddRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// ID of the workers compute group
	// Required: true
	WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId" validate:"required"`

	// How many worker nodes to add
	// Required: true
	Num uint64 `url:"num" json:"num" validate:"required"`
}

Request struct for add worker to a kubernetes cluster

type WorkerResetRequest

type WorkerResetRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// ID of the workers compute group
	// Required: true
	WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId" validate:"required"`

	// Compute ID of worker node to reset
	// Required: true
	WorkerID uint64 `url:"workerId" json:"workerId" validate:"required"`
}

Request struct for hard reset kubernetes cluster

type WorkerRestartRequest

type WorkerRestartRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// ID of the workers compute group
	// Required: true
	WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId" validate:"required"`

	// Compute ID of worker node to restart
	// Required: true
	WorkerID uint64 `url:"workerId" json:"workerId" validate:"required"`
}

Request struct for restart worker node

type WorkersGroupAddRequest

type WorkersGroupAddRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// Worker group name
	// Required: true
	Name string `url:"name" json:"name" validate:"required"`

	// ID of SEP to create boot disks for default worker nodes group. Uses images SEP ID if not set
	// Required: false
	WorkerSEPID uint64 `url:"workerSepId,omitempty" json:"workerSepId,omitempty"`

	// Pool to use if worker SEP ID is set, can be also empty if needed to be chosen by system
	// Required: false
	WorkerSEPPool string `url:"workerSepPool,omitempty" json:"workerSepPool,omitempty"`

	// List of strings with labels for worker group
	// i.e: ["label1=value1", "label2=value2"]
	// Required: false
	Labels []string `url:"labels,omitempty" json:"labels,omitempty"`

	// List of strings with taints for worker group
	// i.e: ["key1=value1:NoSchedule", "key2=value2:NoExecute"]
	// Required: false
	Taints []string `url:"taints,omitempty" json:"taints,omitempty"`

	// List of strings with annotations for worker group
	// i.e: ["key1=value1", "key2=value2"]
	// Required: false
	Annotations []string `url:"annotations,omitempty" json:"annotations,omitempty"`

	// Number of worker nodes to create
	// Required: false
	WorkerNum uint64 `url:"workerNum,omitempty" json:"workerNum,omitempty"`

	// Worker node CPU count
	// Required: false
	WorkerCPU uint64 `url:"workerCpu,omitempty" json:"workerCpu,omitempty"`

	// Worker node RAM volume in MB
	// Required: false
	WorkerRAM uint64 `url:"workerRam,omitempty" json:"workerRam,omitempty"`

	// Worker node boot disk size in GB If 0 is specified, size is defined by the OS image size
	// Required: false
	WorkerDisk uint64 `url:"workerDisk,omitempty" json:"workerDisk,omitempty"`
}

Request struct for add workers group

type WorkersGroupDeleteRequest

type WorkersGroupDeleteRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// Worker group ID
	// Required: true
	WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId" validate:"required"`
}

Request struct for delete workers group

type WorkersGroupGetByNameRequest

type WorkersGroupGetByNameRequest struct {
	// Kubernetes cluster ID
	// Required: true
	K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`

	// Worker group name
	// Required: true
	GroupName string `url:"groupName" json:"groupName" validate:"required"`
}

Request struct for get information about worker group

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL