Documentation
¶
Index ¶
- func GetContainerImages(podTemplate *api.PodSpec) []string
- type Container
- type EnvVar
- type Pod
- type PodDetail
- type PodList
- func CreatePodList(pods []api.Pod, pQuery *common.PaginationQuery, ...) PodList
- func GetPodList(client k8sClient.Interface, heapsterClient client.HeapsterClient, ...) (*PodList, error)
- func GetPodListFromChannels(channels *common.ResourceChannels, pQuery *common.PaginationQuery, ...) (*PodList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContainerImages ¶
GetContainerImages returns container image strings from the given pod spec.
Types ¶
type Container ¶ added in v1.1.1
type Container struct {
// Name of the container.
Name string `json:"name"`
// Image URI of the container.
Image string `json:"image"`
// List of environment variables.
Env []EnvVar `json:"env"`
}
Container represents a docker/rkt/etc. container that lives in a pod.
type EnvVar ¶ added in v1.1.1
type EnvVar struct {
// Name of the variable.
Name string `json:"name"`
// Value of the variable. May be empty if value from is defined.
Value string `json:"value"`
// Defined for derived variables. If non-null, the value is get from the reference.
// Note that this is an API struct. This is intentional, as EnvVarSources are plain struct
// references.
ValueFrom *api.EnvVarSource `json:"valueFrom"`
}
EnvVar represents an environment variable of a container.
type Pod ¶
type Pod struct {
ObjectMeta common.ObjectMeta `json:"objectMeta"`
TypeMeta common.TypeMeta `json:"typeMeta"`
// Status of the Pod. See Kubernetes API for reference.
PodPhase api.PodPhase `json:"podPhase"`
// IP address of the Pod.
PodIP string `json:"podIP"`
// Count of containers restarts.
RestartCount int32 `json:"restartCount"`
// Pod metrics.
Metrics *common.PodMetrics `json:"metrics"`
}
Pod is a presentation layer view of Kubernetes Pod resource. This means it is Pod plus additional augumented data we can get from other sources (like services that target it).
type PodDetail ¶
type PodDetail struct {
ObjectMeta common.ObjectMeta `json:"objectMeta"`
TypeMeta common.TypeMeta `json:"typeMeta"`
// Status of the Pod. See Kubernetes API for reference.
PodPhase api.PodPhase `json:"podPhase"`
// IP address of the Pod.
PodIP string `json:"podIP"`
// Name of the Node this Pod runs on.
NodeName string `json:"nodeName"`
// Count of containers restarts.
RestartCount int32 `json:"restartCount"`
// List of container of this pod.
Containers []Container `json:"containers"`
// Pod metrics.
Metrics *common.PodMetrics `json:"metrics"`
}
PodDetail is a presentation layer view of Kubernetes PodDetail resource. This means it is PodDetail plus additional augumented data we can get from other sources (like services that target it).
func GetPodDetail ¶
func GetPodDetail(client k8sClient.Interface, heapsterClient client.HeapsterClient, namespace, name string) (*PodDetail, error)
GetPodDetail returns the details (PodDetail) of a named Pod from a particular namespace.
func ToPodDetail ¶
func ToPodDetail(pod *api.Pod, metrics *common.MetricsByPod, configMaps *api.ConfigMapList) PodDetail
type PodList ¶
type PodList struct {
ListMeta common.ListMeta `json:"listMeta"`
// Unordered list of Pods.
Pods []Pod `json:"pods"`
}
ReplicationSetList contains a list of Pods in the cluster.
func CreatePodList ¶
func CreatePodList(pods []api.Pod, pQuery *common.PaginationQuery, heapsterClient client.HeapsterClient) PodList
func GetPodList ¶
func GetPodList(client k8sClient.Interface, heapsterClient client.HeapsterClient, nsQuery *common.NamespaceQuery, pQuery *common.PaginationQuery) (*PodList, error)
GetPodList returns a list of all Pods in the cluster.
func GetPodListFromChannels ¶
func GetPodListFromChannels(channels *common.ResourceChannels, pQuery *common.PaginationQuery, heapsterClient client.HeapsterClient) (*PodList, error)
GetPodList returns a list of all Pods in the cluster reading required resource list once from the channels.