Documentation
¶
Index ¶
- Variables
- func CoresFromCPUString(str string) (float64, error)
- func GiBFromMemString(memStr string) (float64, error)
- type AwsElasticBlockStore
- type Cinder
- type Client
- func (k *Client) CreateResource(apiVersion, kind, namespace string, in interface{}, out interface{}) error
- func (k *Client) DeleteResource(apiVersion, kind, namespace, name string) error
- func (k *Client) EnsureNamespace(name string) error
- func (k *Client) GetPodLog(namespace, name string) (string, error)
- func (k *Client) GetResource(apiVersion, kind, namespace, name string, out interface{}) 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) ListPersistentVolumes(query string) ([]*PersistentVolume, 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)
- func (k *Client) ListServices(query string) ([]*Service, error)
- func (k *Client) UpdateResource(apiVersion, kind, namespace, name string, in interface{}, out interface{}) error
- type ClientInterface
- type Container
- type ContainerPort
- type ContainerState
- type ContainerStateRunning
- type ContainerStateTerminated
- type ContainerStatus
- type EnvVar
- type Event
- type EventList
- type FlexVolume
- type GcePersistentDisk
- type HeapsterMetric
- type HeapsterMetrics
- type HeapsterStats
- type ImagePullSecret
- type LoadBalancerIngress
- type LoadBalancerStatus
- type Metadata
- type Namespace
- type NamespaceList
- type Node
- type NodeAddress
- type NodeList
- type NodeSpec
- type NodeStatus
- type NodeStatusCapacity
- type NodeStatusCondition
- type PersistentVolume
- type PersistentVolumeCapacity
- type PersistentVolumeList
- type PersistentVolumeSpec
- type PersistentVolumeStatus
- type Pod
- type PodList
- type PodSpec
- type PodStatus
- type PodStatusCondition
- type ResourceValues
- type Resources
- type SecurityContext
- type Service
- type ServiceList
- type ServicePort
- type ServiceSpec
- type ServiceStatus
- 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) ListPersistentVolumes ¶ added in v0.14.0
func (k *Client) ListPersistentVolumes(query string) ([]*PersistentVolume, 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)
func (*Client) ListServices ¶ added in v0.14.0
func (*Client) UpdateResource ¶ added in v0.14.0
type ClientInterface ¶
type ClientInterface interface {
// EnsureNamespace creates a Kubernetes Namespace unless it already exists.
EnsureNamespace(name string) error
GetResource(apiVersion, kind, namespace, name string, out interface{}) error
CreateResource(apiVersion, kind, namespace string, objIn interface{}, out interface{}) error
UpdateResource(apiVersion, kind, namespace, name string, objIn interface{}, out interface{}) error
DeleteResource(apiVersion, kind, namespace, name string) error
ListNamespaces(query string) ([]*Namespace, error)
ListEvents(query string) ([]*Event, error)
ListNodes(query string) ([]*Node, error)
ListPods(query string) ([]*Pod, error)
ListServices(query string) ([]*Service, error)
ListPersistentVolumes(query string) ([]*PersistentVolume, error)
GetPodLog(namespace, name string) (string, 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"`
Args []string `json:"args"`
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 GcePersistentDisk ¶ added in v0.13.5
type HeapsterMetric ¶
type HeapsterMetrics ¶
type HeapsterMetrics struct {
Metrics []*HeapsterMetric `json:"metrics"`
}
type HeapsterStats ¶
type ImagePullSecret ¶
type ImagePullSecret struct {
Name string `json:"name"`
}
type LoadBalancerIngress ¶ added in v0.14.0
type LoadBalancerIngress struct {
Hostname string `json:"hostname"`
}
type LoadBalancerStatus ¶ added in v0.14.0
type LoadBalancerStatus struct {
Ingress []LoadBalancerIngress `json:"ingress"`
}
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 PersistentVolume ¶ added in v0.14.0
type PersistentVolume struct {
Metadata Metadata `json:"metadata"`
Spec PersistentVolumeSpec `json:"spec"`
Status PersistentVolumeStatus `json:"status"`
}
type PersistentVolumeCapacity ¶ added in v0.14.0
type PersistentVolumeCapacity struct {
Storage string `json:"storage"`
}
type PersistentVolumeList ¶ added in v0.14.0
type PersistentVolumeList struct {
Items []*PersistentVolume `json:"items"`
}
------------------------------------------------------------------------------
type PersistentVolumeSpec ¶ added in v0.14.0
type PersistentVolumeSpec struct {
Capacity PersistentVolumeCapacity `json:"capacity"`
AwsElasticBlockStore *AwsElasticBlockStore `json:"awsElasticBlockStore,omitempty"`
FlexVolume *FlexVolume `json:"flexVolume,omitempty"`
Cinder *Cinder `json:"cinder,omitempty"`
AccessModes []string `json:"accessModes"`
ClaimRef Metadata `json:"claimRef"`
PersistentVolumeReclaimPolicy string `json:"persistentVolumeReclaimPolicy"`
}
type PersistentVolumeStatus ¶ added in v0.14.0
type PersistentVolumeStatus struct {
Phase string `json:"phase"`
}
TODO can this be generalized?
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 Service ¶ added in v0.14.0
type Service struct {
Metadata Metadata `json:"metadata"`
Spec ServiceSpec `json:"spec"`
Status ServiceStatus `json:"status"`
}
type ServiceList ¶ added in v0.14.0
type ServiceList struct {
Items []*Service `json:"items"`
}
------------------------------------------------------------------------------
type ServicePort ¶ added in v0.14.0
type ServiceSpec ¶ added in v0.14.0
type ServiceSpec struct {
Type string `json:"type,omitempty"`
Selector map[string]string `json:"selector"`
Ports []ServicePort `json:"ports"`
ClusterIP string `json:"clusterIP,omitempty"`
}
type ServiceStatus ¶ added in v0.14.0
type ServiceStatus struct {
LoadBalancer LoadBalancerStatus `json:"loadBalancer"`
}
type Volume ¶
type Volume struct {
Name string `json:"name"`
AwsElasticBlockStore *AwsElasticBlockStore `json:"awsElasticBlockStore,omitempty"`
FlexVolume *FlexVolume `json:"flexVolume,omitempty"`
Cinder *Cinder `json:"cinder,omitempty"`
GcePersistentDisk *GcePersistentDisk `json:"gcePersistentDisk,omitempty"`
}
type VolumeMount ¶
Click to show internal directories.
Click to hide internal directories.