Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the tenancy v1alpha1 API group +kubebuilder:object:generate=true +groupName=tenancy.kflex.kubestellar.org
Index ¶
- Variables
- func AreConditionSlicesSame(c1, c2 []ControlPlaneCondition) bool
- func AreConditionsEqual(c1, c2 ControlPlaneCondition) bool
- func EnsureCondition(cp *ControlPlane, newCondition ControlPlaneCondition)
- func HasConditionAvailable(conditions []ControlPlaneCondition) bool
- type BackendDBType
- type ConditionReason
- type ConditionType
- type ControlPlane
- type ControlPlaneCondition
- func ConditionAvailable() ControlPlaneCondition
- func ConditionCreating() ControlPlaneCondition
- func ConditionDeleting() ControlPlaneCondition
- func ConditionReconcileError(err error) ControlPlaneCondition
- func ConditionReconcileSuccess() ControlPlaneCondition
- func ConditionUnavailable() ControlPlaneCondition
- func SetCondition(conditions []ControlPlaneCondition, newCondition ControlPlaneCondition) []ControlPlaneCondition
- type ControlPlaneList
- type ControlPlaneSpec
- type ControlPlaneStatus
- type ControlPlaneType
- type Manifest
- type PostCreateHook
- type PostCreateHookList
- type PostCreateHookSpec
- type PostCreateHookStatus
- type SecretReference
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "tenancy.kflex.kubestellar.org", Version: "v1alpha1"} // 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 AreConditionSlicesSame ¶ added in v0.1.1
func AreConditionSlicesSame(c1, c2 []ControlPlaneCondition) bool
areConditionSlicesSame compares two slices of ControlPlaneCondition structs and returns true if they are the same (ignoring order and LastTransitionTime and LastUpdateTime), false otherwise.
func AreConditionsEqual ¶ added in v0.1.1
func AreConditionsEqual(c1, c2 ControlPlaneCondition) bool
areConditionsEqual compares two ControlPlaneCondition structs and returns true if they are equal (excluding LastTransitionTime and LastUpdateTime), false otherwise.
func EnsureCondition ¶ added in v0.1.1
func EnsureCondition(cp *ControlPlane, newCondition ControlPlaneCondition)
func HasConditionAvailable ¶ added in v0.3.0
func HasConditionAvailable(conditions []ControlPlaneCondition) bool
Types ¶
type BackendDBType ¶
type BackendDBType string
+kubebuilder:validation:Enum=shared;dedicated
const ( BackendDBTypeDedicated BackendDBType = "dedicated" )
type ConditionReason ¶ added in v0.1.1
type ConditionReason string
const ( ReasonAvailable ConditionReason = "Available" ReasonCreating ConditionReason = "Creating" ReasonDeleting ConditionReason = "Deleting" )
const ( ReasonReconcileSuccess ConditionReason = "ReconcileSuccess" ReasonReconcileError ConditionReason = "ReconcileError" ReasonReconcilePaused ConditionReason = "ReconcilePaused" )
type ConditionType ¶ added in v0.1.1
type ConditionType string
const ( TypeReady ConditionType = "Ready" TypeSynced ConditionType = "Synced" )
type ControlPlane ¶
type ControlPlane struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ControlPlaneSpec `json:"spec,omitempty"` Status ControlPlaneStatus `json:"status,omitempty"` }
ControlPlane is the Schema for the controlplanes API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="TYPE",type="string",JSONPath=".spec.type" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster,shortName={cp,cps}
func (*ControlPlane) DeepCopy ¶
func (in *ControlPlane) DeepCopy() *ControlPlane
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlane.
func (*ControlPlane) DeepCopyInto ¶
func (in *ControlPlane) DeepCopyInto(out *ControlPlane)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ControlPlane) DeepCopyObject ¶
func (in *ControlPlane) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ControlPlaneCondition ¶ added in v0.1.1
type ControlPlaneCondition struct { Type ConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` LastUpdateTime metav1.Time `json:"lastUpdateTime"` LastTransitionTime metav1.Time `json:"lastTransitionTime"` Reason ConditionReason `json:"reason"` Message string `json:"message"` }
ControlPlaneCondition describes the state of a control plane at a certain point.
func ConditionAvailable ¶ added in v0.1.1
func ConditionAvailable() ControlPlaneCondition
Available returns a condition that indicates the resource is currently observed to be available for use.
func ConditionCreating ¶ added in v0.1.1
func ConditionCreating() ControlPlaneCondition
Creating returns a condition that indicates the cp is currently being created.
func ConditionDeleting ¶ added in v0.1.1
func ConditionDeleting() ControlPlaneCondition
Deleting returns a condition that indicates the cp is currently being deleted.
func ConditionReconcileError ¶ added in v0.1.1
func ConditionReconcileError(err error) ControlPlaneCondition
ReconcileError returns a condition indicating that KubeFlex encountered an error while reconciling the resource.
func ConditionReconcileSuccess ¶ added in v0.1.1
func ConditionReconcileSuccess() ControlPlaneCondition
ReconcileSuccess returns a condition indicating that KubeFlex reconciled the resource
func ConditionUnavailable ¶ added in v0.1.1
func ConditionUnavailable() ControlPlaneCondition
Unavailable returns a condition that indicates the resource is not currently available for use.
func SetCondition ¶ added in v0.1.1
func SetCondition(conditions []ControlPlaneCondition, newCondition ControlPlaneCondition) []ControlPlaneCondition
setCondition sets the supplied ControlPlaneCondition in the given slice of conditions, replacing any existing conditions of the same type. Returns the updated slice of conditions.
func (*ControlPlaneCondition) DeepCopy ¶ added in v0.1.1
func (in *ControlPlaneCondition) DeepCopy() *ControlPlaneCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneCondition.
func (*ControlPlaneCondition) DeepCopyInto ¶ added in v0.1.1
func (in *ControlPlaneCondition) DeepCopyInto(out *ControlPlaneCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControlPlaneList ¶
type ControlPlaneList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ControlPlane `json:"items"` }
ControlPlaneList contains a list of ControlPlane
func (*ControlPlaneList) DeepCopy ¶
func (in *ControlPlaneList) DeepCopy() *ControlPlaneList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneList.
func (*ControlPlaneList) DeepCopyInto ¶
func (in *ControlPlaneList) DeepCopyInto(out *ControlPlaneList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ControlPlaneList) DeepCopyObject ¶
func (in *ControlPlaneList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ControlPlaneSpec ¶
type ControlPlaneSpec struct { Type ControlPlaneType `json:"type,omitempty"` Backend BackendDBType `json:"backend,omitempty"` PostCreateHook *string `json:"postCreateHook,omitempty"` }
ControlPlaneSpec defines the desired state of ControlPlane
func (*ControlPlaneSpec) DeepCopy ¶
func (in *ControlPlaneSpec) DeepCopy() *ControlPlaneSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneSpec.
func (*ControlPlaneSpec) DeepCopyInto ¶
func (in *ControlPlaneSpec) DeepCopyInto(out *ControlPlaneSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControlPlaneStatus ¶
type ControlPlaneStatus struct { Conditions []ControlPlaneCondition `json:"conditions"` ObservedGeneration int64 `json:"observedGeneration"` // SecretRef contains a referece to the secret containing the Kubeconfig for the control plane SecretRef *SecretReference `json:"secretRef,omitempty"` // +optional PostCreateHooks map[string]bool `json:"postCreateHooks,omitempty"` }
ControlPlaneStatus defines the observed state of ControlPlane
func (*ControlPlaneStatus) DeepCopy ¶
func (in *ControlPlaneStatus) DeepCopy() *ControlPlaneStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneStatus.
func (*ControlPlaneStatus) DeepCopyInto ¶
func (in *ControlPlaneStatus) DeepCopyInto(out *ControlPlaneStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControlPlaneType ¶ added in v0.2.0
type ControlPlaneType string
+kubebuilder:validation:Enum=k8s;ocm;vcluster
const ( ControlPlaneTypeK8S ControlPlaneType = "k8s" ControlPlaneTypeOCM ControlPlaneType = "ocm" ControlPlaneTypeVCluster ControlPlaneType = "vcluster" )
type Manifest ¶ added in v0.3.0
type Manifest struct { // +kubebuilder:validation:EmbeddedResource // +kubebuilder:pruning:PreserveUnknownFields runtime.RawExtension `json:",inline"` }
Manifest represents a resource to be deployed
func (*Manifest) DeepCopy ¶ added in v0.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
func (*Manifest) DeepCopyInto ¶ added in v0.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostCreateHook ¶ added in v0.3.0
type PostCreateHook struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PostCreateHookSpec `json:"spec,omitempty"` Status PostCreateHookStatus `json:"status,omitempty"` }
PostCreateHook is the Schema for the controlplanes API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="TYPE",type="string",JSONPath=".spec.type" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster,shortName={pch,pchs}
func (*PostCreateHook) DeepCopy ¶ added in v0.3.0
func (in *PostCreateHook) DeepCopy() *PostCreateHook
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostCreateHook.
func (*PostCreateHook) DeepCopyInto ¶ added in v0.3.0
func (in *PostCreateHook) DeepCopyInto(out *PostCreateHook)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PostCreateHook) DeepCopyObject ¶ added in v0.3.0
func (in *PostCreateHook) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PostCreateHookList ¶ added in v0.3.0
type PostCreateHookList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PostCreateHook `json:"items"` }
PostCreateHookList contains a list of PostCreateHook
func (*PostCreateHookList) DeepCopy ¶ added in v0.3.0
func (in *PostCreateHookList) DeepCopy() *PostCreateHookList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostCreateHookList.
func (*PostCreateHookList) DeepCopyInto ¶ added in v0.3.0
func (in *PostCreateHookList) DeepCopyInto(out *PostCreateHookList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PostCreateHookList) DeepCopyObject ¶ added in v0.3.0
func (in *PostCreateHookList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PostCreateHookSpec ¶ added in v0.3.0
type PostCreateHookSpec struct {
Templates []Manifest `json:"templates,omitempty"`
}
PostCreateHookSpec defines the desired state of PostCreateHook
func (*PostCreateHookSpec) DeepCopy ¶ added in v0.3.0
func (in *PostCreateHookSpec) DeepCopy() *PostCreateHookSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostCreateHookSpec.
func (*PostCreateHookSpec) DeepCopyInto ¶ added in v0.3.0
func (in *PostCreateHookSpec) DeepCopyInto(out *PostCreateHookSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostCreateHookStatus ¶ added in v0.3.0
type PostCreateHookStatus struct { Conditions []ControlPlaneCondition `json:"conditions"` ObservedGeneration int64 `json:"observedGeneration"` // SecretRef contains a referece to the secret containing the Kubeconfig for the control plane SecretRef *SecretReference `json:"secretRef,omitempty"` }
PostCreateHookStatus defines the observed state of PostCreateHook
func (*PostCreateHookStatus) DeepCopy ¶ added in v0.3.0
func (in *PostCreateHookStatus) DeepCopy() *PostCreateHookStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostCreateHookStatus.
func (*PostCreateHookStatus) DeepCopyInto ¶ added in v0.3.0
func (in *PostCreateHookStatus) DeepCopyInto(out *PostCreateHookStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretReference ¶ added in v0.2.6
type SecretReference struct { // `namespace` is the namespace of the secret. // Required Namespace string `json:"namespace"` // `name` is the name of the secret. // Required Name string `json:"name"` // Required Key string `json:"key"` // Required InClusterKey string `json:"inClusterKey"` }
We do not use ObjectReference as its use is discouraged in favor of a locally defined type. See ObjectReference in https://github.com/kubernetes/api/blob/master/core/v1/types.go
func (*SecretReference) DeepCopy ¶ added in v0.2.6
func (in *SecretReference) DeepCopy() *SecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference.
func (*SecretReference) DeepCopyInto ¶ added in v0.2.6
func (in *SecretReference) DeepCopyInto(out *SecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.