Documentation
¶
Index ¶
Constants ¶
const ( CRDPlural string = "groups" CRDGroup string = "vmware.purser.com" CRDVersion string = "v1" FullCRDName string = CRDPlural + "." + CRDGroup )
CRD Group attributes
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(AddKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
SchemeBuilder parameters
var SchemeGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Group ¶
type Group struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec GroupSpec `json:"spec"` Status GroupStatus `json:"status,omitempty"` }
Group describes our custom Group resource
func (*Group) DeepCopyInto ¶
DeepCopyInto copies all properties of this object into another object of the same type that is provided as a pointer.
func (*Group) DeepCopyObject ¶
DeepCopyObject returns a generically typed copy of an object
type GroupList ¶
type GroupList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []*Group `json:"items"` }
GroupList is the list of Group resources
func (*GroupList) DeepCopyObject ¶
DeepCopyObject returns a generically typed copy of an object
type GroupSpec ¶
type GroupSpec struct { Name string `json:"name"` Type string `json:"type,omitempty"` Labels map[string]string `json:"labels,omitempty"` AllocatedResources *metrics.Metrics `json:"metrics,omitempty"` PodsMetrics map[string]*metrics.Metrics `json:"pods,omitempty"` PodsDetails map[string]*PodDetails `json:"podDetails,omitempty"` }
GroupSpec is the spec for the Group resource
type GroupStatus ¶
type GroupStatus struct { State string `json:"state,omitempty"` Message string `json:"message,omitempty"` }
GroupStatus holds the status information for each Group resource
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct { Name string VolumeName string RequestSizeInGB []float64 CapacityAllotedInGB []float64 BoundTimes []meta_v1.Time UnboundTimes []meta_v1.Time }
PersistentVolumeClaim information for the pods associated with the Group resource A PVC can bound and unbound to a pod many times, so maintaining BoundTimes and UnboundTimes as lists. A PVC can be upgraded or downgraded, so maintaining capacityAllocated as a list Whenever a PVC capacity changes will update UnboundTime for old capacity, and append new capacity to capacityAllocated with bound time appended to BoundTimes The i-th capacity alloacted corresponds to the i-th bound time and to i-th unbound time. Similarly for RequestSizeInGB
type PodDetails ¶
type PodDetails struct { Name string StartTime meta_v1.Time EndTime meta_v1.Time Containers []*Container PodVolumeClaims map[string]*PersistentVolumeClaim }
PodDetails information for the pods associated with the Group resource