v1alpha1

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the addons v1alpha1 API group. +kubebuilder:object:generate=true +groupName=addons.otterscale.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "addons.otterscale.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Module

type Module struct {
	metav1.TypeMeta `json:",inline"`

	// Standard object's metadata.
	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// Spec defines the desired behavior of the Module.
	// +required
	Spec ModuleSpec `json:"spec"`

	// Status represents the current information about the Module.
	// +optional
	Status ModuleStatus `json:"status,omitzero"`
}

Module is the Schema for the modules API. A Module represents an installed platform addon instantiated from a ModuleTemplate. The controller creates the corresponding FluxCD HelmRelease or Kustomization and reflects its status back to the Module.

func (*Module) DeepCopy

func (in *Module) DeepCopy() *Module

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Module.

func (*Module) DeepCopyInto

func (in *Module) DeepCopyInto(out *Module)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Module) DeepCopyObject

func (in *Module) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModuleList

type ModuleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`
	Items           []Module `json:"items"`
}

ModuleList contains a list of Module resources.

func (*ModuleList) DeepCopy

func (in *ModuleList) DeepCopy() *ModuleList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleList.

func (*ModuleList) DeepCopyInto

func (in *ModuleList) DeepCopyInto(out *ModuleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModuleList) DeepCopyObject

func (in *ModuleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModuleSpec

type ModuleSpec struct {
	// TemplateRef is the name of the ModuleTemplate to instantiate.
	// This field is immutable after creation.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="templateRef is immutable"
	// +required
	TemplateRef string `json:"templateRef"`

	// Namespace overrides the default target namespace defined in the ModuleTemplate.
	// If not specified, the namespace from the ModuleTemplate is used.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?)$`
	// +optional
	Namespace *string `json:"namespace,omitempty"`

	// Values overrides the default values for HelmRelease-based modules.
	// Only applicable when the referenced ModuleTemplate uses a HelmRelease template.
	// Ignored for Kustomization-based modules.
	// Accepts arbitrary JSON; RawExtension is used instead of apiextensionsv1.JSON
	// to avoid pulling in the k8s.io/apiextensions-apiserver dependency.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Values *runtime.RawExtension `json:"values,omitempty"`
}

ModuleSpec defines the desired state of an installed Module. A Module instantiates a ModuleTemplate by referencing it and optionally overriding the target namespace or Helm values.

func (*ModuleSpec) DeepCopy

func (in *ModuleSpec) DeepCopy() *ModuleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleSpec.

func (*ModuleSpec) DeepCopyInto

