Documentation ¶
Index ¶
- type Container
- type DaemonSet
- type DaemonSetGetter
- type DaemonSetList
- type DaemonSetStatus
- type EmptyDirVolumeSource
- type GlusterBrick
- type GlusterBricks
- type GlusterClient
- type GlusterVolume
- type GlusterVolumeInfo
- type GlusterVolumeInfoCliOutput
- type GlusterVolumeLimit
- type GlusterVolumeQuota
- type GlusterVolumeQuotaCliOutput
- type GlusterVolumes
- type HostPathVolumeSource
- type KubernetesClient
- type ListMeta
- type ObjectMeta
- type ObjectReference
- type OwnerReference
- type PVLister
- type PersistentVolume
- type PersistentVolumeClaim
- type PersistentVolumeClaimGetter
- type PersistentVolumeClaimSpec
- type PersistentVolumeClaimVolumeSource
- type PersistentVolumeGetter
- type PersistentVolumeList
- type PersistentVolumePhase
- type PersistentVolumeSource
- type PersistentVolumeSpec
- type PersistentVolumeStatus
- type Pod
- type PodList
- type PodLister
- type PodSpec
- type RemoteGlusterCLI
- type RemoteKubectl
- func (k RemoteKubectl) GetDaemonSet(namespace, name string) (*DaemonSet, error)
- func (k RemoteKubectl) GetPersistentVolume(name string) (*PersistentVolume, error)
- func (k RemoteKubectl) GetPersistentVolumeClaim(namespace, name string) (*PersistentVolumeClaim, error)
- func (k RemoteKubectl) GetReplicaSet(namespace, name string) (*ReplicaSet, error)
- func (k RemoteKubectl) GetReplicationController(namespace, name string) (*ReplicationController, error)
- func (k RemoteKubectl) GetStatefulSet(namespace, name string) (*StatefulSet, error)
- func (k RemoteKubectl) ListPersistentVolumes() (*PersistentVolumeList, error)
- func (k RemoteKubectl) ListPods() (*PodList, error)
- type ReplicaSet
- type ReplicaSetGetter
- type ReplicaSetStatus
- type ReplicationController
- type ReplicationControllerGetter
- type ReplicationControllerStatus
- type SerializedReference
- type StatefulSet
- type StatefulSetGetter
- type StatefulSetStatus
- type TypeMeta
- type UID
- type Volume
- type VolumeMount
- type VolumeSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Name string `json:"name"` VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"` }
A single application container that you want to run within a pod.
type DaemonSet ¶ added in v1.3.0
type DaemonSet struct { TypeMeta `json:",inline"` ObjectMeta `json:"metadata,omitempty"` Status DaemonSetStatus `json:"status,omitempty"` }
DaemonSet represents the configuration of a daemon set.
type DaemonSetGetter ¶ added in v1.3.0
DaemonSetGetter gets a given daemonset
type DaemonSetList ¶ added in v1.3.0
type DaemonSetList struct { TypeMeta `json:",inline"` ListMeta `json:"metadata,omitempty"` // Items is a list of daemon sets. Items []DaemonSet `json:"items"` }
DaemonSetList is a collection of daemon sets.
type DaemonSetStatus ¶ added in v1.3.0
type DaemonSetStatus struct { // CurrentNumberScheduled is the number of nodes that are running at least 1 // daemon pod and are supposed to run the daemon pod. CurrentNumberScheduled int32 `json:"currentNumberScheduled"` // NumberMisscheduled is the number of nodes that are running the daemon pod, but are // not supposed to run the daemon pod. NumberMisscheduled int32 `json:"numberMisscheduled"` // DesiredNumberScheduled is the total number of nodes that should be running the daemon // pod (including nodes correctly running the daemon pod). DesiredNumberScheduled int32 `json:"desiredNumberScheduled"` // NumberReady is the number of nodes that should be running the daemon pod and have one // or more of the daemon pod running and ready. NumberReady int32 `json:"numberReady"` }
DaemonSetStatus represents the current status of a daemon set.
type EmptyDirVolumeSource ¶ added in v1.3.0
type EmptyDirVolumeSource struct {
Medium string `json:"medium,omitempty"`
}
Represents an empty directory for a pod.
type GlusterBrick ¶
type GlusterBrick struct {
Text string `xml:",chardata" json:",omitempty"`
}
type GlusterBricks ¶
type GlusterBricks struct {
Brick []*GlusterBrick `xml:" brick,omitempty" json:"brick,omitempty"`
}
type GlusterClient ¶
type GlusterClient interface { ListVolumes() (*GlusterVolumeInfoCliOutput, error) GetQuota(volume string) (*GlusterVolumeQuotaCliOutput, error) }
type GlusterVolume ¶
type GlusterVolume struct { BrickCount uint `xml:" brickCount,omitempty" json:"brickCount,omitempty"` Bricks *GlusterBricks `xml:" bricks,omitempty" json:"bricks,omitempty"` DistCount uint `xml:" distCount,omitempty" json:"distCount,omitempty"` Name string `xml:" name,omitempty" json:"name,omitempty"` ReplicaCount uint `xml:" replicaCount,omitempty" json:"replicaCount,omitempty"` }
type GlusterVolumeInfo ¶
type GlusterVolumeInfo struct {
Volumes *GlusterVolumes `xml:" volumes,omitempty" json:"volumes,omitempty"`
}
type GlusterVolumeInfoCliOutput ¶
type GlusterVolumeInfoCliOutput struct {
VolumeInfo *GlusterVolumeInfo `xml:" volInfo,omitempty" json:"volInfo,omitempty"`
}
gluster volume info all --xml ==============================================================================
func UnmarshalVolumeData ¶
func UnmarshalVolumeData(raw string) (*GlusterVolumeInfoCliOutput, error)
type GlusterVolumeLimit ¶
type GlusterVolumeLimit struct { AvailSpace float64 `xml:" avail_space,omitempty" json:"avail_space,omitempty"` HardLimit float64 `xml:" hard_limit,omitempty" json:"hard_limit,omitempty"` HlExceeded string `xml:" hl_exceeded,omitempty" json:"hl_exceeded,omitempty"` SlExceeded string `xml:" sl_exceeded,omitempty" json:"sl_exceeded,omitempty"` SoftLimitPercent string `xml:" soft_limit_percent,omitempty" json:"soft_limit_percent,omitempty"` SoftLimitValue float64 `xml:" soft_limit_value,omitempty" json:"soft_limit_value,omitempty"` UsedSpace float64 `xml:" used_space,omitempty" json:"used_space,omitempty"` }
type GlusterVolumeQuota ¶
type GlusterVolumeQuota struct {
Limit *GlusterVolumeLimit `xml:" limit,omitempty" json:"limit,omitempty"`
}
type GlusterVolumeQuotaCliOutput ¶
type GlusterVolumeQuotaCliOutput struct {
VolumeQuota *GlusterVolumeQuota `xml:" volQuota,omitempty" json:"volQuota,omitempty"`
}
gluster volume quota $VOLUME list --xml ==============================================================================
func UnmarshalVolumeQuota ¶
func UnmarshalVolumeQuota(raw string) (*GlusterVolumeQuotaCliOutput, error)
type GlusterVolumes ¶
type GlusterVolumes struct { Count uint `xml:" count,omitempty" json:"count,omitempty"` Volume []*GlusterVolume `xml:" volume,omitempty" json:"volume,omitempty"` }
type HostPathVolumeSource ¶ added in v1.3.0
type HostPathVolumeSource struct {
Path string `json:"path"`
}
Represents a host path mapped into a pod.
type KubernetesClient ¶
type ListMeta ¶
type ListMeta struct { SelfLink string `json:"selfLink,omitempty"` ResourceVersion string `json:"resourceVersion,omitempty"` }
ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
type ObjectMeta ¶
type ObjectReference ¶
type ObjectReference struct { Kind string Namespace string `json:"namespace,omitempty"` Name string `json:"name,omitempty"` }
ObjectReference contains enough information to let you inspect or modify the referred object.
type OwnerReference ¶ added in v1.10.0
type PVLister ¶
type PVLister interface {
ListPersistentVolumes() (*PersistentVolumeList, error)
}
PVLister lists persistent volumes that exist on a Kubernetes cluster
type PersistentVolume ¶
type PersistentVolume struct { TypeMeta `json:",inline"` ObjectMeta `json:"metadata,omitempty"` Spec PersistentVolumeSpec `json:"spec,omitempty"` Status PersistentVolumeStatus `json:"status,omitempty"` }
PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node.
type PersistentVolumeClaim ¶ added in v1.3.0
type PersistentVolumeClaim struct { TypeMeta `json:",inline"` ObjectMeta `json:"metadata,omitempty"` // Spec defines the volume requested by a pod author Spec PersistentVolumeClaimSpec }
PersistentVolumeClaim is a user's request for and claim to a persistent volume
type PersistentVolumeClaimGetter ¶ added in v1.3.0
type PersistentVolumeClaimGetter interface {
GetPersistentVolumeClaim(namespace, name string) (*PersistentVolumeClaim, error)
}
PersistentVolumeClaimGetter gets a persistent volume claim
type PersistentVolumeClaimSpec ¶ added in v1.3.0
type PersistentVolumeClaimSpec struct { // VolumeName is the binding reference to the PersistentVolume backing this // claim. When set to non-empty value Selector is not evaluated VolumeName string }
PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes
type PersistentVolumeClaimVolumeSource ¶
type PersistentVolumeClaimVolumeSource struct { ClaimName string `json:"claimName"` ReadOnly bool `json:"readOnly,omitempty"` }
PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).
type PersistentVolumeGetter ¶ added in v1.3.0
type PersistentVolumeGetter interface {
GetPersistentVolume(name string) (*PersistentVolume, error)
}
PersistentVolumeGetter gets a persistent volume
type PersistentVolumeList ¶
type PersistentVolumeList struct { TypeMeta `json:",inline"` ListMeta `json:"metadata,omitempty"` Items []PersistentVolume `json:"items"` }
PersistentVolumeList is a list of PersistentVolume items.
func UnmarshalPVs ¶
func UnmarshalPVs(raw string) (*PersistentVolumeList, error)
type PersistentVolumePhase ¶
type PersistentVolumePhase string
type PersistentVolumeSource ¶ added in v1.3.0
type PersistentVolumeSource struct { // HostPath represents a directory on the host. HostPath *HostPathVolumeSource }
Similar to VolumeSource but meant for the administrator who creates PVs.
type PersistentVolumeSpec ¶
type PersistentVolumeSpec struct { PersistentVolumeSource // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. // Expected to be non-nil when bound. // claim.VolumeName is the authoritative bind between PV and PVC. ClaimRef *ObjectReference `json:"claimRef,omitempty"` }
PersistentVolumeSpec is the specification of a persistent volume.
type PersistentVolumeStatus ¶
type PersistentVolumeStatus struct { // Phase indicates if a volume is available, bound to a claim, or released by a claim. Phase PersistentVolumePhase `json:"phase,omitempty"` }
PersistentVolumeStatus is the current status of a persistent volume.
type Pod ¶
type Pod struct { ObjectMeta `json:"metadata,omitempty"` Spec PodSpec `json:"spec,omitempty"` }
type PodSpec ¶
type PodSpec struct { NodeName string `json:"nodeName"` Volumes []Volume `json:"volumes,omitempty"` Containers []Container `json:"containers"` }
PodSpec is a description of a pod.
type RemoteGlusterCLI ¶
func (RemoteGlusterCLI) GetQuota ¶
func (g RemoteGlusterCLI) GetQuota(volume string) (*GlusterVolumeQuotaCliOutput, error)
GetQuota returns gluster volume quota data using gluster command on the first sotrage node
func (RemoteGlusterCLI) ListVolumes ¶
func (g RemoteGlusterCLI) ListVolumes() (*GlusterVolumeInfoCliOutput, error)
ListVolumes returns gluster volume data using gluster command on the first sotrage node
type RemoteKubectl ¶
RemoteKubectl is a kubectl client that uses an underlying SSH connection to connect to a node that has the kubectl binary. It is expected that this node has access to a kubernetes cluster via kubectl.
func (RemoteKubectl) GetDaemonSet ¶ added in v1.3.0
func (k RemoteKubectl) GetDaemonSet(namespace, name string) (*DaemonSet, error)
GetDaemonSet returns the DaemonSet with the given namespace and name. If not found, returns an error.
func (RemoteKubectl) GetPersistentVolume ¶ added in v1.3.0
func (k RemoteKubectl) GetPersistentVolume(name string) (*PersistentVolume, error)
GetPersistentVolume returns the persistent volume with the given name. If not found, returns an error.
func (RemoteKubectl) GetPersistentVolumeClaim ¶ added in v1.3.0
func (k RemoteKubectl) GetPersistentVolumeClaim(namespace, name string) (*PersistentVolumeClaim, error)
GetPersistentVolumeClaim returns the persistent volume claim with the given name and namespace. If not found, returns an error.
func (RemoteKubectl) GetReplicaSet ¶ added in v1.3.0
func (k RemoteKubectl) GetReplicaSet(namespace, name string) (*ReplicaSet, error)
GetReplicaSet returns the ReplicaSet with the given name in the given namespace. If not found, returns an error.
func (RemoteKubectl) GetReplicationController ¶ added in v1.3.0
func (k RemoteKubectl) GetReplicationController(namespace, name string) (*ReplicationController, error)
GetReplicationController returns the ReplicationController with the given name in the given namespace. If not found, returns an error.
func (RemoteKubectl) GetStatefulSet ¶ added in v1.3.0
func (k RemoteKubectl) GetStatefulSet(namespace, name string) (*StatefulSet, error)
GetStatefulSet returns the stateful set with the given name in the given namespace. If not found, returns an error.
func (RemoteKubectl) ListPersistentVolumes ¶
func (k RemoteKubectl) ListPersistentVolumes() (*PersistentVolumeList, error)
ListPersistentVolumes returns PersistentVolume data
func (RemoteKubectl) ListPods ¶
func (k RemoteKubectl) ListPods() (*PodList, error)
ListPods returns Pods data with --all-namespaces=true flag
type ReplicaSet ¶ added in v1.3.0
type ReplicaSet struct { TypeMeta `json:",inline"` ObjectMeta `json:"metadata,omitempty"` // Status is the current status of this ReplicaSet. This data may be // out of date by some window of time. Status ReplicaSetStatus }
ReplicaSet represents the configuration of a replica set.
type ReplicaSetGetter ¶ added in v1.3.0
type ReplicaSetGetter interface {
GetReplicaSet(namespace, name string) (*ReplicaSet, error)
}
ReplicaSetGetter gets a replica set
type ReplicaSetStatus ¶ added in v1.3.0
type ReplicaSetStatus struct { // Replicas is the number of actual replicas. Replicas int32 }
ReplicaSetStatus represents the current status of a ReplicaSet.
type ReplicationController ¶ added in v1.3.0
type ReplicationController struct { TypeMeta `json:",inline"` ObjectMeta `json:"metadata,omitempty"` // Status is the current status of this replication controller. This data may be // out of date by some window of time. Status ReplicationControllerStatus }
ReplicationController represents the configuration of a replication controller.
type ReplicationControllerGetter ¶ added in v1.3.0
type ReplicationControllerGetter interface {
GetReplicationController(namespace, name string) (*ReplicationController, error)
}
ReplicationControllerGetter gets a replication controller
type ReplicationControllerStatus ¶ added in v1.3.0
type ReplicationControllerStatus struct { // Replicas is the number of actual replicas. Replicas int32 }
ReplicationControllerStatus represents the current status of a replication controller.
type SerializedReference ¶ added in v1.3.0
type SerializedReference struct { TypeMeta Reference ObjectReference }
type StatefulSet ¶ added in v1.3.0
type StatefulSet struct { TypeMeta `json:",inline"` ObjectMeta `json:"metadata,omitempty"` Status StatefulSetStatus }
StatefulSet represents a set of pods with consistent identities.
type StatefulSetGetter ¶ added in v1.3.0
type StatefulSetGetter interface {
GetStatefulSet(namespace, name string) (*StatefulSet, error)
}
StatefulSetGetter gets a stateful set
type StatefulSetStatus ¶ added in v1.3.0
type StatefulSetStatus struct { // Replicas is the number of actual replicas. Replicas int32 }
StatefulSetStatus represents the current status of a StatefulSet.
type TypeMeta ¶
type TypeMeta struct { Kind string `json:"kind,omitempty"` APIVersion string `json:"apiVersion,omitempty"` }
TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.
type Volume ¶
type Volume struct { Name string `json:"name"` VolumeSource `json:",inline"` }
Volume represents a named volume in a pod that may be accessed by any container in the pod.
type VolumeMount ¶
type VolumeMount struct { Name string `json:"name"` ReadOnly bool `json:"readOnly,omitempty"` MountPath string `json:"mountPath"` // Path within the volume from which the container's volume should be mounted SubPath string `json:"subPath,omitempty"` }
VolumeMount describes a mounting of a Volume within a container.
type VolumeSource ¶
type VolumeSource struct { HostPath *HostPathVolumeSource `json:"hostPath,omitempty"` EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty"` PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"` }
Represents the source of a volume to mount. Only one of its members may be specified.