v1alpha1

package
v0.40.5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "cozystack.io", 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

This section is empty.

Types

type CozystackResourceDefinition added in v0.35.0

type CozystackResourceDefinition struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec CozystackResourceDefinitionSpec `json:"spec,omitempty"`
}

CozystackResourceDefinition is the Schema for the cozystackresourcedefinitions API

func (*CozystackResourceDefinition) DeepCopy added in v0.35.0

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

func (*CozystackResourceDefinition) DeepCopyInto added in v0.35.0

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

func (*CozystackResourceDefinition) DeepCopyObject added in v0.35.0

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

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

type CozystackResourceDefinitionApplication added in v0.35.0

type CozystackResourceDefinitionApplication struct {
	// Kind of the application, used for UI and API
	Kind string `json:"kind"`
	// OpenAPI schema for the application, used for API validation
	OpenAPISchema string `json:"openAPISchema"`
	// Plural name of the application, used for UI and API
	Plural string `json:"plural"`
	// Singular name of the application, used for UI and API
	Singular string `json:"singular"`
}

func (*CozystackResourceDefinitionApplication) DeepCopy added in v0.35.0

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

func (*CozystackResourceDefinitionApplication) DeepCopyInto added in v0.35.0

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

type CozystackResourceDefinitionChart added in v0.35.0

type CozystackResourceDefinitionChart struct {
	// Name of the Helm chart
	Name string `json:"name"`
	// Source reference for the Helm chart
	SourceRef SourceRef `json:"sourceRef"`
}

func (*CozystackResourceDefinitionChart) DeepCopy added in v0.35.0

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

func (*CozystackResourceDefinitionChart) DeepCopyInto added in v0.35.0

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

type CozystackResourceDefinitionDashboard added in v0.37.0

type CozystackResourceDefinitionDashboard struct {
	// Human-readable name shown in the UI (e.g., "Bucket")
	Singular string `json:"singular"`
	// Plural human-readable name (e.g., "Buckets")
	Plural string `json:"plural"`
	// Hard-coded name used in the UI (e.g., "bucket")
	// +optional
	Name string `json:"name,omitempty"`
	// Whether this resource is singular (not a collection) in the UI
	// +optional
	SingularResource bool `json:"singularResource,omitempty"`
	// Order weight for sorting resources in the UI (lower first)
	// +optional
	Weight int `json:"weight,omitempty"`
	// Short description shown in catalogs or headers (e.g., "S3 compatible storage")
	// +optional
	Description string `json:"description,omitempty"`
	// Icon encoded as a string (e.g., inline SVG, base64, or data URI)
	// +optional
	Icon string `json:"icon,omitempty"`
	// Category used to group resources in the UI (e.g., "Storage", "Networking")
	Category string `json:"category"`
	// Free-form tags for search and filtering
	// +optional
	Tags []string `json:"tags,omitempty"`
	// Which tabs to show for this resource
	// +optional
	Tabs []DashboardTab `json:"tabs,omitempty"`
	// Order of keys in the YAML view
	// +optional
	KeysOrder [][]string `json:"keysOrder,omitempty"`
	// Whether this resource is a module (tenant module)
	// +optional
	Module bool `json:"module,omitempty"`
}

CozystackResourceDefinitionDashboard describes how this resource appears in the UI.

func (*CozystackResourceDefinitionDashboard) DeepCopy added in v0.37.0

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

func (*CozystackResourceDefinitionDashboard) DeepCopyInto added in v0.37.0

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

type CozystackResourceDefinitionList added in v0.35.0

type CozystackResourceDefinitionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CozystackResourceDefinition `json:"items"`
}

CozystackResourceDefinitionList contains a list of CozystackResourceDefinitions

func (*CozystackResourceDefinitionList) DeepCopy added in v0.35.0

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

func (*CozystackResourceDefinitionList) DeepCopyInto added in v0.35.0

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

func (*CozystackResourceDefinitionList) DeepCopyObject added in v0.35.0

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

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

type CozystackResourceDefinitionRelease added in v0.35.0

type CozystackResourceDefinitionRelease struct {
	// Helm chart configuration
	Chart CozystackResourceDefinitionChart `json:"chart"`
	// Labels for the release
	Labels map[string]string `json:"labels,omitempty"`
	// Prefix for the release name
	Prefix string `json:"prefix"`
}

func (*CozystackResourceDefinitionRelease) DeepCopy added in v0.35.0

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

func (*CozystackResourceDefinitionRelease) DeepCopyInto added in v0.35.0

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

type CozystackResourceDefinitionResourceSelector added in v0.37.0

