Documentation ¶
Overview ¶
Package resources contains constants and data structures corresponding to the different resources defined in the Kubernetes API.
Index ¶
Constants ¶
const PVNamespace = "default"
Persistent volumes are not namespaced, so use the default namespace.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerDesc ¶
type ContainerDesc struct { Name string Image string Command string PVCMounts []VolumeMount }
ContainerDesc provides an abstraction that allows us to pass around the relevant parts of a container more easily.
type PVCResource ¶
type PVCResource struct {
api.PersistentVolumeClaim
}
PVResource wraps an api.PersistentVolumeClaim and implements the Resource interface.
func (*PVCResource) GetRV ¶
func (p *PVCResource) GetRV() string
func (*PVCResource) GetUID ¶
func (p *PVCResource) GetUID() types.UID
func (*PVCResource) String ¶
func (p *PVCResource) String() string
type PVResource ¶
type PVResource struct {
api.PersistentVolume
}
PVResource wraps an api.PersistentVolume and implements the Resource interface.
func (*PVResource) GetRV ¶
func (p *PVResource) GetRV() string
func (*PVResource) GetUID ¶
func (p *PVResource) GetUID() types.UID
func (*PVResource) String ¶
func (p *PVResource) String() string
type PodResource ¶
PodResource wraps an api.Pod and implements the Resource interface.
func (*PodResource) GetRV ¶
func (p *PodResource) GetRV() string
func (*PodResource) GetUID ¶
func (p *PodResource) GetUID() types.UID
func (*PodResource) String ¶
func (p *PodResource) String() string
type Resource ¶
type Resource interface { GetUID() types.UID GetRV() string String() string // Here for debugging purposes. }
Resource is used to wrap Kubernetes API elements to provide some degree of polymorphism for basic methods (getting the UID and resource version of an object, as well as its string representation).
type ResourceType ¶
type ResourceType string
ResourceType corresponds to the different API server endpoints (and, correspondingly, resources) that we care about.
const ( Pods ResourceType = "pods" PVs ResourceType = "persistentvolumes" PVCs ResourceType = "persistentvolumeclaims" )
type VolumeMount ¶
VolumeMount represents a PVC mount point for a container.