kubernetes

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

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 LogEntry added in v0.5.1

type LogEntry struct {
	Timestamp time.Time
	Content   string
	Pod       string
	Container string
}

LogEntry represents a single log line with its timestamp

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

func (t *Toolset) GetDescription() string

GetDescription returns the description of the toolset

func (*Toolset) GetName

func (t *Toolset) GetName() string

GetName returns the name of the toolset

func (*Toolset) GetTools

func (t *Toolset) GetTools(client interface{}) []toolset.ServerTool

GetTools returns the tools provided by this toolset

Jump to

Keyboard shortcuts

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