Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the sharing v1alpha1 API group +kubebuilder:object:generate=true +groupName=sharing.liqo.io
Index ¶
- Variables
- func CreateAdvertisementClient(kubeconfig string, secret *v1.Secret, watchResources bool, ...) (*crdClient.CRDClient, error)
- func Keyer(obj runtime.Object) (string, error)
- type AdvPhase
- type Advertisement
- type AdvertisementList
- type AdvertisementSpec
- type AdvertisementStatus
- type OfferPhase
- type ResourceOffer
- type ResourceOfferList
- type ResourceOfferSpec
- type ResourceOfferStatus
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "sharing.liqo.io", Version: "v1alpha1"} GroupResource = schema.GroupResource{Group: GroupVersion.Group, Resource: "advertisements"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func CreateAdvertisementClient ¶
func CreateAdvertisementClient(kubeconfig string, secret *v1.Secret, watchResources bool, configOptions func(config *rest.Config)) (*crdClient.CRDClient, error)
create a client for Advertisement CR using a provided kubeconfig - secret != nil : the kubeconfig is extracted from the secret - secret == nil && kubeconfig == "" : use an in-cluster configuration - secret == nil && kubeconfig != "" : read the kubeconfig from the provided filepath
Types ¶
type Advertisement ¶
type Advertisement struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AdvertisementSpec `json:"spec,omitempty"` Status AdvertisementStatus `json:"status,omitempty"` }
Advertisement is the Schema for the advertisements API +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.advertisementStatus` +kubebuilder:printcolumn:name="Expiration",type=string,JSONPath=`.spec.timeToLive` +kubebuilder:printcolumn:name="VkCreated",type=boolean,JSONPath=`.status.vkCreated`
func (*Advertisement) DeepCopy ¶
func (in *Advertisement) DeepCopy() *Advertisement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Advertisement.
func (*Advertisement) DeepCopyInto ¶
func (in *Advertisement) DeepCopyInto(out *Advertisement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Advertisement) DeepCopyObject ¶
func (in *Advertisement) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AdvertisementList ¶
type AdvertisementList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Advertisement `json:"items"` }
AdvertisementList contains a list of Advertisement
func (*AdvertisementList) DeepCopy ¶
func (in *AdvertisementList) DeepCopy() *AdvertisementList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdvertisementList.
func (*AdvertisementList) DeepCopyInto ¶
func (in *AdvertisementList) DeepCopyInto(out *AdvertisementList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AdvertisementList) DeepCopyObject ¶
func (in *AdvertisementList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AdvertisementSpec ¶
type AdvertisementSpec struct { // ClusterId is the identifier of the cluster that is sending this Advertisement. // It is the uid of the first master node in you cluster. ClusterId string `json:"clusterId"` // Images is the list of the images already stored in the cluster. Images []corev1.ContainerImage `json:"images,omitempty"` // LimitRange contains the limits for every kind of resource (cpu, memory...). LimitRange corev1.LimitRangeSpec `json:"limitRange,omitempty"` // ResourceQuota contains the quantity of resources made available by the cluster. ResourceQuota corev1.ResourceQuotaSpec `json:"resourceQuota,omitempty"` // Labels contains the label to be added to the virtual node. Labels map[string]string `json:"labels,omitempty"` // Neighbors is a map where the key is the name of a virtual node (representing a foreign cluster) and the value are the resources allocatable on that node. Neighbors map[corev1.ResourceName]corev1.ResourceList `json:"neighbors,omitempty"` // Properties can contain any additional information about the cluster. Properties map[corev1.ResourceName]string `json:"properties,omitempty"` // Prices contains the possible prices for every kind of resource (cpu, memory, image). Prices corev1.ResourceList `json:"prices,omitempty"` KubeConfigRef corev1.SecretReference `json:"kubeConfigRef"` // Timestamp is the time instant when this Advertisement was created. Timestamp metav1.Time `json:"timestamp"` // TimeToLive is the time instant until this Advertisement will be valid. // If not refreshed, an Advertisement will expire after 30 minutes. TimeToLive metav1.Time `json:"timeToLive"` }
AdvertisementSpec defines the desired state of Advertisement
func (*AdvertisementSpec) DeepCopy ¶
func (in *AdvertisementSpec) DeepCopy() *AdvertisementSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdvertisementSpec.
func (*AdvertisementSpec) DeepCopyInto ¶
func (in *AdvertisementSpec) DeepCopyInto(out *AdvertisementSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdvertisementStatus ¶
type AdvertisementStatus struct { // AdvertisementStatus is the status of this Advertisement. // When the adv is created it is checked by the operator, which sets this field to "Accepted" or "Refused" on tha base of cluster configuration. // If the Advertisement is accepted a virtual-kubelet for the foreign cluster will be created. // +kubebuilder:validation:Enum="";"Accepted";"Refused" AdvertisementStatus AdvPhase `json:"advertisementStatus"` // VkCreated indicates if the virtual-kubelet for this Advertisement has been created or not. VkCreated bool `json:"vkCreated"` // VkReference is a reference to the deployment running the virtual-kubelet. VkReference object_references.DeploymentReference `json:"vkReference,omitempty"` // VnodeReference is a reference to the virtual node linked to this Advertisement VnodeReference object_references.NodeReference `json:"vnodeReference,omitempty"` }
AdvertisementStatus defines the observed state of Advertisement
func (*AdvertisementStatus) DeepCopy ¶
func (in *AdvertisementStatus) DeepCopy() *AdvertisementStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdvertisementStatus.
func (*AdvertisementStatus) DeepCopyInto ¶
func (in *AdvertisementStatus) DeepCopyInto(out *AdvertisementStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OfferPhase ¶
type OfferPhase string
OfferPhase describes the phase of the ResourceOffer
const ( ResourceOfferAccepted OfferPhase = "Accepted" ResourceOfferRefused OfferPhase = "Refused" )
type ResourceOffer ¶
type ResourceOffer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ResourceOfferSpec `json:"spec,omitempty"` Status ResourceOfferStatus `json:"status,omitempty"` }
ResourceOffer is the Schema for the resourceOffers API +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.resourceOfferStatus` +kubebuilder:printcolumn:name="Expiration",type=string,JSONPath=`.spec.timeToLive` +kubebuilder:printcolumn:name="VkCreated",type=boolean,JSONPath=`.status.vkCreated`
func (*ResourceOffer) DeepCopy ¶
func (in *ResourceOffer) DeepCopy() *ResourceOffer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceOffer.
func (*ResourceOffer) DeepCopyInto ¶
func (in *ResourceOffer) DeepCopyInto(out *ResourceOffer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceOffer) DeepCopyObject ¶
func (in *ResourceOffer) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceOfferList ¶
type ResourceOfferList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ResourceOffer `json:"items"` }
ResourceOfferList contains a list of ResourceOffer
func (*ResourceOfferList) DeepCopy ¶
func (in *ResourceOfferList) DeepCopy() *ResourceOfferList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceOfferList.
func (*ResourceOfferList) DeepCopyInto ¶
func (in *ResourceOfferList) DeepCopyInto(out *ResourceOfferList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceOfferList) DeepCopyObject ¶
func (in *ResourceOfferList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceOfferSpec ¶
type ResourceOfferSpec struct { // ClusterId is the identifier of the cluster that is sending this ResourceOffer. // It is the uid of the first master node in you cluster. ClusterId string `json:"clusterId"` // Images is the list of the images already stored in the cluster. Images []corev1.ContainerImage `json:"images,omitempty"` // LimitRange contains the limits for every kind of resource (cpu, memory...). LimitRange corev1.LimitRangeSpec `json:"limitRange,omitempty"` // ResourceQuota contains the quantity of resources made available by the cluster. ResourceQuota corev1.ResourceQuotaSpec `json:"resourceQuota,omitempty"` // Labels contains the label to be added to the virtual node. Labels map[string]string `json:"labels,omitempty"` // Neighbors is a map where the key is the name of a virtual node (representing a foreign cluster) and the value are the resources allocatable on that node. Neighbors map[corev1.ResourceName]corev1.ResourceList `json:"neighbors,omitempty"` // Properties can contain any additional information about the cluster. Properties map[corev1.ResourceName]string `json:"properties,omitempty"` // Prices contains the possible prices for every kind of resource (cpu, memory, image). Prices corev1.ResourceList `json:"prices,omitempty"` KubeConfigRef corev1.SecretReference `json:"kubeConfigRef"` // Timestamp is the time instant when this ResourceOffer was created. Timestamp metav1.Time `json:"timestamp"` // TimeToLive is the time instant until this ResourceOffer will be valid. // If not refreshed, an ResourceOffer will expire after 30 minutes. TimeToLive metav1.Time `json:"timeToLive"` }
ResourceOfferSpec defines the desired state of ResourceOffer
func (*ResourceOfferSpec) DeepCopy ¶
func (in *ResourceOfferSpec) DeepCopy() *ResourceOfferSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceOfferSpec.
func (*ResourceOfferSpec) DeepCopyInto ¶
func (in *ResourceOfferSpec) DeepCopyInto(out *ResourceOfferSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceOfferStatus ¶
type ResourceOfferStatus struct { // ResourceOfferStatus is the status of this ResourceOffer. // When the offer is created it is checked by the operator, which sets this field to "Accepted" or "Refused" on tha base of cluster configuration. // If the ResourceOffer is accepted a virtual-kubelet for the foreign cluster will be created. // +kubebuilder:validation:Enum="";"Accepted";"Refused" ResourceOfferStatus OfferPhase `json:"resourceOfferStatus"` // VkCreated indicates if the virtual-kubelet for this ResourceOffer has been created or not. VkCreated bool `json:"vkCreated"` // VkReference is a reference to the deployment running the virtual-kubelet. VkReference object_references.DeploymentReference `json:"vkReference,omitempty"` // VnodeReference is a reference to the virtual node linked to this ResourceOffer VnodeReference object_references.NodeReference `json:"vnodeReference,omitempty"` }
ResourceOfferStatus defines the observed state of ResourceOffer
func (*ResourceOfferStatus) DeepCopy ¶
func (in *ResourceOfferStatus) DeepCopy() *ResourceOfferStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceOfferStatus.
func (*ResourceOfferStatus) DeepCopyInto ¶
func (in *ResourceOfferStatus) DeepCopyInto(out *ResourceOfferStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.