kubernetes

package
Version: v0.99.35 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2017 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerStatus

type ContainerStatus struct {
	Name        string `json:"name,omitempty"`
	ContainerID string `json:"containerID,omitempty"`
	Image       string `json:"image,omitempty"`
	ImageID     string `json:"imageID,omitempty"`
}

ContainerStatus contains fields for unmarshaling a ContainerStatus

type KubeUtil

type KubeUtil struct {
	// contains filtered or unexported fields
}

KubeUtil is a struct to hold Kubernetes config state.

func NewKubeUtil

func NewKubeUtil(cfg *config.AgentConfig) (*KubeUtil, error)

NewKubeUtil returns a new instance of KubeUtil.

func (*KubeUtil) GetKubernetesMeta

func (ku *KubeUtil) GetKubernetesMeta(cfg *config.AgentConfig) *agentpayload.KubeMetadataPayload

GetKubernetesMeta returns a Kubernetes metadata payload using a mix of state from the Kube master and local kubelet.

func (*KubeUtil) GetLocalPodList

func (ku *KubeUtil) GetLocalPodList() ([]*Pod, error)

GetLocalPodList returns the list of pods running on the node where this pod is running

type ObjectMeta

type ObjectMeta struct {
	Name            string            `json:"name,omitempty"`
	Namespace       string            `json:"namespace,omitempty"`
	Uid             string            `json:"uid,omitempty"`
	Labels          map[string]string `json:"labels,omitempty"`
	OwnerReferences []*OwnerReference `json:"ownerReferences,omitempty"`
}

ObjectMetadata contains the fields for unmarshaling Kubernetes resource metadata limited to just those fields we use in our metadata collection.

type OwnerReference

type OwnerReference struct {
	Kind string `json:"kind,omitempty"`
	Name string `json:"name,omitempty"`
}

OwnerReference contains information to identify an owning object limited to what we need for metadata collection.

type Pod

type Pod struct {
	Metadata ObjectMeta `json:"metadata,omitempty"`
	Spec     PodSpec    `json:"spec,omitempty"`
	Status   PodStatus  `json:"status,omitempty"`
}

Pod contains fields for unmarshalling a Pod

type PodList

type PodList struct {
	Items []*Pod `json:"items,omitempty"`
}

PodList contains fields for unmarshalling a PodList

type PodSpec

type PodSpec struct {
	HostNetwork bool   `json:"hostNetwork,omitempty"`
	Hostname    string `json:"hostname,omitempty"`
}

PodSpec contains fields for unmarshalling a PodSpec

type PodStatus

type PodStatus struct {
	HostIP            string             `json:"hostIP,omitempty"`
	PodIP             string             `json:"podIP,omitempty"`
	ContainerStatuses []*ContainerStatus `json:"containerStatuses,omitempty"`
}

PodStatus contains fields for unmarshalling a PodStatus

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL