Documentation
¶
Overview ¶
Package kubernetes provides the Kubernetes toolset using Steve API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapacityContainerInfo ¶ added in v0.5.1
type CapacityContainerInfo struct {
Name string `json:"name"`
CPU CapacityResource `json:"cpu"`
Memory CapacityResource `json:"memory"`
Init bool `json:"init,omitempty"`
}
CapacityContainerInfo holds resource information for a container
type CapacityNodeInfo ¶ added in v0.5.1
type CapacityNodeInfo struct {
Name string `json:"name"`
CPU CapacityResource `json:"cpu"`
Memory CapacityResource `json:"memory"`
PodCount PodCountInfo `json:"podCount"`
Taints []corev1.Taint `json:"taints,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Pods []CapacityPodInfo `json:"pods,omitempty"`
}
CapacityNodeInfo holds resource information for a node
type CapacityPodInfo ¶ added in v0.5.1
type CapacityPodInfo struct {
Namespace string `json:"namespace"`
Name string `json:"name"`
CPU CapacityResource `json:"cpu"`
Memory CapacityResource `json:"memory"`
ContainerCnt int `json:"containerCount"`
Containers []CapacityContainerInfo `json:"containers,omitempty"`
}
CapacityPodInfo holds resource information for a pod
type CapacityResource ¶ added in v0.5.1
type CapacityResource struct {
Capacity int64 `json:"capacity"`
Allocatable int64 `json:"allocatable"`
Requested int64 `json:"requested"`
Limited int64 `json:"limited"`
Utilized int64 `json:"utilized,omitempty"`
}
CapacityResource holds resource metrics for a node
type CapacityResult ¶ added in v0.5.1
type CapacityResult struct {
Nodes []CapacityNodeInfo `json:"nodes"`
Cluster CapacityNodeInfo `json:"cluster"`
ShowPods bool `json:"showPods"`
ShowContainers bool `json:"showContainers"`
ShowUtil bool `json:"showUtil"`
ShowAvailable bool `json:"showAvailable"`
ShowPodCount bool `json:"showPodCount"`
ShowLabels bool `json:"showLabels"`
HideRequests bool `json:"hideRequests"`
HideLimits bool `json:"hideLimits"`
}
CapacityResult holds the complete capacity analysis
type NodeAnalysisResult ¶ added in v0.5.1
type NodeAnalysisResult struct {
Node *unstructured.Unstructured `json:"node"`
Capacity map[string]string `json:"capacity"`
Allocated map[string]string `json:"allocated"`
Taints []corev1.Taint `json:"taints"`
Labels map[string]string `json:"labels"`
Pods []NodePodInfo `json:"pods"`
}
NodeAnalysisResult contains the comprehensive analysis of a node.
type NodePodInfo ¶ added in v0.5.1
type NodePodInfo struct {
Namespace string `json:"namespace"`
Name string `json:"name"`
Phase string `json:"phase"`
CPURequest string `json:"cpuRequest,omitempty"`
MemoryRequest string `json:"memoryRequest,omitempty"`
CPULimit string `json:"cpuLimit,omitempty"`
MemoryLimit string `json:"memoryLimit,omitempty"`
}
NodePodInfo contains summary information about a pod running on the node.
type PodCountInfo ¶ added in v0.5.1
type PodCountInfo struct {
Capacity int64 `json:"capacity"`
Allocatable int64 `json:"allocatable"`
Requested int64 `json:"requested"`
}
PodCountInfo holds pod count information
type RevisionInfo ¶ added in v0.5.1
type RevisionInfo struct {
Revision string `json:"revision"`
ChangeCause string `json:"change_cause"`
Created string `json:"created"`
Name string `json:"name"`
}
RevisionInfo represents a single revision in the rollout history
type Toolset ¶
type Toolset struct {
// ReadOnly disables create, patch, delete operations
ReadOnly bool
// DisableDestructive disables delete operations only
DisableDestructive bool
}
Toolset implements the Kubernetes toolset using Steve API
func (*Toolset) GetDescription ¶
GetDescription returns the description of the toolset
func (*Toolset) GetTools ¶
func (t *Toolset) GetTools(client interface{}) []toolset.ServerTool
GetTools returns the tools provided by this toolset