Documentation
¶
Index ¶
- Variables
- func CoresFromCPUString(str string) (float64, error)
- func GiBFromMemString(memStr string) (float64, error)
- type AwsElasticBlockStore
- type Client
- func (k *Client) CreateResource(kind string, namespace string, in map[string]interface{}, out *json.RawMessage) error
- func (k *Client) DeleteResource(kind string, namespace string, name string) error
- func (k *Client) EnsureNamespace(name string) error
- func (k *Client) GetResource(kind string, namespace string, name string, out *json.RawMessage) error
- func (k *Client) ListEvents(query string) ([]*Event, error)
- func (k *Client) ListNamespaces(query string) ([]*Namespace, error)
- func (k *Client) ListNodeHeapsterStats() ([]*HeapsterStats, error)
- func (k *Client) ListNodes(query string) ([]*Node, error)
- func (k *Client) ListPodHeapsterCPUUsageMetrics(namespace string, name string) ([]*HeapsterMetric, error)
- func (k *Client) ListPodHeapsterRAMUsageMetrics(namespace string, name string) ([]*HeapsterMetric, error)
- func (k *Client) ListPods(query string) ([]*Pod, error)
- type ClientInterface
- type Container
- type ContainerPort
- type ContainerState
- type ContainerStateRunning
- type ContainerStateTerminated
- type ContainerStatus
- type EnvVar
- type Event
- type EventList
- type FlexVolume
- type HeapsterMetric
- type HeapsterMetrics
- type HeapsterStats
- type ImagePullSecret
- type Metadata
- type Namespace
- type NamespaceList
- type Node
- type NodeAddress
- type NodeList
- type NodeSpec
- type NodeStatus
- type NodeStatusCapacity
- type NodeStatusCondition
- type Pod
- type PodList
- type PodSpec
- type PodStatus
- type PodStatusCondition
- type ResourceValues
- type Resources
- type SecurityContext
- type Source
- type Volume
- type VolumeMount
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CoresFromCPUString ¶
func GiBFromMemString ¶
Types ¶
type AwsElasticBlockStore ¶
type Client ¶
func (*Client) CreateResource ¶
func (*Client) DeleteResource ¶
func (*Client) EnsureNamespace ¶
EnsureNamespace implements the ClientInterface.
func (*Client) GetResource ¶
func (*Client) ListNodeHeapsterStats ¶
func (k *Client) ListNodeHeapsterStats() ([]*HeapsterStats, error)
func (*Client) ListPodHeapsterCPUUsageMetrics ¶
func (k *Client) ListPodHeapsterCPUUsageMetrics(namespace string, name string) ([]*HeapsterMetric, error)
func (*Client) ListPodHeapsterRAMUsageMetrics ¶
func (k *Client) ListPodHeapsterRAMUsageMetrics(namespace string, name string) ([]*HeapsterMetric, error)
type ClientInterface ¶
type ClientInterface interface {
// EnsureNamespace creates a Kubernetes Namespace unless it already exists.
EnsureNamespace(name string) error
GetResource(kind string, namespace string, name string, out *json.RawMessage) error
CreateResource(kind string, namespace string, objIn map[string]interface{}, out *json.RawMessage) error
DeleteResource(kind string, namespace string, name string) error
ListNamespaces(query string) ([]*Namespace, error)
ListEvents(query string) ([]*Event, error)
ListNodes(query string) ([]*Node, error)
ListPods(query string) ([]*Pod, error)
ListNodeHeapsterStats() ([]*HeapsterStats, error)
ListPodHeapsterCPUUsageMetrics(namespace string, name string) ([]*HeapsterMetric, error)
ListPodHeapsterRAMUsageMetrics(namespace string, name string) ([]*HeapsterMetric, error)
}
type Container ¶
type Container struct {
Name string `json:"name"`
Image string `json:"image"`
Command []string `json:"command"`
Resources Resources `json:"resources"`
Ports []ContainerPort `json:"ports"`
VolumeMounts []VolumeMount `json:"volumeMounts"`
Env []EnvVar `json:"env"`
SecurityContext SecurityContext `json:"securityContext"`
ImagePullPolicy string `json:"imagePullPolicy"`
}
type ContainerPort ¶
type ContainerState ¶
type ContainerState struct {
Running ContainerStateRunning `json:"running"`
Terminated ContainerStateTerminated `json:"terminated"`
}
type ContainerStateRunning ¶
type ContainerStateRunning struct {
StartedAt string `json:"startedAt"` // TODO should be time type
}
type ContainerStatus ¶
type ContainerStatus struct {
ContainerID string `json:"containerID"`
Image string `json:"image"`
ImageID string `json:"imageID"`
Name string `json:"name"`
Ready bool `json:"ready"`
RestartCount int `json:"restartCount"`
State ContainerState `json:"state"`
LastState ContainerState `json:"state"`
}
type EventList ¶
type EventList struct {
Items []*Event `json:"items"`
}
------------------------------------------------------------------------------
type FlexVolume ¶
type HeapsterMetric ¶
type HeapsterMetrics ¶
type HeapsterMetrics struct {
Metrics []*HeapsterMetric `json:"metrics"`
}
type HeapsterStats ¶
type ImagePullSecret ¶
type ImagePullSecret struct {
Name string `json:"name"`
}
type NamespaceList ¶
type NamespaceList struct {
Items []*Namespace `json:"items"`
}
------------------------------------------------------------------------------
type Node ¶
type Node struct {
Metadata Metadata `json:"metadata"`
Spec NodeSpec `json:"spec"`
Status NodeStatus `json:"status"`
}
type NodeAddress ¶
type NodeList ¶
type NodeList struct {
Items []*Node `json:"items"`
}
------------------------------------------------------------------------------
type NodeStatus ¶
type NodeStatus struct {
Capacity NodeStatusCapacity `json:"capacity"`
Conditions []NodeStatusCondition `json:"conditions"`
Addresses []NodeAddress `json:"addresses"`
}
type NodeStatusCapacity ¶
type NodeStatusCondition ¶
type PodList ¶
type PodList struct {
Items []*Pod `json:"items"`
}
------------------------------------------------------------------------------
type PodSpec ¶
type PodSpec struct {
Volumes []Volume `json:"volumes"`
Containers []Container `json:"containers"`
ImagePullSecrets []ImagePullSecret `json:"imagePullSecrets"`
TerminationGracePeriodSeconds int `json:"terminationGracePeriodSeconds"`
RestartPolicy string `json:"restartPolicy"`
NodeName string `json:"nodeName"`
}
type PodStatus ¶
type PodStatus struct {
Phase string `json:"phase"`
Conditions []PodStatusCondition `json:"conditions"`
ContainerStatuses []ContainerStatus `json:"containerStatuses"`
}
type PodStatusCondition ¶
type ResourceValues ¶
type Resources ¶
type Resources struct {
Limits ResourceValues `json:"limits"`
Requests ResourceValues `json:"requests"`
}
type SecurityContext ¶
type SecurityContext struct {
Privileged bool `json:"privileged"`
}
type Volume ¶
type Volume struct {
Name string `json:"name"`
AwsElasticBlockStore *AwsElasticBlockStore `json:"awsElasticBlockStore,omitempty"`
FlexVolume *FlexVolume `json:"flexVolume,omitempty"`
}
type VolumeMount ¶
Click to show internal directories.
Click to hide internal directories.