pod

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package pod tracks the current pods from the containerd CRI.

Index

Constants

View Source
const Name = "containerd-pod"

Name is the ID of the containerd pod component.

Variables

This section is empty.

Functions

func New

Types

type Data added in v0.4.5

type Data struct {
	// ContainerdServiceActive is true if the containerd service is active.
	ContainerdServiceActive bool `json:"containerd_service_active"`

	// Pods is the list of pods on the node.
	Pods []PodSandbox `json:"pods,omitempty"`
	// contains filtered or unexported fields
}

type PodSandbox

type PodSandbox struct {
	ID         string                      `json:"id,omitempty"`
	Namespace  string                      `json:"namespace,omitempty"`
	Name       string                      `json:"name,omitempty"`
	State      string                      `json:"state,omitempty"`
	Containers []PodSandboxContainerStatus `json:"containers,omitempty"`
}

PodSandbox represents the pod information fetched from the local container runtime. Simplified version of k8s.io/cri-api/pkg/apis/runtime/v1.PodSandbox. ref. https://pkg.go.dev/k8s.io/cri-api/pkg/apis/runtime/v1#ListPodSandboxResponse

type PodSandboxContainerStatus

type PodSandboxContainerStatus struct {
	ID        string `json:"id,omitempty"`
	Name      string `json:"name,omitempty"`
	Image     string `json:"image,omitempty"`
	CreatedAt int64  `json:"created_at,omitempty"`
	State     string `json:"state,omitempty"`
}

ref. https://pkg.go.dev/k8s.io/cri-api/pkg/apis/runtime/v1#ContainerStatus

Jump to

Keyboard shortcuts

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