Documentation
¶
Overview ¶
api/app/v1/applicationdefinition_types.go Package v1 contains API Schema definitions for the app v1 API group +kubebuilder:object:generate=true +groupName=infini.cloud
Package v1 contains API Schema definitions for the app v1 API group. +kubebuilder:object:generate=true +groupName=infini.cloud
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "infini.cloud", Version: "v1"} // 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 ¶
This section is empty.
Types ¶
type ApplicationComponent ¶
type ApplicationComponent struct {
// Name is the unique identifier for this component instance within the ApplicationDefinition.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9_.]*)?[a-z0-9]$`
Name string `json:"name"`
// +kubebuilder:validation:Required
APIVersion string `json:"apiVersion"`
// +kubebuilder:validation:Required
Kind string `json:"kind"`
// Type references the `metadata.name` of a `ComponentDefinition` resource in the same namespace.
Type string `json:"type,omitempty"`
// Properties provides the instance-specific configuration as raw JSON.
// The structure is determined by the component 'type' and validated by the corresponding builder strategy.
// +kubebuilder:validation:Required
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Type=object
Properties runtime.RawExtension `json:"properties"`
}
ApplicationComponent defines a single component instance within an ApplicationDefinition.
func (*ApplicationComponent) DeepCopy ¶
func (in *ApplicationComponent) DeepCopy() *ApplicationComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationComponent.
func (*ApplicationComponent) DeepCopyInto ¶
func (in *ApplicationComponent) DeepCopyInto(out *ApplicationComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationDefinition ¶
type ApplicationDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationDefinitionSpec `json:"spec,omitempty"`
Status ApplicationDefinitionStatus `json:"status,omitempty"`
}
ApplicationDefinition is the Schema for the applicationdefinitions API, defining a composite application.
func (*ApplicationDefinition) DeepCopy ¶
func (in *ApplicationDefinition) DeepCopy() *ApplicationDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationDefinition.
func (*ApplicationDefinition) DeepCopyInto ¶
func (in *ApplicationDefinition) DeepCopyInto(out *ApplicationDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplicationDefinition) DeepCopyObject ¶
func (in *ApplicationDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationDefinitionList ¶
type ApplicationDefinitionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ApplicationDefinition `json:"items"`
}
ApplicationDefinitionList contains a list of ApplicationDefinition.
func (*ApplicationDefinitionList) DeepCopy ¶
func (in *ApplicationDefinitionList) DeepCopy() *ApplicationDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationDefinitionList.
func (*ApplicationDefinitionList) DeepCopyInto ¶
func (in *ApplicationDefinitionList) DeepCopyInto(out *ApplicationDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplicationDefinitionList) DeepCopyObject ¶
func (in *ApplicationDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationDefinitionSpec ¶
type ApplicationDefinitionSpec struct {
// Components lists the desired component instances for this application.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinItems=1
// +listType=map
// +listMapKey=name
Components []ApplicationComponent `json:"components"`
}
ApplicationDefinitionSpec defines the desired state of an ApplicationDefinition.
func (*ApplicationDefinitionSpec) DeepCopy ¶
func (in *ApplicationDefinitionSpec) DeepCopy() *ApplicationDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationDefinitionSpec.
func (*ApplicationDefinitionSpec) DeepCopyInto ¶
func (in *ApplicationDefinitionSpec) DeepCopyInto(out *ApplicationDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationDefinitionStatus ¶
type ApplicationDefinitionStatus struct {
// ObservedGeneration reflects the generation of the ApplicationDefinition spec that was last processed by the controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Phase represents the current overall state of the application reconciliation.
// +optional
Phase ApplicationPhase `json:"phase,omitempty"`
// Conditions provide observations of the application's state.
// Known condition types include "Ready".
// +optional
// +patchStrategy=merge
// +patchMergeKey=type
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// Components provides a summary status for each component defined in the spec.
// +optional
// +listType=map
// +listMapKey=name
Components []ComponentStatusReference `json:"components,omitempty" listType:"map" listMapKey:"name"`
Annotations map[string]string `json:"annotations,omitempty"`
}
ApplicationDefinitionStatus defines the observed state of ApplicationDefinition. +kubebuilder:object:generate=true
func (*ApplicationDefinitionStatus) DeepCopy ¶
func (in *ApplicationDefinitionStatus) DeepCopy() *ApplicationDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationDefinitionStatus.
func (*ApplicationDefinitionStatus) DeepCopyInto ¶
func (in *ApplicationDefinitionStatus) DeepCopyInto(out *ApplicationDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationPhase ¶
type ApplicationPhase string
ApplicationPhase represents the current state of the ApplicationDefinition reconciliation process. +kubebuilder:validation:Enum=Pending;Processing;Applying;Available;Degraded;Deleting;Failed
const ( // ApplicationPhasePending indicates the application definition is waiting to be processed. ApplicationPhasePending ApplicationPhase = "Pending" // ApplicationPhaseProcessing indicates the controller is processing the definition (e.g., building objects). ApplicationPhaseProcessing ApplicationPhase = "Processing" // ApplicationPhaseApplying indicates the controller is applying K8s resources and waiting for them to become ready. ApplicationPhaseApplying ApplicationPhase = "Applying" // ApplicationPhaseAvailable indicates all components are reconciled and healthy. ApplicationPhaseAvailable ApplicationPhase = "Available" // ApplicationPhaseDegraded indicates one or more components were previously ready but are now unhealthy or not ready. ApplicationPhaseDegraded ApplicationPhase = "Degraded" // ApplicationPhaseDeleting indicates the application definition is being deleted. ApplicationPhaseDeleting ApplicationPhase = "Deleting" // ApplicationPhaseFailed indicates a critical error occurred during reconciliation. ApplicationPhaseFailed ApplicationPhase = "Failed" )
type ComponentStatusReference ¶
type ComponentStatusReference struct {
// Name matches the name of the component in the spec.
// +kubebuilder:validation:Required
Name string `json:"name"`
// Kind is the Kubernetes Kind of the primary workload resource managed for this component (e.g., StatefulSet, Deployment).
// Derived from the corresponding ComponentDefinition.
// +optional
Kind string `json:"kind,omitempty"`
// APIVersion is the API version of the primary workload resource (e.g., apps/v1).
// Derived from the corresponding ComponentDefinition.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// ResourceName is the actual name of the primary workload resource created in Kubernetes.
// +optional
ResourceName string `json:"resourceName,omitempty"`
// Namespace is the namespace where the primary workload resource resides (usually the same as the AppDef).
// +optional
Namespace string `json:"namespace,omitempty"`
// Health indicates the observed health status of the component (considering both K8s readiness and app-level checks).
// True means healthy, False means unhealthy or not yet ready.
// +optional
Health bool `json:"health,omitempty"`
// Message provides a human-readable status message or error details for the component.
// +optional
Message string `json:"message,omitempty"`
}
ComponentStatusReference provides a summary of the status of a deployed component's primary resource. +kubebuilder:object:generate=true
func (*ComponentStatusReference) DeepCopy ¶
func (in *ComponentStatusReference) DeepCopy() *ComponentStatusReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatusReference.
func (*ComponentStatusReference) DeepCopyInto ¶
func (in *ComponentStatusReference) DeepCopyInto(out *ComponentStatusReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionType ¶
type ConditionType string
ConditionType is a string alias for standard condition types.
const ( // ConditionReady signifies that the application as a whole is ready and available. // Its status reflects the overall health based on all components. ConditionReady ConditionType = "Ready" )