Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package +groupName=kubelight.dev
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Backend
- func (in *Backend) DeepCopy() *Backend
- func (in *Backend) DeepCopyInto(out *Backend)
- func (in *Backend) DeepCopyObject() runtime.Object
- func (b *Backend) GetConditionSet() apis.ConditionSet
- func (b *Backend) GetGroupVersionKind() schema.GroupVersionKind
- func (b *Backend) GetStatus() *duckv1.Status
- func (b *Backend) Init(ctx context.Context, client kubernetes.Interface) error
- func (b *Backend) SetDefaults(ctx context.Context)
- func (b *Backend) Validate(ctx context.Context) *apis.FieldError
- type BackendList
- type BackendSpec
- type BackendStatus
- type BackendType
- type ClusterResources
- type Flavor
- type Machine
- type Pool
- func (in *Pool) DeepCopy() *Pool
- func (in *Pool) DeepCopyInto(out *Pool)
- func (in *Pool) DeepCopyObject() runtime.Object
- func (p *Pool) GetConditionSet() apis.ConditionSet
- func (*Pool) GetGroupVersionKind() schema.GroupVersionKind
- func (p *Pool) GetStatus() *duckv1.Status
- func (p *Pool) SetDefaults(ctx context.Context)
- func (p *Pool) Validate(ctx context.Context) *apis.FieldError
- type PoolBackend
- type PoolConfig
- type PoolList
- type PoolSpec
- type PoolStatus
- type WOLProxy
- type WakeOnLAN
Constants ¶
const ( BackendTypeBareMetal = "bare-metal" PoolFlavorOpenShift = "openshift" PoolFlavorKubernetes = "kubernetes" PoolStrategyAggressive = "aggressive" PoolBackendTypeCRC = "crc" PoolBackendTypeClusterBot = "cluster-bot" )
const ( // BackendConditionReady is set when the revision is starting to materialize // runtime resources, and becomes true when those resources are ready. BackendConditionReady = apis.ConditionReady )
const (
GroupName = "kubelight.dev"
)
GroupName is the group name used in this package
const ( // PoolConditionReady is set when the revision is starting to materialize // runtime resources, and becomes true when those resources are ready. PoolConditionReady = apis.ConditionReady )
Variables ¶
var ( // SchemeBuilder builds a scheme with the types known to the package. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme adds the types known to this package to an existing schema. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
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 Backend ¶
type Backend struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // Spec holds the desired state of the Backend (from the client). Spec BackendSpec `json:"spec"` // Status communicates the observed state of the Backend (from the controller). // +optional Status BackendStatus `json:"status,omitempty"` }
Backend is a Knative abstraction that encapsulates the interface by which Knative components express a desire to have a particular image cached.
+genclient +genreconciler +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Backend) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend.
func (*Backend) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Backend) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Backend) GetConditionSet ¶
func (b *Backend) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Backend) GetGroupVersionKind ¶
func (b *Backend) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind implements kmeta.OwnerRefable
func (*Backend) GetStatus ¶
GetStatus retrieves the status of the resource. Implements the KRShaped interface.
func (*Backend) SetDefaults ¶
SetDefaults implements apis.Defaultable
type BackendList ¶
type BackendList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Backend `json:"items"` }
BackendList is a list of Backend resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*BackendList) DeepCopy ¶
func (in *BackendList) DeepCopy() *BackendList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendList.
func (*BackendList) DeepCopyInto ¶
func (in *BackendList) DeepCopyInto(out *BackendList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackendList) DeepCopyObject ¶
func (in *BackendList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackendSpec ¶
type BackendSpec struct { // Type of the backend; bare-metal, gke, aws, etc Type string `json:"type"` // Machines is supported only for bare metal backend Machines []Machine `json:"machines,omitempty"` // Secret that contains GKE/AWS credentials Secret string `json:"secret"` // Wake on LAN proxy details WakeOnLAN WakeOnLAN `json:"wake-on-lan"` }
BackendSpec holds the desired state of the Backend (from the client).
func (*BackendSpec) DeepCopy ¶
func (in *BackendSpec) DeepCopy() *BackendSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendSpec.
func (*BackendSpec) DeepCopyInto ¶
func (in *BackendSpec) DeepCopyInto(out *BackendSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackendSpec) Validate ¶
func (bs *BackendSpec) Validate(ctx context.Context) *apis.FieldError
Validate implements apis.Validatable
type BackendStatus ¶
BackendStatus communicates the observed state of the Backend (from the controller).
func (*BackendStatus) DeepCopy ¶
func (in *BackendStatus) DeepCopy() *BackendStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendStatus.
func (*BackendStatus) DeepCopyInto ¶
func (in *BackendStatus) DeepCopyInto(out *BackendStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackendStatus) InitializeConditions ¶
func (bs *BackendStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*BackendStatus) MarkBackendAvailable ¶
func (bs *BackendStatus) MarkBackendAvailable()
func (*BackendStatus) MarkBackendUnavailable ¶
func (bs *BackendStatus) MarkBackendUnavailable()
type ClusterResources ¶
type ClusterResources struct { CPU int `json:"cpu"` Memory string `json:"memory"` Disk string `json:"disk"` }
func (*ClusterResources) DeepCopy ¶
func (in *ClusterResources) DeepCopy() *ClusterResources
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResources.
func (*ClusterResources) DeepCopyInto ¶
func (in *ClusterResources) DeepCopyInto(out *ClusterResources)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Flavor ¶
type Flavor struct { // Name of the flavor - Kubernetes or OpenShift Name string `json:"name"` // Kubernetes or OpenShift version to be run Version string `json:"version"` }
func (*Flavor) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Flavor.
func (*Flavor) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Machine ¶
type Machine struct { // Hostname or IP of the machine Host string `json:"host"` // SSH credentials for the machine SSHSecret string `json:"ssh-secret"` // Should the machine be WOLed if it's down WakeOnLan string `json:"wake-on-lan"` }
func (*Machine) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Machine.
func (*Machine) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Pool ¶
type Pool struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // Spec holds the desired state of the Pool (from the client). Spec PoolSpec `json:"spec"` // Status communicates the observed state of the Pool (from the controller). // +optional Status PoolStatus `json:"status,omitempty"` }
Pool defined the desired state of the cluster pool that user wants to create
+genclient +genreconciler +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Pool) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pool.
func (*Pool) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Pool) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Pool) GetConditionSet ¶
func (p *Pool) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Pool) GetGroupVersionKind ¶
func (*Pool) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind implements kmeta.OwnerRefable
func (*Pool) GetStatus ¶
GetStatus retrieves the status of the resource. Implements the KRShaped interface.
func (*Pool) SetDefaults ¶
SetDefaults implements apis.Defaultable
type PoolBackend ¶
type PoolBackend struct { // Name of the backend to be used for this pool Name string `json:"name"` // Type of the backend to be used Type string `json:"type"` }
func (*PoolBackend) DeepCopy ¶
func (in *PoolBackend) DeepCopy() *PoolBackend
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolBackend.
func (*PoolBackend) DeepCopyInto ¶
func (in *PoolBackend) DeepCopyInto(out *PoolBackend)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PoolConfig ¶
type PoolConfig struct { // Number of nodes to be run in one cluster Nodes int `json:"nodes"` // Resources required per cluster Resources ClusterResources `json:"resources"` }
func (*PoolConfig) DeepCopy ¶
func (in *PoolConfig) DeepCopy() *PoolConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolConfig.
func (*PoolConfig) DeepCopyInto ¶
func (in *PoolConfig) DeepCopyInto(out *PoolConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PoolList ¶
type PoolList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Pool `json:"items"` }
PoolList is a list of Pool resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*PoolList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolList.
func (*PoolList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PoolList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PoolSpec ¶
type PoolSpec struct { // List of backends that will support the Pool Backends []PoolBackend `json:"backends"` // Number of clusters that will be running in the Pool Count int `json:"count"` // Flavor of Kubernetes or OpenShift to run in the Pool Flavor Flavor `json:"flavor"` // Configuration of the Pool Config PoolConfig `json:"config"` // Strategy to support for the Pool Strategy string `json:"strategy"` }
PoolSpec holds the desired state of the Pool (from the client).
func (*PoolSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolSpec.
func (*PoolSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PoolStatus ¶
PoolStatus communicates the observed state of the Pool (from the controller).
func (*PoolStatus) DeepCopy ¶
func (in *PoolStatus) DeepCopy() *PoolStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolStatus.
func (*PoolStatus) DeepCopyInto ¶
func (in *PoolStatus) DeepCopyInto(out *PoolStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PoolStatus) InitializeConditions ¶
func (ps *PoolStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*PoolStatus) MarkServiceAvailable ¶
func (ps *PoolStatus) MarkServiceAvailable()
func (*PoolStatus) MarkServiceUnavailable ¶
func (ps *PoolStatus) MarkServiceUnavailable(name string)
type WakeOnLAN ¶
type WakeOnLAN struct { // WOL proxy host Proxy string `json:"proxy"` // SSH credentials for the proxy SSHSecret string `json:"ssh-secret"` // Command to run for WOL Command string `json:"command"` }
func (*WakeOnLAN) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WakeOnLAN.
func (*WakeOnLAN) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.