Documentation
¶
Index ¶
- Constants
- type KubeClient
- func (kc *KubeClient) Close()
- func (kc *KubeClient) FilterPodsByContainerImage(pods []coreV1.Pod, containerImage string, negate bool) ([]coreV1.Pod, error)
- func (kc *KubeClient) GetContainerUUIDs(pod coreV1.Pod) ([]string, error)
- func (kc *KubeClient) GetPodsByUIDs(podUIDs []types.UID) ([]coreV1.Pod, error)
- func (kc *KubeClient) GetPodsInAgentNode() ([]coreV1.Pod, error)
- func (kc *KubeClient) GetPodsStatusByUIDs(podUIDs []types.UID) (maps.Map[types.UID, coreV1.PodPhase], error)
Constants ¶
View Source
const (
// Env variable key for Kubernetes node name
POSTMAN_INSIGHTS_K8S_NODE = "POSTMAN_INSIGHTS_K8S_NODE"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubeClient ¶
type KubeClient struct { Clientset *kubernetes.Clientset PodEventWatch *watchTool.RetryWatcher AgentNode string AgentHost string }
KubeClient struct holds the Kubernetes clientset and event watcher
func NewKubeClient ¶
func NewKubeClient() (KubeClient, error)
NewKubeClient initializes a new Kubernetes client
func (*KubeClient) FilterPodsByContainerImage ¶
func (kc *KubeClient) FilterPodsByContainerImage(pods []coreV1.Pod, containerImage string, negate bool) ([]coreV1.Pod, error)
FilterPodsByContainerImage filters a list of pods by the container image name
func (*KubeClient) GetContainerUUIDs ¶ added in v0.35.0
func (kc *KubeClient) GetContainerUUIDs(pod coreV1.Pod) ([]string, error)
GetContainerUUIDs returns the UUIDs of all containers in a given pod
func (*KubeClient) GetPodsByUIDs ¶
GetPods returns a list of pods running on the agent node with the given names
func (*KubeClient) GetPodsInAgentNode ¶
func (kc *KubeClient) GetPodsInAgentNode() ([]coreV1.Pod, error)
GetPodsInNode returns the names of all pods running in a given node
Click to show internal directories.
Click to hide internal directories.