type CozystackResourceDefinitionResourceSelector struct {
	metav1.LabelSelector `json:",inline"`
	// ResourceNames is a list of resource names to match
	// If specified, the resource must have one of these exact names to match the selector
	// +optional
	ResourceNames []string `json:"resourceNames,omitempty"`
}

CozystackResourceDefinitionResourceSelector extends metav1.LabelSelector with resourceNames support. A resource matches this selector only if it satisfies ALL criteria: - Label selector conditions (matchExpressions and matchLabels) - AND has a name that matches one of the names in resourceNames (if specified)

The resourceNames field supports Go templates with the following variables available: - {{ .name }}: The name of the managing application (from apps.cozystack.io/application.name) - {{ .kind }}: The lowercased kind of the managing application (from apps.cozystack.io/application.kind) - {{ .namespace }}: The namespace of the resource being processed

Example YAML:

secrets:
  include:
  - matchExpressions:
    - key: badlabel
      operator: DoesNotExist
    matchLabels:
      goodlabel: goodvalue
    resourceNames:
    - "{{ .name }}-secret"
    - "{{ .kind }}-{{ .name }}-tls"
    - "specificname"

func (*CozystackResourceDefinitionResourceSelector) DeepCopy added in v0.37.0

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

func (*CozystackResourceDefinitionResourceSelector) DeepCopyInto added in v0.37.0

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

type CozystackResourceDefinitionResources added in v0.37.0

type CozystackResourceDefinitionResources struct {
	// Exclude contains an array of resource selectors that target resources.
	// If a resource matches the selector in any of the elements in the array, it is
	// hidden from the user, regardless of the matches in the include array.
	Exclude []*CozystackResourceDefinitionResourceSelector `json:"exclude,omitempty"`
	// Include contains an array of resource selectors that target resources.
	// If a resource matches the selector in any of the elements in the array, and
	// matches none of the selectors in the exclude array that resource is marked
	// as a tenant resource and is visible to users.
	Include []*CozystackResourceDefinitionResourceSelector `json:"include,omitempty"`
}

func (*CozystackResourceDefinitionResources) DeepCopy added in v0.37.0

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

func (*CozystackResourceDefinitionResources) DeepCopyInto added in v0.37.0

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

type CozystackResourceDefinitionSpec added in v0.35.0

type CozystackResourceDefinitionSpec struct {
	// Application configuration
	Application CozystackResourceDefinitionApplication `json:"application"`
	// Release configuration
	Release CozystackResourceDefinitionRelease `json:"release"`

	// Secret selectors
	Secrets CozystackResourceDefinitionResources `json:"secrets,omitempty"`
	// Service selectors
	Services CozystackResourceDefinitionResources `json:"services,omitempty"`
	// Ingress selectors
	Ingresses CozystackResourceDefinitionResources `json:"ingresses,omitempty"`

	// Dashboard configuration for this resource
	Dashboard *CozystackResourceDefinitionDashboard `json:"dashboard,omitempty"`
}

func (*CozystackResourceDefinitionSpec) DeepCopy added in v0.35.0

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

func (*CozystackResourceDefinitionSpec) DeepCopyInto added in v0.35.0

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

type DashboardTab added in v0.37.0

type DashboardTab string

DashboardTab enumerates allowed UI tabs. +kubebuilder:validation:Enum=workloads;ingresses;services;secrets;yaml

const (
	DashboardTabWorkloads DashboardTab = "workloads"
	DashboardTabIngresses DashboardTab = "ingresses"
	DashboardTabServices  DashboardTab = "services"
	DashboardTabSecrets   DashboardTab = "secrets"
	DashboardTabYAML      DashboardTab = "yaml"
)

type Selector

type Selector map[string]string

Selector specifies the label selector for workloads

func (Selector) DeepCopy

func (in Selector) DeepCopy() Selector

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

func (Selector) DeepCopyInto

func (in Selector) DeepCopyInto(out *Selector)

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

type SourceRef added in v0.35.0

type SourceRef struct {
	// Kind of the source reference
	// +kubebuilder:default:="HelmRepository"
	Kind string `json:"kind"`
	// Name of the source reference
	Name string `json:"name"`
	// Namespace of the source reference
	// +kubebuilder:default:="cozy-public"
	Namespace string `json:"namespace"`
}

func (*SourceRef) DeepCopy added in v0.35.0

func (in *SourceRef) DeepCopy() *SourceRef

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

func (*SourceRef) DeepCopyInto added in v0.35.0

func (in *SourceRef) DeepCopyInto(out *SourceRef)

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

type Workload

type Workload struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Status WorkloadStatus `json:"status,omitempty"`
}

Workload is the Schema for the workloads API

func (*Workload) DeepCopy

func (in *Workload) DeepCopy() *Workload

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

func (*Workload) DeepCopyInto

