k8s

package
v1.5.15 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 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 ACL

type ACL 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"`
}

Access Control List

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 (K8CI) for cluster
	// Required: true
	K8CIID 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, workerGroupName"`

	// Network plugin
	// Must be one of these values: flunnel, 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 uint64 `url:"masterNum,omitempty" json:"masterNum,omitempty"`

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

	// Master node RAM volume in MB
	// Required: false
	MasterRAM uint64 `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 uint64 `url:"masterDisk,omitempty" json:"masterDisk,omitempty"`

	// Number of worker nodes to create in default worker group
	// 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"`

	// 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 external network
	// Required: false
	WithLB bool `url:"withLB" json:"withLB"`

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

Request struct for create K8S

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: false
	Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}

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 DisableRequest

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

Request struct for disable kubernetes cluster

type EnableRequest

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

Request struct for 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"`

	// Compute ID of worker node
	// Required: true
	NodeID uint64 `url:"nodeId" json:"nodeId" validate:"required"`
}

Request struct for get worker 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 ItemDetailedInfo

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

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

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

	// Status
	TechStatus string `json:"techStatus"`
}

Deteiled information

type ItemK8S

type ItemK8S 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"`

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

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

	// Created 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"`

	// Service account
	ServiceAccount ServiceAccount `json:"serviceAccount"`

	// SSH key
	SSHKey string `json:"sshKey"`

	// 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
	WorkersGroup ListK8SGroup `json:"workersGroups"`
}

Main information about K8S

func (ItemK8S) Serialize

func (ikc ItemK8S) 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 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 (k K8S) Create(ctx context.Context, req CreateRequest) (string, error)

Create creates a new kubernetes cluster in the specified resource group

func (K8S) Delete

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

Delete deletes kubernetes cluster

func (K8S) DeleteMasterFromGroup

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

DeleteMasterFromGroup deletes compute from masters group in selected kubernetes cluster

func (K8S) DeleteWorkerFromGroup

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

DeleteWorkerFromGroup deletes worker compute from workers group in selected kubernetes cluster

func (K8S) Disable

func (k K8S) Disable(ctx context.Context, req DisableRequest) (bool, error)

Disable disables kubernetes cluster by ID

func (K8S) Enable

func (k K8S) Enable(ctx context.Context, req EnableRequest) (bool, error)

Enable enables kubernetes cluster by ID

func (K8S) FindGroupByLabel

func (k K8S) FindGroupByLabel(ctx context.Context, req FindGroupByLabelRequest) (ListK8SGroup, error)

FindGroupByLabel find worker group information by one on more labels

func (K8S) Get

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

Get gets information about kubernetes cluster

func (K8S) GetConfig

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

GetConfig gets configuration data to access kubernetes cluster

func (K8S) GetNodeAnnotations

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

GetNodeAnnotations gets kubernetes cluster worker node annotations

func (K8S) GetNodeLabels

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

GetNodeLabels gets kubernetes cluster worker node labels

func (K8S) GetNodeTaints

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

GetNodeTaints gets kubernetes cluster worker node taints

func (K8S) List

func (k K8S) List(ctx context.Context, req ListRequest) (*ListK8S, error)

List gets list all kubernetes clusters

func (K8S) ListDeleted

func (k K8S) ListDeleted(ctx context.Context, req ListDeletedRequest) (*ListK8S, error)

ListDeleted gets all deleted kubernetes clusters

func (K8S) Restore

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

Restore restore kubernetes cluster from recycle bin

func (K8S) Start

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

Start starts kubernetes cluster by ID

func (K8S) Stop

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

Stop stops kubernetes cluster by ID

func (K8S) Update

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

Update updates name or description of kubernetes cluster

func (K8S) WorkerAdd

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

WorkerAdd adds worker nodes to a kubernetes cluster

func (K8S) WorkerReset

