nodes

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CCEServiceURL

func CCEServiceURL(client *golangsdk.ServiceClient, clusterID string, parts ...string) string

Types

type Address

type Address struct {
	Type    string `json:"type"`
	Address string `json:"address"`
}

type Capacity

type Capacity struct {
	CCEEni           string `json:"cce/eni"`
	CCESubEni        string `json:"cce/sub-eni"`
	CPU              string `json:"cpu"`
	EphemeralStorage string `json:"ephemeral-storage"`
	HugePages1Gi     string `json:"hugepages-1Gi"`
	HugePages2Mi     string `json:"hugepages-2Mi"`
	Memory           string `json:"memory"`
	Pods             string `json:"pods"`
}

type Condition

type Condition struct {
	Type               string `json:"type"`
	Status             string `json:"status"`
	LastHeartbeatTime  string `json:"lastHeartbeatTime"`
	LastTransitionTime string `json:"lastTransitionTime"`
	Reason             string `json:"reason"`
	Message            string `json:"message"`
}

type DaemonEndpoint

type DaemonEndpoint struct {
	KubeletEndpoint PortEndpoint `json:"kubeletEndpoint"`
}

type GetNode

type GetNode struct {
	Kind       string       `json:"kind"`
	ApiVersion string       `json:"apiVersion"`
	Metadata   MetadataNode `json:"metadata"`
	Spec       Spec         `json:"spec"`
	Status     Status       `json:"status"`
}

type GetResult

type GetResult struct {
	golangsdk.Result
}

func Get

func Get(c *golangsdk.ServiceClient, clusterID, k8sName string) (r GetResult)

Get retrieves a particular nodes based on its unique ID and cluster ID.

func (GetResult) Extract

func (r GetResult) Extract() (*GetNode, error)

type Image

type Image struct {
	Names     []string `json:"names"`
	SizeBytes int      `json:"sizeBytes"`
}

type ListNodes

type ListNodes struct {
	Kind       string       `json:"kind"`
	ApiVersion string       `json:"apiVersion"`
	Metadata   MetadataLink `json:"metadata"`
	Nodes      []Node       `json:"items"`
}

type ListResult

type ListResult struct {
	golangsdk.Result
}

func List

func List(client *golangsdk.ServiceClient, clusterID string) (r ListResult)

List returns collection of nodes.

func (ListResult) Extract

func (r ListResult) Extract() (*ListNodes, error)

type Metadata

type Metadata struct {
	Labels map[string]interface{} `json:"labels,omitempty"`
}
type MetadataLink struct {
	SelfLink        string `json:"selfLink"`
	ResourceVersion string `json:"resourceVersion"`
}

type MetadataNode

type MetadataNode struct {
	Name              string                 `json:"name"`
	SelfLink          string                 `json:"selfLink"`
	ID                string                 `json:"uid"`
	ResourceVersion   string                 `json:"resourceVersion"`
	CreationTimestamp string                 `json:"creationTimestamp"`
	Labels            map[string]interface{} `json:"labels"`
	Annotations       map[string]interface{} `json:"annotations"`
}

type Node

type Node struct {
	Metadata MetadataNode `json:"metadata"`
	Spec     Spec         `json:"spec"`
	Status   Status       `json:"status"`
}

type NodeInfo

type NodeInfo struct {
	MachineID               string `json:"machineID"`
	SystemUUID              string `json:"systemUUID"`
	BootID                  string `json:"bootID"`
	KernelVersion           string `json:"kernelVersion"`
	OsImage                 string `json:"osImage"`
	ContainerRuntimeVersion string `json:"containerRuntimeVersion"`
	KubeletVersion          string `json:"kubeletVersion"`
	KubeProxyVersion        string `json:"kubeProxyVersion"`
	OperatingSystem         string `json:"operatingSystem"`
	Architecture            string `json:"architecture"`
	EniQuotaSize            string `json:"eniQuotaSize"`
}

type PortEndpoint

type PortEndpoint struct {
	Port int `json:"Port"`
}

type Spec

type Spec struct {
	ProviderID string  `json:"providerID"`
	Taints     []Taint `json:"taints"`
}

type Status

type Status struct {
	Capacity        Capacity       `json:"capacity"`
	Allocatable     Capacity       `json:"allocatable"`
	Conditions      []Condition    `json:"conditions"`
	Addresses       []Address      `json:"addresses"`
	DaemonEndpoints DaemonEndpoint `json:"daemonEndpoints"`
	NodeInfo        NodeInfo       `json:"nodeInfo"`
	Images          []Image        `json:"images"`
}

type Taint

type Taint struct {
	Key    string `json:"key"`
	Value  string `json:"value"`
	Effect string `json:"effect"`
}

type UpdateOpts

type UpdateOpts struct {
	Metadata Metadata `json:"metadata,omitempty"`
}

UpdateOpts contains all the values needed to update a new node

func (UpdateOpts) ToNodeUpdateMap

func (opts UpdateOpts) ToNodeUpdateMap() (map[string]interface{}, error)

ToNodeUpdateMap builds an update body based on UpdateOpts.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToNodeUpdateMap() (map[string]interface{}, error)
}

UpdateOptsBuilder allows extensions to add additional parameters to the Update request.

type UpdateResult

type UpdateResult struct {
	golangsdk.Result
}

func Update

func Update(c *golangsdk.ServiceClient, clusterID, k8sName string, opts UpdateOptsBuilder) (r UpdateResult)

Update allows nodes to be updated.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*GetNode, error)

Jump to

Keyboard shortcuts

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