func (in *Workload) DeepCopyInto(out *Workload)

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

func (*Workload) DeepCopyObject

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

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

type WorkloadList

type WorkloadList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Workload `json:"items"`
}

WorkloadList contains a list of Workload

func (*WorkloadList) DeepCopy

func (in *WorkloadList) DeepCopy() *WorkloadList

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

func (*WorkloadList) DeepCopyInto

func (in *WorkloadList) DeepCopyInto(out *WorkloadList)

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

func (*WorkloadList) DeepCopyObject

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

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

type WorkloadMonitor

type WorkloadMonitor struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   WorkloadMonitorSpec   `json:"spec,omitempty"`
	Status WorkloadMonitorStatus `json:"status,omitempty"`
}

WorkloadMonitor is the Schema for the workloadmonitors API

func (*WorkloadMonitor) DeepCopy

func (in *WorkloadMonitor) DeepCopy() *WorkloadMonitor

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

func (*WorkloadMonitor) DeepCopyInto

func (in *WorkloadMonitor) DeepCopyInto(out *WorkloadMonitor)

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

func (*WorkloadMonitor) DeepCopyObject

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

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

func (*WorkloadMonitor) GetSelector

func (w *WorkloadMonitor) GetSelector() map[string]string

GetSelector returns the label selector from metadata

type WorkloadMonitorList

type WorkloadMonitorList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []WorkloadMonitor `json:"items"`
}

WorkloadMonitorList contains a list of WorkloadMonitor

func (*WorkloadMonitorList) DeepCopy

func (in *WorkloadMonitorList) DeepCopy() *WorkloadMonitorList

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

func (*WorkloadMonitorList) DeepCopyInto

func (in *WorkloadMonitorList) DeepCopyInto(out *WorkloadMonitorList)

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

func (*WorkloadMonitorList) DeepCopyObject

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

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

type WorkloadMonitorSpec

type WorkloadMonitorSpec struct {
	// Selector is a label selector to find workloads to monitor
	// +required
	Selector map[string]string `json:"selector"`

	// Kind specifies the kind of the workload
	// +optional
	Kind string `json:"kind,omitempty"`

	// Type specifies the type of the workload
	// +optional
	Type string `json:"type,omitempty"`

	// Version specifies the version of the workload
	// +optional
	Version string `json:"version,omitempty"`

	// MinReplicas specifies the minimum number of replicas that should be available
	// +kubebuilder:validation:Minimum=0
	// +optional
	MinReplicas *int32 `json:"minReplicas,omitempty"`

	// Replicas is the desired number of replicas
	// If not specified, will use observedReplicas as the target
	// +kubebuilder:validation:Minimum=0
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
}

WorkloadMonitorSpec defines the desired state of WorkloadMonitor

func (*WorkloadMonitorSpec) DeepCopy

func (in *WorkloadMonitorSpec) DeepCopy() *WorkloadMonitorSpec

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

func (*WorkloadMonitorSpec) DeepCopyInto

func (in *WorkloadMonitorSpec) DeepCopyInto(out *WorkloadMonitorSpec)

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

type WorkloadMonitorStatus

type WorkloadMonitorStatus struct {
	// Operational indicates if the workload meets all operational requirements
	// +optional
	Operational *bool `json:"operational,omitempty"`

	// AvailableReplicas is the number of ready replicas
	// +optional
	AvailableReplicas int32 `json:"availableReplicas"`

	// ObservedReplicas is the total number of pods observed
	// +optional
	ObservedReplicas int32 `json:"observedReplicas"`
}

WorkloadMonitorStatus defines the observed state of WorkloadMonitor

func (*WorkloadMonitorStatus) DeepCopy

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

func (*WorkloadMonitorStatus) DeepCopyInto

func (in *WorkloadMonitorStatus) DeepCopyInto(out *WorkloadMonitorStatus)

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

type WorkloadStatus

type WorkloadStatus struct {
	// Kind represents the type of workload (redis, postgres, etc.)
	// +required
	Kind string `json:"kind"`

	// Type represents the specific role of the workload (redis, sentinel, etc.)
	// If not specified, defaults to Kind
	// +optional
	Type string `json:"type,omitempty"`

	// Resources specifies the compute resources allocated to this workload
	// +required
	Resources map[string]resource.Quantity `json:"resources"`

	// Operational indicates if all pods of the workload are ready
	// +optional
	Operational bool `json:"operational"`
}

WorkloadStatus defines the observed state of Workload

func (*WorkloadStatus) DeepCopy

func (in *WorkloadStatus) DeepCopy() *WorkloadStatus

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

func (*WorkloadStatus) DeepCopyInto

func (in *WorkloadStatus) DeepCopyInto(out *WorkloadStatus)

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