pod

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPodCounts

func GetPodCounts(indexer *client.CacheFactory) (int, error)

func GetPodListByType

func GetPodListByType(kubeClient client.ResourceHandler, namespace, resourceName string, resourceType api.ResourceName) ([]*v1.Pod, error)

resourceType: daemonsets,deployments,cronjobs,statefulsets

func GetPodListPageByType

func GetPodListPageByType(kubeClient client.ResourceHandler, namespace, resourceName string, resourceType api.ResourceName, q *common.QueryParam) (*common.Page, error)

func GetPodStatus

func GetPodStatus(pod *v1.Pod) string

GetPodStatus returns the pod state

func ListKubePod

func ListKubePod(indexer *client.CacheFactory, namespace string, label map[string]string) ([]*v1.Pod, error)

Types

type ContainerStatus

type ContainerStatus struct {
	Name         string `json:"name,omitempty"`
	RestartCount int32  `json:"restartCount"`
}

type ObjectCell

type ObjectCell v1.Pod

implements dataselector.DataCell

func (ObjectCell) GetProperty

implements dataselector.DataCell

type Pod

type Pod struct {
	Name            string            `json:"name,omitempty"`
	Namespace       string            `json:"namespace,omitempty"`
	ContainerStatus []ContainerStatus `json:"containerStatus,omitempty"`
	State           string            `json:"state,omitempty"`
	PodIp           string            `json:"podIp,omitempty"`
	NodeName        string            `json:"nodeName,omitempty"`
	StartTime       time.Time         `json:"startTime,omitempty"`
	Labels          map[string]string `json:"labels,omitempty"`
}

func GetPodsByDeployment

func GetPodsByDeployment(indexer *client.CacheFactory, namespace, name string) ([]*Pod, error)

func ListPodByLabelKey

func ListPodByLabelKey(indexer *client.CacheFactory, namespace string, label string) ([]*Pod, error)

type PodStatistics

type PodStatistics struct {
	Total   int            `json:"total,omitempty"`
	Details map[string]int `json:"details,omitempty"`
}

Jump to

Keyboard shortcuts

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