func (in *ModuleSpec) DeepCopyInto(out *ModuleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModuleStatus

type ModuleStatus struct {
	// ObservedGeneration is the most recent generation observed by the controller.
	// It corresponds to the Module's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// TemplateGeneration tracks the observed generation of the referenced ModuleTemplate.
	// This allows the controller to detect and reconcile template changes.
	// +optional
	TemplateGeneration int64 `json:"templateGeneration,omitempty"`

	// HelmReleaseRef is a reference to the FluxCD HelmRelease managed by this Module.
	// +optional
	HelmReleaseRef *ResourceReference `json:"helmReleaseRef,omitempty"`

	// KustomizationRef is a reference to the FluxCD Kustomization managed by this Module.
	// +optional
	KustomizationRef *ResourceReference `json:"kustomizationRef,omitempty"`

	// Conditions store the status conditions of the Module (e.g., Ready, TemplateNotFound).
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ModuleStatus defines the observed state of a Module. It contains references to the actual FluxCD resources created by the controller and reflects their health status.

func (*ModuleStatus) DeepCopy

func (in *ModuleStatus) DeepCopy() *ModuleStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleStatus.

func (*ModuleStatus) DeepCopyInto

func (in *ModuleStatus) DeepCopyInto(out *ModuleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModuleTemplate

type ModuleTemplate struct {
	metav1.TypeMeta `json:",inline"`

	// Standard object's metadata.
	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// Spec defines the desired behavior of the ModuleTemplate.
	// +required
	Spec ModuleTemplateSpec `json:"spec"`

	// Status represents the current information about the ModuleTemplate.
	// +optional
	Status ModuleTemplateStatus `json:"status,omitzero"`
}

ModuleTemplate is the Schema for the moduletemplates API. A ModuleTemplate defines a reusable platform module blueprint containing either a FluxCD HelmRelease or Kustomization specification. Users create Module CRs to instantiate and deploy modules from these templates.

func (*ModuleTemplate) DeepCopy

func (in *ModuleTemplate) DeepCopy() *ModuleTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleTemplate.

func (*ModuleTemplate) DeepCopyInto

func (in *ModuleTemplate) DeepCopyInto(out *ModuleTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModuleTemplate) DeepCopyObject

func (in *ModuleTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModuleTemplateList

type ModuleTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`
	Items           []ModuleTemplate `json:"items"`
}

ModuleTemplateList contains a list of ModuleTemplate resources.

func (*ModuleTemplateList) DeepCopy

func (in *ModuleTemplateList) DeepCopy() *ModuleTemplateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleTemplateList.

func (*ModuleTemplateList) DeepCopyInto

func (in *ModuleTemplateList) DeepCopyInto(out *ModuleTemplateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModuleTemplateList) DeepCopyObject

func (in *ModuleTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModuleTemplateSpec

type ModuleTemplateSpec struct {
	// Description is a human-readable description of the module template.
	// +kubebuilder:validation:MaxLength=1024
	// +optional
	Description string `json:"description,omitempty"`

	// Namespace is the default target namespace where FluxCD resources will be created
	// when a Module is instantiated from this template.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?)$`
	// +required
	Namespace string `json:"namespace"`

	// HelmRelease defines the FluxCD HelmRelease spec template.
	// The actual schema is composed at runtime by the Schema RPC from the FluxCD HelmRelease CRD.
	// Mutually exclusive with Kustomization (enforced via CEL).
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	HelmRelease *runtime.RawExtension `json:"helmRelease,omitempty"`

	// Kustomization defines the FluxCD Kustomization spec template.
	// The actual schema is composed at runtime by the Schema RPC from the FluxCD Kustomization CRD.
	// Mutually exclusive with HelmRelease (enforced via CEL).
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Kustomization *runtime.RawExtension `json:"kustomization,omitempty"`
}

ModuleTemplateSpec defines the desired state of a ModuleTemplate. It serves as a reusable catalog entry for platform modules, containing either a FluxCD HelmRelease or Kustomization specification. +kubebuilder:validation:XValidation:rule="(has(self.helmRelease) && !has(self.kustomization)) || (!has(self.helmRelease) && has(self.kustomization))",message="exactly one of helmRelease or kustomization must be set"

func (*ModuleTemplateSpec) DeepCopy

func (in *ModuleTemplateSpec) DeepCopy() *ModuleTemplateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleTemplateSpec.

func (*ModuleTemplateSpec) DeepCopyInto

func (in *ModuleTemplateSpec) DeepCopyInto(out *ModuleTemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModuleTemplateStatus

type ModuleTemplateStatus struct {
	// ObservedGeneration is the most recent generation observed by the controller.
	// It corresponds to the ModuleTemplate's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions store the status conditions of the ModuleTemplate (e.g., Ready).
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ModuleTemplateStatus defines the observed state of a ModuleTemplate. It tracks whether the template has been validated and is ready for use.

func (*ModuleTemplateStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModuleTemplateStatus.

func (*ModuleTemplateStatus) DeepCopyInto

func (in *ModuleTemplateStatus) DeepCopyInto(out *ModuleTemplateStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceReference

type ResourceReference struct {
	// Name is the name of the referenced resource.
	// +required
	Name string `json:"name"`

	// Namespace is the namespace of the referenced resource.
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

ResourceReference is a lightweight reference to a Kubernetes resource managed by the operator.

func (*ResourceReference) DeepCopy

func (in *ResourceReference) DeepCopy() *ResourceReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceReference.

func (*ResourceReference) DeepCopyInto

func (in *ResourceReference) DeepCopyInto(out *ResourceReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL