Documentation
¶
Overview ¶
API for kubernetes clusters management
Index ¶
- type ACL
- type CreateRequest
- type DeleteMasterFromGroupRequest
- type DeleteRequest
- type DeleteWorkerFromGroupRequest
- type DisableRequest
- type EnableRequest
- type FindGroupByLabelRequest
- type GetConfigRequest
- type GetNodeAnnotationsRequest
- type GetNodeLabelsRequest
- type GetNodeTaintsRequest
- type GetRequest
- type GetWorkerNodesMetaDataRequest
- type ItemDetailedInfo
- type ItemK8S
- type K8S
- func (k K8S) Create(ctx context.Context, req CreateRequest) (string, error)
- func (k K8S) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (k K8S) DeleteMasterFromGroup(ctx context.Context, req DeleteMasterFromGroupRequest) (bool, error)
- func (k K8S) DeleteWorkerFromGroup(ctx context.Context, req DeleteWorkerFromGroupRequest) (bool, error)
- func (k K8S) Disable(ctx context.Context, req DisableRequest) (bool, error)
- func (k K8S) Enable(ctx context.Context, req EnableRequest) (bool, error)
- func (k K8S) FindGroupByLabel(ctx context.Context, req FindGroupByLabelRequest) (ListK8SGroup, error)
- func (k K8S) Get(ctx context.Context, req GetRequest) (*RecordK8S, error)
- func (k K8S) GetConfig(ctx context.Context, req GetConfigRequest) (string, error)
- func (k K8S) GetNodeAnnotations(ctx context.Context, req GetNodeAnnotationsRequest) (string, error)
- func (k K8S) GetNodeLabels(ctx context.Context, req GetNodeLabelsRequest) (string, error)
- func (k K8S) GetNodeTaints(ctx context.Context, req GetNodeTaintsRequest) (string, error)
- func (k K8S) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)
- func (k K8S) GetWorkerNodesMetaData(ctx context.Context, req GetWorkerNodesMetaDataRequest) (string, error)
- func (k K8S) List(ctx context.Context, req ListRequest) (*ListK8S, error)
- func (k K8S) ListDeleted(ctx context.Context, req ListDeletedRequest) (*ListK8S, error)
- func (k K8S) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)
- func (k K8S) Restore(ctx context.Context, req RestoreRequest) (bool, error)
- func (k K8S) Start(ctx context.Context, req StartRequest) (bool, error)
- func (k K8S) Stop(ctx context.Context, req StopRequest) (bool, error)
- func (k K8S) Update(ctx context.Context, req UpdateRequest) (bool, error)
- func (k K8S) UpdateWorkerNodesMetaData(ctx context.Context, req UpdateWorkerNodesMetaDataRequest) (bool, error)
- func (k K8S) WorkerAdd(ctx context.Context, req WorkerAddRequest) ([]uint64, error)
- func (k K8S) WorkerReset(ctx context.Context, req WorkerResetRequest) (bool, error)
- func (k8s K8S) WorkerRestart(ctx context.Context, req WorkerRestartRequest) (bool, error)
- func (k K8S) WorkersGroupAdd(ctx context.Context, req WorkersGroupAddRequest) (string, error)
- func (k K8S) WorkersGroupDelete(ctx context.Context, req WorkersGroupDeleteRequest) (bool, error)
- func (k K8S) WorkersGroupGetByName(ctx context.Context, req WorkersGroupGetByNameRequest) (*RecordK8SGroup, error)
- type ListACL
- type ListDeletedRequest
- type ListDetailedInfo
- type ListK8S
- func (lkc ListK8S) FilterByAccountID(accountID uint64) ListK8S
- func (lkc ListK8S) FilterByCreatedBy(createdBy string) ListK8S
- func (lkc ListK8S) FilterByDeletedBy(deletedBy string) ListK8S
- func (lkc ListK8S) FilterByID(id uint64) ListK8S
- func (lkc ListK8S) FilterByName(name string) ListK8S
- func (lkc ListK8S) FilterByRGID(rgID uint64) ListK8S
- func (lkc ListK8S) FilterByStatus(status string) ListK8S
- func (lkc ListK8S) FilterByTechStatus(techStatus string) ListK8S
- func (lkc ListK8S) FilterFunc(predicate func(ItemK8S) bool) ListK8S
- func (lkc ListK8S) FindOne() ItemK8S
- func (lk ListK8S) IDs() []uint64
- func (lkc ListK8S) Serialize(params ...string) (serialization.Serialized, error)
- func (lkc ListK8S) SortByCreatedTime(inverse bool) ListK8S
- func (lkc ListK8S) SortByDeletedTime(inverse bool) ListK8S
- func (lkc ListK8S) SortByUpdatedTime(inverse bool) ListK8S
- type ListK8SGroup
- type ListRequest
- type MasterGroup
- type RecordACLGroup
- type RecordK8S
- type RecordK8SGroup
- type RecordK8SGroups
- type RestoreRequest
- type ServiceAccount
- type StartRequest
- type StopRequest
- type UpdateRequest
- type UpdateWorkerNodesMetaDataRequest
- type WorkerAddRequest
- type WorkerResetRequest
- type WorkerRestartRequest
- type WorkersGroupAddRequest
- type WorkersGroupDeleteRequest
- type WorkersGroupGetByNameRequest
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: flannel, weavenet, 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"` // ID of the ViNS to connect k8s cluster. If nothing is specified, ViNS will be created automatically // Required: false VinsId uint64 `url:"vinsId,omitempty" json:"vinsId,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"` // Custom sysctl values for Load Balancer instance. Applied on boot // Required: false LbSysctlParams string `url:"lbSysctlParams,omitempty" json:"lbSysctlParams,omitempty"` // Use Highly Available schema for LB deploy // Required: false HighlyAvailable bool `url:"highlyAvailableLB,omitempty" json:"highlyAvailableLB,omitempty"` // Optional extra Subject Alternative Names (SANs) to use for the API Server serving certificate. Can be both IP addresses and DNS names // Required: false AdditionalSANs []string `url:"additionalSANs,omitempty" json:"additionalSANs,omitempty"` // Is used to define settings and actions that should be performed before any other component in the cluster starts. // It allows you to configure things like node registration, network setup, and other initialization tasks. insert a valid JSON string with all levels of nesting // Required: false InitConfiguration string `url:"initConfiguration,omitempty" json:"initConfiguration,omitempty"` // Is used to define global settings and configurations for the entire cluster. // It includes parameters such as cluster name, DNS settings, authentication methods, and other cluster-wide configurations. // Insert a valid JSON string with all levels of nesting // Required: false ClusterConfiguration string `url:"clusterConfiguration,omitempty" json:"clusterConfiguration,omitempty"` // Is used to configure the behavior and settings of the Kubelet, which is the primary node agent that runs on each node in the cluster. // It includes parameters such as node IP address, resource allocation, pod eviction policies, and other Kubelet-specific configurations. // Insert a valid JSON string with all levels of nesting // Required: false KubeletConfiguration string `url:"kubeletConfiguration,omitempty" json:"kubeletConfiguration,omitempty"` // Is used to configure the behavior and settings of the Kube-proxy, which is responsible for network proxying and load balancing within the cluster. // It includes parameters such as proxy mode, cluster IP ranges, and other Kube-proxy specific configurations. // Insert a valid JSON string with all levels of nesting // Required: false KubeProxyConfiguration string `url:"kubeProxyConfiguration,omitempty" json:"kubeProxyConfiguration,omitempty"` // Is used to configure the behavior and settings for joining a node to a cluster. // It includes parameters such as the cluster's control plane endpoint, token, and certificate key. insert a valid JSON string with all levels of nesting // Required: false JoinConfiguration string `url:"joinConfiguration,omitempty" json:"joinConfiguration,omitempty"` // Text description of this kubernetes cluster // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` // Meta data for working group computes, format YAML "user_data": 1111 // Required: false UserData string `url:"userData,omitempty" json:"userData,omitempty"` // Use only selected ExtNet for infrastructure connections // Required: false ExtNetOnly bool `url:"extnetOnly,omitempty" json:"extnetOnly,omitempty"` // Insert ssl certificate in x509 pem format // Required: false OidcCertificate string `url:"oidcCertificate,omitempty" json:"oidcCertificate,omitempty"` }
CreateRequest struct to 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"` }
DeleteMasterFromGroupRequest struct to 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" json:"permanently"` }
DeleteRequest struct to 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"` }
DeleteWorkerFromGroupRequest struct to delete worker from group
type DisableRequest ¶
type DisableRequest struct { // Kubernetes cluster ID // Required: true K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"` }
DisableRequest struct to disable kubernetes cluster
type EnableRequest ¶
type EnableRequest struct { // Kubernetes cluster ID // Required: true K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"` }
EnableRequest struct to 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"` }
FindGroupByLabelRequest 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"` }
GetConfigRequest struct to 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"` }
GetNodeAnnotationsRequest struct to 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"` }
GetNodeLabelsRequest struct to 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"` }
GetNodeTaintsRequest struct to get node taints
type GetRequest ¶
type GetRequest struct { // Kubernetes cluster ID // Required: true K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"` }
GetRequest struct to get detailed information about kubernetes cluster
type GetWorkerNodesMetaDataRequest ¶ added in v1.6.0
type GetWorkerNodesMetaDataRequest 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"` }
GetWorkerNodesMetaDataRequest struct to get worker group metadata by ID
type ItemDetailedInfo ¶
type ItemDetailedInfo struct { // External Ip ExternalIp string `json:"externalip"` // ID ID uint64 `json:"id"` // Name Name string `json:"name"` // Status Status string `json:"status"` // Tech 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 (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) FindGroupByLabel ¶
func (k K8S) FindGroupByLabel(ctx context.Context, req FindGroupByLabelRequest) (ListK8SGroup, error)
FindGroupByLabel finds worker group information by one on more labels
func (K8S) GetNodeAnnotations ¶
GetNodeAnnotations gets kubernetes cluster worker node annotations
func (K8S) GetNodeLabels ¶
GetNodeLabels gets kubernetes cluster worker node labels
func (K8S) GetNodeTaints ¶
GetNodeTaints gets kubernetes cluster worker node taints
func (K8S) GetRaw ¶ added in v1.6.6
GetRaw gets information about kubernetes cluster as an array of bytes
func (K8S) GetWorkerNodesMetaData ¶ added in v1.6.0
func (k K8S) GetWorkerNodesMetaData(ctx context.Context, req GetWorkerNodesMetaDataRequest) (string, error)
GetWorkerNodesMetaData gets worker group metadata by ID
func (K8S) ListDeleted ¶
ListDeleted gets all deleted kubernetes clusters
func (K8S) ListRaw ¶ added in v1.6.6
ListRaw gets list of all kubernetes clusters as an array of bytes
func (K8S) UpdateWorkerNodesMetaData ¶ added in v1.6.0
func (k K8S) UpdateWorkerNodesMetaData(ctx context.Context, req UpdateWorkerNodesMetaDataRequest) (bool, error)
UpdateWorkerNodesMetaData adds worker nodes to a kubernetes cluster
func (K8S) WorkerReset ¶
WorkerReset hard reset (compute start + stop) worker node of the kubernetes cluster
func (K8S) WorkerRestart ¶
WorkerRestart soft restart (reboot OS) worker node of the kubernetes cluster
func (K8S) WorkersGroupAdd ¶
WorkersGroupAdd adds workers group to kubernetes cluster
func (K8S) WorkersGroupDelete ¶
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 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"` }
ListDeletedRequest struct to get list of deleted kubernetes cluster
type ListDetailedInfo ¶
type ListDetailedInfo []ItemDetailedInfo
List detailed information
func (ListDetailedInfo) IDs ¶ added in v1.6.8
func (ldi ListDetailedInfo) IDs() []uint64
IDs gets array of Worker or Master ComputesIDs from ListDetailedInfo struct
type ListK8S ¶
type ListK8S struct { // Data Data []ItemK8S `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List K8S
func (ListK8S) FilterByAccountID ¶
FilterByAccountID returns ListK8S with specified AccountID.
func (ListK8S) FilterByCreatedBy ¶
FilterByCreatedBy returns ListK8S created by specified user.
func (ListK8S) FilterByDeletedBy ¶
FilterByDeletedBy returns ListK8S deleted by specified user.
func (ListK8S) FilterByID ¶
FilterByID returns ListK8S with specified ID.
func (ListK8S) FilterByName ¶
FilterByName returns ListK8S with specified Name.
func (ListK8S) FilterByRGID ¶
FilterByRGID returns ListK8S with specified RGID.
func (ListK8S) FilterByStatus ¶
FilterByStatus returns ListK8S with specified Status.
func (ListK8S) FilterByTechStatus ¶
FilterByTechStatus returns ListK8S with specified TechStatus.
func (ListK8S) FilterFunc ¶
FilterFunc allows filtering ListK8S based on a user-specified predicate.
func (ListK8S) FindOne ¶
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 ¶
SortByCreatedTime sorts ListK8S by the CreatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListK8S) SortByDeletedTime ¶
SortByDeletedTime sorts ListK8S by the DeletedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListK8S) SortByUpdatedTime ¶
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
func (ListK8SGroup) IDs ¶ added in v1.6.8
func (lwg ListK8SGroup) IDs() []uint64
IDs gets array of K8SWorkerGroupIDs from ListK8SGroups struct
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"` }
ListRequest struct to 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"` }
RestoreRequest struct to 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"` }
StartRequest struct to start kubernetes cluster
type StopRequest ¶
type StopRequest struct { // Kubernetes cluster ID // Required: true K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"` }
StopRequest struct to 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"` }
UpdateRequest struct to update kubernetes cluster
type UpdateWorkerNodesMetaDataRequest ¶ added in v1.6.0
type UpdateWorkerNodesMetaDataRequest 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"` // Meta data for working group computes, format YAML "user_data": 1111 // Required: true UserData string `url:"userData" json:"userData" validate:"required"` }
UpdateWorkerNodesMetaDataRequest struct to add worker to a 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"` }
WorkerAddRequest struct to 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"` }
WorkerResetRequest 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"` }
WorkerRestartRequest struct to 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"` // Meta data for working group computes, format YAML "user_data": 1111 // Required: false UserData string `url:"userData,omitempty" json:"userData,omitempty"` }
WorkersGroupAddRequest struct to 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"` }
WorkersGroupDeleteRequest struct to 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"` }
WorkersGroupGetByNameRequest struct to get information about worker group
Source Files
¶
- create.go
- delete.go
- delete_master_from_group.go
- delete_worker_from_group.go
- disable.go
- enable.go
- filter.go
- find_group_by_label.go
- get.go
- get_config.go
- get_node_annotations.go
- get_node_labels.go
- get_node_taints.go
- get_worker_nodes_meta_data.go
- ids.go
- k8s.go
- list.go
- list_deleted.go
- models.go
- restore.go
- serialize.go
- sorting.go
- start.go
- stop.go
- update.go
- update_worker_nodes_meta_data.go
- worker_add.go
- worker_reset.go
- worker_restart.go
- workers_group_add.go
- workers_group_delete.go
- workers_group_get_by_name.go