Documentation ¶
Index ¶
Constants ¶
View Source
const ( NodePoolLabel = "cloud.google.com/gke-nodepool" PreemptibleLabel = "cloud.google.com/gke-preemptible" NodeRegionLabel = "failure-domain.beta.kubernetes.io/region" NodeZoneLabel = "failure-domain.beta.kubernetes.io/zone" ResourceEvictionKind = "Eviction" ResourceEvictionName = "pods/eviction" NodeNameMaxLength = 37 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // GetCluster returns the owned cluster. GetCluster(ctx context.Context) (*Cluster, error) // GetNodePool returns the node pool by the node pool name. GetNodePool(ctx context.Context, nodePoolName string) (*NodePool, error) // GetNodePoolList returns the node pool list by the owned cluster. GetNodePoolList(ctx context.Context) ([]*NodePool, error) // GetNode returns the node by the node name. GetNode(ctx context.Context, nodeName string) (*Node, error) // GetNodeList returns the nodes into the owned cluster. GetNodeList(ctx context.Context) ([]*Node, error) // GetPod returns the pod by the pod name. GetPod(ctx context.Context, podName string) (*Pod, error) // GetPodListByNodeName returns the pod list by the node name. GetPodListByNodeName(ctx context.Context, nodeName string) ([]*Pod, error) // RefreshNode drains node and deletes node if preemptible. RefreshNode(ctx context.Context, nodeName string) (evictedPods []*Pod, err error) // RefreshNodes drains nodes and deletes nodes if preemptible. RefreshNodes(ctx context.Context, nodeNames []string) (evictedPods []*Pod, err error) }
type Cluster ¶
type Cluster struct { Name string ResourceURL string Region string Status containerProtoV1.Cluster_Status NodePool []*NodePool }
Click to show internal directories.
Click to hide internal directories.