Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package
Index ¶
- Variables
- func Resource(resource string) schema.GroupResource
- type DRLCObject
- type DRLCObjectList
- type DRLCSpec
- type KubernetesClientOptions
- func (o *KubernetesClientOptions) AddFlags(fs *flag.FlagSet)
- func (o *KubernetesClientOptions) Cfg() (*rest.Config, error)
- func (o *KubernetesClientOptions) Client() (ctrlruntimeclient.Client, error)
- func (in *KubernetesClientOptions) DeepCopy() *KubernetesClientOptions
- func (in *KubernetesClientOptions) DeepCopyInto(out *KubernetesClientOptions)
- func (o *KubernetesClientOptions) Manager(namespace string, enableLeaderElection bool, ...) (manager.Manager, error)
- func (o *KubernetesClientOptions) Validate(dryRun bool) error
- type ResourceObject
- type ResourceObjectList
- type ResourceSpec
- type ResourceStatus
- type Type
Constants ¶
This section is empty.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var ( // DRLCType is the DynamicResourceLifeCycle CRD type DRLCType = Type{ Kind: reflect.TypeOf(DRLCObject{}).Name(), ListKind: reflect.TypeOf(DRLCObjectList{}).Name(), Singular: "dynamicresourcelifecycle", Plural: "dynamicresourcelifecycles", Object: &DRLCObject{}, Collection: &DRLCObjectList{}, } )
var ( // ResourceType is the ResourceObject CRD type ResourceType = Type{ Kind: reflect.TypeOf(ResourceObject{}).Name(), ListKind: reflect.TypeOf(ResourceObjectList{}).Name(), Singular: "resource", Plural: "resources", Object: &ResourceObject{}, Collection: &ResourceObjectList{}, } )
var SchemeGroupVersion = schema.GroupVersion{Group: group, Version: version}
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 DRLCObject ¶
type DRLCObject struct { v1.TypeMeta `json:",inline"` v1.ObjectMeta `json:"metadata,omitempty"` Spec DRLCSpec `json:"spec"` }
DRLCObject holds generalized configuration information about how the resource needs to be created. Some Resource might not have a ResourcezConfig (Example Project)
func FromDynamicResourceLifecycle ¶
func FromDynamicResourceLifecycle(r common.DynamicResourceLifeCycle) *DRLCObject
FromDynamicResourceLifecycle converts a common.DynamicResourceLifeCycle into a *DRLCObject
func (*DRLCObject) DeepCopy ¶
func (in *DRLCObject) DeepCopy() *DRLCObject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRLCObject.
func (*DRLCObject) DeepCopyInto ¶
func (in *DRLCObject) DeepCopyInto(out *DRLCObject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DRLCObject) DeepCopyObject ¶
func (in *DRLCObject) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DRLCObject) GetName ¶
func (in *DRLCObject) GetName() string
GetName implements the Object interface
func (*DRLCObject) ToDynamicResourceLifeCycle ¶
func (in *DRLCObject) ToDynamicResourceLifeCycle() common.DynamicResourceLifeCycle
type DRLCObjectList ¶
type DRLCObjectList struct { v1.TypeMeta `json:",inline"` v1.ListMeta `json:"metadata,omitempty"` Items []DRLCObject `json:"items"` }
DRLCObjectList implements the Collections interface
func (*DRLCObjectList) DeepCopy ¶
func (in *DRLCObjectList) DeepCopy() *DRLCObjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRLCObjectList.
func (*DRLCObjectList) DeepCopyInto ¶
func (in *DRLCObjectList) DeepCopyInto(out *DRLCObjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DRLCObjectList) DeepCopyObject ¶
func (in *DRLCObjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DRLCSpec ¶
type DRLCSpec struct { InitialState string `json:"state"` MaxCount int `json:"max-count"` MinCount int `json:"min-count"` LifeSpan *time.Duration `json:"lifespan,omitempty"` Config common.ConfigType `json:"config"` Needs common.ResourceNeeds `json:"needs"` }
DRLCSpec holds config implementation specific configuration as well as resource needs
func (*DRLCSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRLCSpec.
func (*DRLCSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesClientOptions ¶
type KubernetesClientOptions struct {
// contains filtered or unexported fields
}
KubernetesClientOptions are flag options used to create a kube client. It implements the k8s.io/test-infra/pkg/flagutil.OptionGroup interface.
func (*KubernetesClientOptions) AddFlags ¶
func (o *KubernetesClientOptions) AddFlags(fs *flag.FlagSet)
AddFlags adds kube client flags to existing FlagSet.
func (*KubernetesClientOptions) Cfg ¶
func (o *KubernetesClientOptions) Cfg() (*rest.Config, error)
Cfg returns the *rest.Config for the configured cluster
func (*KubernetesClientOptions) Client ¶
func (o *KubernetesClientOptions) Client() (ctrlruntimeclient.Client, error)
Client returns a ClientInterface based on the flags provided.
func (*KubernetesClientOptions) DeepCopy ¶
func (in *KubernetesClientOptions) DeepCopy() *KubernetesClientOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClientOptions.
func (*KubernetesClientOptions) DeepCopyInto ¶
func (in *KubernetesClientOptions) DeepCopyInto(out *KubernetesClientOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KubernetesClientOptions) Manager ¶
func (o *KubernetesClientOptions) Manager(namespace string, enableLeaderElection bool, startCacheFor ...ctrlruntimeclient.Object) (manager.Manager, error)
Manager returns a Manager. It contains a client whose Reader is cache backed. Namespace can be empty in which case the client will use all namespaces. It blocks until the cache was synced for all types passed in startCacheFor.
func (*KubernetesClientOptions) Validate ¶
func (o *KubernetesClientOptions) Validate(dryRun bool) error
Validate validates Kubernetes client options.
type ResourceObject ¶
type ResourceObject struct { v1.TypeMeta `json:",inline"` v1.ObjectMeta `json:"metadata,omitempty"` Spec ResourceSpec `json:"spec,omitempty"` Status ResourceStatus `json:"status,omitempty"` }
ResourceObject represents common.ResourceObject. It implements the Object interface.
func FromResource ¶
func FromResource(r common.Resource) *ResourceObject
FromResource converts a common.Resource to a *ResourceObject
func NewResource ¶
func NewResource(name, rtype, state, owner string, t v1.Time) *ResourceObject
NewResource creates a new Boskos Resource.
func (*ResourceObject) DeepCopy ¶
func (in *ResourceObject) DeepCopy() *ResourceObject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceObject.
func (*ResourceObject) DeepCopyInto ¶
func (in *ResourceObject) DeepCopyInto(out *ResourceObject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceObject) DeepCopyObject ¶
func (in *ResourceObject) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ResourceObject) ToResource ¶
func (in *ResourceObject) ToResource() common.Resource
ToResource returns the common.Resource representation for a ResourceObject
type ResourceObjectList ¶
type ResourceObjectList struct { v1.TypeMeta `json:",inline"` v1.ListMeta `json:"metadata,omitempty"` Items []ResourceObject `json:"items"` }
ResourceObjectList is the Collection implementation
func (*ResourceObjectList) DeepCopy ¶
func (in *ResourceObjectList) DeepCopy() *ResourceObjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceObjectList.
func (*ResourceObjectList) DeepCopyInto ¶
func (in *ResourceObjectList) DeepCopyInto(out *ResourceObjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceObjectList) DeepCopyObject ¶
func (in *ResourceObjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceSpec ¶
type ResourceSpec struct {
Type string `json:"type"`
}
ResourceSpec holds information that are not likely to change
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceStatus ¶
type ResourceStatus struct { State string `json:"state,omitempty"` Owner string `json:"owner"` LastUpdate v1.Time `json:"lastUpdate,omitempty"` UserData map[string]string `json:"userData,omitempty"` ExpirationDate *v1.Time `json:"expirationDate,omitempty"` }
ResourceStatus holds information that are likely to change
func (*ResourceStatus) DeepCopy ¶
func (in *ResourceStatus) DeepCopy() *ResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatus.
func (*ResourceStatus) DeepCopyInto ¶
func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.