Documentation
¶
Index ¶
- type Client
- func (c *Client) DeleteJobs(ctx context.Context, jobs []JobInfo) (int, error)
- func (c *Client) DeletePods(ctx context.Context, pods []PodInfo) (int, error)
- func (c *Client) DeleteReplicaSets(ctx context.Context, replicaSets []ReplicaSetInfo) (int, error)
- func (c *Client) FindCompletedJobs(ctx context.Context, namespace string) ([]JobInfo, error)
- func (c *Client) FindCompletedPods(ctx context.Context, namespace string) ([]PodInfo, error)
- func (c *Client) FindEvictedPods(ctx context.Context, namespace string) ([]PodInfo, error)
- func (c *Client) FindFailedPods(ctx context.Context, namespace string) ([]PodInfo, error)
- func (c *Client) FindOrphanedReplicaSets(ctx context.Context, namespace string) ([]ReplicaSetInfo, error)
- func (c *Client) GetClusterInfo(ctx context.Context) (*ClusterInfo, error)
- func (c *Client) GetClusterResources(ctx context.Context) (*ClusterResources, error)
- func (c *Client) GetDeploymentHealth(ctx context.Context, namespace string) (*DeploymentHealth, error)
- func (c *Client) GetNamespaceResources(ctx context.Context) ([]NamespaceResources, error)
- func (c *Client) GetNodeHealth(ctx context.Context) (*NodeHealth, error)
- func (c *Client) GetPVCHealth(ctx context.Context, namespace string) (*PVCHealth, error)
- func (c *Client) GetPodHealth(ctx context.Context, namespace string) (*PodHealth, error)
- func (c *Client) GetResourceUtilization(ctx context.Context) (*ResourceUtilization, error)
- func (c *Client) GetServiceHealth(ctx context.Context, namespace string) (*ServiceHealth, error)
- func (c *Client) GetTopPods(ctx context.Context, namespace string, limit int) (*TopPods, error)
- func (c *Client) GetWarningEvents(ctx context.Context, namespace string, limit int) ([]EventInfo, error)
- func (c *Client) ListEvents(ctx context.Context, namespace string, filter EventFilter) ([]EventInfo, error)
- func (c *Client) ListNodes(ctx context.Context) ([]NodeInfo, error)
- func (c *Client) ListPods(ctx context.Context, namespace, labelSelector string) ([]PodInfo, error)
- type ClusterInfo
- type ClusterResources
- type DeploymentHealth
- type EventFilter
- type EventInfo
- type JobInfo
- type NamespaceResources
- type NodeHealth
- type NodeInfo
- type PVCHealth
- type PodHealth
- type PodInfo
- type PodResourceUsage
- type ReplicaSetInfo
- type ResourceUtilization
- type ServiceHealth
- type TopPods
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the Kubernetes clientset
func (*Client) DeleteJobs ¶
DeleteJobs deletes the specified jobs
func (*Client) DeletePods ¶
DeletePods deletes the specified pods
func (*Client) DeleteReplicaSets ¶
DeleteReplicaSets deletes the specified ReplicaSets
func (*Client) FindCompletedJobs ¶
FindCompletedJobs finds completed jobs
func (*Client) FindCompletedPods ¶
FindCompletedPods finds completed pods
func (*Client) FindEvictedPods ¶
FindEvictedPods finds evicted pods
func (*Client) FindFailedPods ¶
FindFailedPods finds failed pods
func (*Client) FindOrphanedReplicaSets ¶
func (c *Client) FindOrphanedReplicaSets(ctx context.Context, namespace string) ([]ReplicaSetInfo, error)
FindOrphanedReplicaSets finds orphaned ReplicaSets
func (*Client) GetClusterInfo ¶
func (c *Client) GetClusterInfo(ctx context.Context) (*ClusterInfo, error)
GetClusterInfo returns cluster information
func (*Client) GetClusterResources ¶
func (c *Client) GetClusterResources(ctx context.Context) (*ClusterResources, error)
GetClusterResources returns cluster resource information
func (*Client) GetDeploymentHealth ¶
func (c *Client) GetDeploymentHealth(ctx context.Context, namespace string) (*DeploymentHealth, error)
GetDeploymentHealth returns deployment health status
func (*Client) GetNamespaceResources ¶
func (c *Client) GetNamespaceResources(ctx context.Context) ([]NamespaceResources, error)
GetNamespaceResources returns resource usage by namespace
func (*Client) GetNodeHealth ¶
func (c *Client) GetNodeHealth(ctx context.Context) (*NodeHealth, error)
GetNodeHealth returns node health status
func (*Client) GetPVCHealth ¶
GetPVCHealth returns PVC health status
func (*Client) GetPodHealth ¶
GetPodHealth returns pod health status
func (*Client) GetResourceUtilization ¶
func (c *Client) GetResourceUtilization(ctx context.Context) (*ResourceUtilization, error)
GetResourceUtilization returns resource utilization
func (*Client) GetServiceHealth ¶
GetServiceHealth returns service health status
func (*Client) GetTopPods ¶
GetTopPods returns top resource consuming pods
func (*Client) GetWarningEvents ¶
func (c *Client) GetWarningEvents(ctx context.Context, namespace string, limit int) ([]EventInfo, error)
GetWarningEvents returns recent warning events
func (*Client) ListEvents ¶
func (c *Client) ListEvents(ctx context.Context, namespace string, filter EventFilter) ([]EventInfo, error)
ListEvents lists events with filters
type ClusterInfo ¶
ClusterInfo contains cluster information
type ClusterResources ¶
type ClusterResources struct {
CPURequests int64
CPULimits int64
CPUAllocatable int64
MemoryRequests int64
MemoryLimits int64
MemoryAllocatable int64
PodCount int
PodCapacity int
}
ClusterResources contains cluster resource information
type DeploymentHealth ¶
DeploymentHealth contains deployment health information
type EventFilter ¶
EventFilter contains event filter options
type EventInfo ¶
type EventInfo struct {
Type string
Reason string
Object string
Kind string
Message string
Count int32
LastTimestamp time.Time
}
EventInfo contains event information
type NamespaceResources ¶
type NamespaceResources struct {
Namespace string
PodCount int
CPURequests int64
MemoryRequests int64
}
NamespaceResources contains namespace resource information
type NodeHealth ¶
NodeHealth contains node health information
type NodeInfo ¶
type NodeInfo struct {
Name string
Ready bool
Roles string
KubeletVersion string
InternalIP string
ExternalIP string
OSImage string
KernelVersion string
ContainerRuntime string
CPUCapacity int64
MemoryCapacity int64
CPUUsagePercent float64
MemoryUsagePercent float64
MemoryPressure bool
DiskPressure bool
PIDPressure bool
CreationTime time.Time
}
NodeInfo contains node information
type PodInfo ¶
type PodInfo struct {
Name string
Namespace string
Status string
ReadyContainers int
TotalContainers int
Restarts int32
Node string
IP string
CreationTime time.Time
}
PodInfo contains pod information
type PodResourceUsage ¶
type PodResourceUsage struct {
Name string
Namespace string
CPUUsage int64
CPURequest int64
MemoryUsage int64
MemoryRequest int64
}
PodResourceUsage contains pod resource usage
type ReplicaSetInfo ¶
ReplicaSetInfo contains ReplicaSet information
type ResourceUtilization ¶
type ResourceUtilization struct {
CPUUsed int64
CPUCapacity int64
MemoryUsed int64
MemoryCapacity int64
}
ResourceUtilization contains resource utilization information
type ServiceHealth ¶
ServiceHealth contains service health information
type TopPods ¶
type TopPods struct {
ByCPU []PodResourceUsage
ByMemory []PodResourceUsage
}
TopPods contains top resource consuming pods