v1

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

View Source
const (
	CRDPlural   string = "groups"
	CRDGroup    string = "vmware.purser.com"
	CRDVersion  string = "v1"
	FullCRDName string = CRDPlural + "." + CRDGroup
)

CRD Group attributes

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(AddKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)

SchemeBuilder parameters

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion}

SchemeGroupVersion is group version used to register these objects

Functions

func AddKnownTypes

func AddKnownTypes(scheme *runtime.Scheme) error

AddKnownTypes ...

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Container

type Container struct {
	Name    string
	Metrics *metrics.Metrics
}

Container information for the pods associated with the Group resource

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

func (in *Group) DeepCopyInto(out *Group)

DeepCopyInto copies all properties of this object into another object of the same type that is provided as a pointer.

func (*Group) DeepCopyObject

func (in *Group) DeepCopyObject() runtime.Object

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

func (in *GroupList) DeepCopyObject() runtime.Object

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL