{"modulePath":"github.com/stackvista/stackstate-process-agent","version":"v0.99.35","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package kubernetes\n\n## Types\n\n```go\ntype ContainerStatus struct {\n\tName        string `json:\"name,omitempty\"`\n\tContainerID string `json:\"containerID,omitempty\"`\n\tImage       string `json:\"image,omitempty\"`\n\tImageID     string `json:\"imageID,omitempty\"`\n}\n```\nContainerStatus contains fields for unmarshaling a ContainerStatus\n\n```go\ntype KubeUtil struct {\n\t// contains filtered or unexported fields\n}\n```\nKubeUtil is a struct to hold Kubernetes config state.\n\n```go\nfunc NewKubeUtil(cfg *config.AgentConfig) (*KubeUtil, error)\n```\nNewKubeUtil returns a new instance of KubeUtil.\n\n```go\nfunc (ku *KubeUtil) GetKubernetesMeta(cfg *config.AgentConfig) *agentpayload.KubeMetadataPayload\n```\nGetKubernetesMeta returns a Kubernetes metadata payload using a mix of state from the Kube master and local kubelet.\n\n```go\nfunc (ku *KubeUtil) GetLocalPodList() ([]*Pod, error)\n```\nGetLocalPodList returns the list of pods running on the node where this pod is running\n\n```go\ntype ObjectMeta struct {\n\tName            string            `json:\"name,omitempty\"`\n\tNamespace       string            `json:\"namespace,omitempty\"`\n\tUid             string            `json:\"uid,omitempty\"`\n\tLabels          map[string]string `json:\"labels,omitempty\"`\n\tOwnerReferences []*OwnerReference `json:\"ownerReferences,omitempty\"`\n}\n```\nObjectMetadata contains the fields for unmarshaling Kubernetes resource metadata limited to just those fields we use in our metadata collection.\n\n```go\ntype OwnerReference struct {\n\tKind string `json:\"kind,omitempty\"`\n\tName string `json:\"name,omitempty\"`\n}\n```\nOwnerReference contains information to identify an owning object limited to what we need for metadata collection.\n\n```go\ntype Pod struct {\n\tMetadata ObjectMeta `json:\"metadata,omitempty\"`\n\tSpec     PodSpec    `json:\"spec,omitempty\"`\n\tStatus   PodStatus  `json:\"status,omitempty\"`\n}\n```\nPod contains fields for unmarshalling a Pod\n\n```go\ntype PodList struct {\n\tItems []*Pod `json:\"items,omitempty\"`\n}\n```\nPodList contains fields for unmarshalling a PodList\n\n```go\ntype PodSpec struct {\n\tHostNetwork bool   `json:\"hostNetwork,omitempty\"`\n\tHostname    string `json:\"hostname,omitempty\"`\n}\n```\nPodSpec contains fields for unmarshalling a PodSpec\n\n```go\ntype PodStatus struct {\n\tHostIP            string             `json:\"hostIP,omitempty\"`\n\tPodIP             string             `json:\"podIP,omitempty\"`\n\tContainerStatuses []*ContainerStatus `json:\"containerStatuses,omitempty\"`\n}\n```\nPodStatus contains fields for unmarshalling a PodStatus\n\n","path":"github.com/stackvista/stackstate-process-agent/util/kubernetes","name":"kubernetes","synopsis":"","isRedistributable":true}
