Documentation
¶
Index ¶
- func GetPodMetadataAndSpec(obj map[string]any) (*metav1.ObjectMeta, *corev1.PodSpec, error)
- func ValidateIfControllerMatches(child map[string]any, controller map[string]any) error
- type Client
- func (client Client) GetAllPersistentVolumeClaims(namespace string) ([]unstructured.Unstructured, error)
- func (client Client) GetAllTopControllersSummary(namespace string) ([]Workload, error)
- func (client Client) GetAllTopControllersWithPods(namespace string) ([]Workload, error)
- func (client Client) GetTopController(unstructuredObject unstructured.Unstructured, ...) (unstructured.Unstructured, error)
- type Workload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPodMetadataAndSpec ¶ added in v0.3.2
GetPodMetadataAndSpec looks inside arbitrary YAML for a PodSpec and it's metadata
Types ¶
type Client ¶ added in v0.3.0
Client is used to interact with the Kubernetes API
func (Client) GetAllPersistentVolumeClaims ¶ added in v0.3.1
func (client Client) GetAllPersistentVolumeClaims(namespace string) ([]unstructured.Unstructured, error)
GetAllPersistentVolumeClaims returns all PVCs as unstructured objects.
func (Client) GetAllTopControllersSummary ¶ added in v0.3.0
GetAllTopControllersSummary returns the highest level owning object of all pods If a namespace is provided than this is limited to that namespace. This can be more memory-efficient than GetAllTopControllersWithPods, since it does not include individual pods.
func (Client) GetAllTopControllersWithPods ¶ added in v0.3.0
GetAllTopControllersWithPods returns the highest level owning object of all pods, as well as all pods. If a namespace is provided than this is limited to that namespace.
func (Client) GetTopController ¶ added in v0.3.0
func (client Client) GetTopController(unstructuredObject unstructured.Unstructured, objectCache map[string]unstructured.Unstructured) (unstructured.Unstructured, error)
GetTopController finds the highest level owner of whatever object is passed in.
type Workload ¶
type Workload struct { TopController unstructured.Unstructured Pods []unstructured.Unstructured PodSpec *corev1.PodSpec PodMetadata *metav1.ObjectMeta PodCount int RunningPodCount int }
Workload represents a workload in the cluster. It contains the top level object and all of the pods.