func (k 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 (k K8S) WorkersGroupAdd(ctx context.Context, req WorkersGroupAddRequest) (string, error)

WorkersGroupAdd adds workers group to kubernetes cluster

func (K8S) WorkersGroupDelete

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

WorkersGroupDelete deletes workers group from kubernetes cluster

func (K8S) WorkersGroupGetByName

func (k K8S) WorkersGroupGetByName(ctx context.Context, req WorkersGroupGetByNameRequest) (*RecordK8SGroup, error)

WorkersGroupGetByName gets worker group metadata by name

type ListACL

type ListACL []ACL

List ACL

type ListDeletedRequest

type ListDeletedRequest struct {
	// Find by ID
	// Required: false
	ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by IP address
	// Required: false
	IPAddress string `url:"ipAddress,omitempty" json:"ipAddress,omitempty"`

	// Find by resource group ID
	// Required: false
	RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`

	// Find by lbId
	// Required: false
	LBID uint64 `url:"lbId,omitempty" json:"lbId,omitempty"`

	// Find by basicServiceId
	// Required: false
	BasicServiceID uint64 `url:"basicServiceId,omitempty" json:"basicServiceId,omitempty"`

	// Find by techStatus
	// Required: false
	TechStatus string `url:"techStatus,omitempty" json:"techStatus,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 deleted kubernetes cluster

type ListDetailedInfo

type ListDetailedInfo []ItemDetailedInfo

List detailed information

type ListK8S

type ListK8S struct {
	// Data
	Data []ItemK8S `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

List K8S

func (ListK8S) FilterByAccountID

func (lkc ListK8S) FilterByAccountID(accountID uint64) ListK8S

FilterByAccountID returns ListK8S with specified AccountID.

func (ListK8S) FilterByCreatedBy

func (lkc ListK8S) FilterByCreatedBy(createdBy string) ListK8S

FilterByCreatedBy returns ListK8S created by specified user.

func (ListK8S) FilterByDeletedBy

func (lkc ListK8S) FilterByDeletedBy(deletedBy string) ListK8S

FilterByDeletedBy returns ListK8S deleted by specified user.

func (ListK8S) FilterByID

func (lkc ListK8S) FilterByID(id uint64) ListK8S

FilterByID returns ListK8S with specified ID.

func (ListK8S) FilterByName

func (lkc ListK8S) FilterByName(name string) ListK8S

FilterByName returns ListK8S with specified Name.

func (ListK8S) FilterByRGID

func (lkc ListK8S) FilterByRGID(rgID uint64) ListK8S

FilterByRGID returns ListK8S with specified RGID.

func (ListK8S) FilterByStatus

func (lkc ListK8S) FilterByStatus(status string) ListK8S

FilterByStatus returns ListK8S with specified Status.

func (ListK8S) FilterByTechStatus

func (lkc ListK8S) FilterByTechStatus(techStatus string) ListK8S

FilterByTechStatus returns ListK8S with specified TechStatus.

func (ListK8S) FilterFunc

func (lkc ListK8S) FilterFunc(predicate func(ItemK8S) bool) ListK8S

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

func (ListK8S) FindOne

func (lkc ListK8S) FindOne() ItemK8S

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

func (ListK8S) Serialize

func (lkc ListK8S) 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 (ListK8S) SortByCreatedTime

func (lkc ListK8S) SortByCreatedTime(inverse bool) ListK8S

SortByCreatedTime sorts ListK8S by the CreatedTime field in ascending order.

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

func (ListK8S) SortByDeletedTime

func (lkc ListK8S) SortByDeletedTime(inverse bool) ListK8S

SortByDeletedTime sorts ListK8S by the DeletedTime field in ascending order.

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

func (ListK8S) SortByUpdatedTime

func (lkc ListK8S) SortByUpdatedTime(inverse bool) ListK8S

SortByUpdatedTime sorts ListK8S by the UpdatedTime field in ascending order.

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

type ListK8SGroup

type ListK8SGroup []RecordK8SGroup

List K8S groups

type ListRequest

type ListRequest struct {
	// Find by ID
	// Required: false
	ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by IP address
	// Required: false
	IPAddress string `url:"ipAddress,omitempty" json:"ipAddress,omitempty"`

	// Find by resource group ID
	// Required: false
	RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`

	// Find by lbId
	// Required: false
	LBID uint64 `url:"lbId,omitempty" json:"lbId,omitempty"`

	// Find by basicServiceId
	// Required: false
	BasicServiceID uint64 `url:"basicServiceId,omitempty" json:"basicServiceId,omitempty"`

	// Find by status
	// Required: false
	Status string `url:"status,omitempty" json:"status,omitempty"`

	// Find by techStatus
	// Required: false
	TechStatus string `url:"techStatus,omitempty" json:"techStatus,omitempty"`

	// 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
	Disk uint64 `json:"disk"`

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

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

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

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

Detailed information about master group

type RecordACLGroup

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

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

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

Detailed information of access control

type RecordK8S

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

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

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

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

	// CI ID
	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"`

	// Detailed information about K8S groups
	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"`
}

Detailed information about K8S

type RecordK8SGroup

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

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

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

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

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

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

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

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

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

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

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

Detailed information about K8S group

type RecordK8SGroups

type RecordK8SGroups struct {
	// Master group
	Masters MasterGroup `json:"masters"`

	// Worker group
	Workers ListK8SGroup `json:"workers"`
}

Detailed info about K8S groups

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 ServiceAccount

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

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

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

Service account

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: false
	Num uint64 `url:"num,omitempty" json:"num,omitempty"`
}

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