v1alpha1

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Overview

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

Index

Constants

View Source
const (
	// ReadyCondition indicates the resource is ready and fully reconciled.
	ReadyCondition string = "Ready"

	// PreUpgradeUnitsUpToDateCondition represents the fact that
	// the pre-upgrade units are up to date.
	PreUpgradeUnitsUpToDateCondition string = "PreUpgradeUnitsUpToDate"

	// HelmReleaseUpToDateCondition indicates that the sylva-units HelmRelease has been configured to its desired state.
	HelmReleaseUpToDateCondition string = "HelmReleaseUpToDate"

	// HelmReleaseReadyCondition indicates that the sylva-units HelmRelease is ready and fully reconciled.
	HelmReleaseReadyCondition string = "HelmReleaseReady"

	// ResourcePruningReason represents the fact that
	// one of the managed resources  are being pruned.
	ResourcePruningReason string = "ResourcePruningReason"

	// ResourceNotReadyReason represents the fact that
	// one of the managed resources is not found.
	ResourceNotFoundReason string = "ResourceNotFoundReason"

	// ResourceNotReadyReason represents the fact that
	// one of the managed resources is not ready.
	ResourceNotReadyReason string = "ResourceNotReady"

	// SylvaUnitsStatusNotReadyReason represents the fact that
	// the sylvaUnitsStatus Kustomization is not ready.
	SylvaUnitsStatusNotReadyReason string = "SylvaUnitsStatusNotReady"

	// ValuesSourceNotReadyReason represents the fact that
	// one of the sources referred in valuesFrom is not ready.
	ValuesSourceNotReadyReason string = "ValuesSourceNotReady"

	// ReconciliationSucceededReason represents the fact that
	// the reconciliation succeeded.
	ReconciliationSucceededReason string = "ReconciliationSucceeded"

	// ReconciliationFailedReason represents the fact that
	// the reconciliation failed.
	ReconciliationFailedReason string = "ReconciliationFailed"

	// HelmReleaseOwnershipConflictReason represents the fact that
	// the reconciler found an existing HelmRelease in the same namespace
	// which is not controlled by the current SylvaUnitsRelease.
	// In this case, reconciliation is stopped and the SylvaUnitsRelease
	// is marked Ready=False without requeueing.
	HelmReleaseOwnershipConflictReason string = "HelmReleaseOwnershipConflict"
)
View Source
const (
	// Used in SylvaUnitsRelease.Spec.Source.Type
	SourceTypeOCI = "oci"
	SourceTypeGit = "git"

	// Used in SylvaUnitsRelease.Spec.ValuesFrom[].Type
	ValuesFromTypeConfigMap      = "ConfigMap"
	ValuesFromTypeSecret         = "Secret"
	ValuesFromTypeExternalSecret = "ExternalSecret"
	ValuesFromTypeGitRepository  = "GitRepository"
	ValuesFromTypeOCIRepository  = "OCIRepository"
	ValuesFromTypeSylvaUnitsFile = "SylvaUnitsFile"

	SylvaUnitsFinalizer = "sylva-units-operator.sylva/finalizer"

	BaseSylvaUnitsResourceName     = "sylva-units"
	BaseKustomizeUnitsResourceName = "sylva-core"

	PreUpgradeLabel = "sylva-units.sylva-project.org/release-pre-upgrade"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "unitsoperator.sylva", 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
)
View Source
var DefaultValuesKeyOrFile = helmv2.ValuesReference{}.GetValuesKey()

Functions

This section is empty.

Types

type ResourceStatus

type ResourceStatus struct {
	// Kind of the resource
	Kind string `json:"kind"`

	// Name of the resource
	Name string `json:"name"`

	// Status of the resource
	Status string `json:"status"`
}

ResourceStatus provides information on managed resources

func (*ResourceStatus) DeepCopy

func (in *ResourceStatus) DeepCopy() *ResourceStatus

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

func (*ResourceStatus) DeepCopyInto

func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)

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

type SylvaUnitsRelease

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

	Spec SylvaUnitsReleaseSpec `json:"spec,omitempty"`
	// +kubebuilder:default:={"observedGeneration":-1}
	Status SylvaUnitsReleaseStatus `json:"status,omitempty"`
}

SylvaUnitsRelease is the Schema for the sylvaunitsrelease API

func (*SylvaUnitsRelease) DeepCopy

func (in *SylvaUnitsRelease) DeepCopy() *SylvaUnitsRelease

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

func (*SylvaUnitsRelease) DeepCopyInto

func (in *SylvaUnitsRelease) DeepCopyInto(out *SylvaUnitsRelease)

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

func (*SylvaUnitsRelease) DeepCopyObject

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

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

func (SylvaUnitsRelease) GetConditions

func (in SylvaUnitsRelease) GetConditions() []metav1.Condition

GetConditions returns the status conditions of the object.

func (SylvaUnitsRelease) GetValues

func (in SylvaUnitsRelease) GetValues() map[string]interface{}

GetValues unmarshals the raw values to a map[string]interface{} and returns the result.

func (*SylvaUnitsRelease) SetConditions

func (in *SylvaUnitsRelease) SetConditions(conditions []metav1.Condition)

SetConditions sets the status conditions on the object.

type SylvaUnitsReleaseList

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

SylvaUnitsReleaseList contains a list of SylvaUnitsRelease

func (*SylvaUnitsReleaseList) DeepCopy

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

func (*SylvaUnitsReleaseList) DeepCopyInto

func (in *SylvaUnitsReleaseList) DeepCopyInto(out *SylvaUnitsReleaseList)

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

func (*SylvaUnitsReleaseList) DeepCopyObject

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

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

type SylvaUnitsReleasePreset added in v1.1.0

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

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

SylvaUnitsReleasePreset This resources holds a preset for a SylvaUnitsRelease.

It has the same specification as a SylvaUnitsRelease.

It isn't subject to any controller processing, but can hold information from which a SylvaUnitsRelease that refers to it will inherit.

func (*SylvaUnitsReleasePreset) DeepCopy added in v1.1.0

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

func (*SylvaUnitsReleasePreset) DeepCopyInto added in v1.1.0

func (in *SylvaUnitsReleasePreset) DeepCopyInto(out *SylvaUnitsReleasePreset)

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

func (*SylvaUnitsReleasePreset) DeepCopyObject added in v1.1.0

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

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

type SylvaUnitsReleasePresetList added in v1.1.0

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

SylvaUnitsReleaseList contains a list of SylvaUnitsRelease

func (*SylvaUnitsReleasePresetList) DeepCopy added in v1.1.0

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

func (*SylvaUnitsReleasePresetList) DeepCopyInto added in v1.1.0

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

func (*SylvaUnitsReleasePresetList) DeepCopyObject added in v1.1.0

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

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

type SylvaUnitsReleasePresetSpec added in v1.1.0

type SylvaUnitsReleasePresetSpec struct {

	// ClusterType defines the type of Sylva cluster that this release
	// of sylva-units will manage. It governs the pre-selection of values.xxx.yaml
	// files from sylva-units Helm chart.
	// Deprecated: will be removed in a future release. Use EnabledContexts instead.
	// +optional
	ClusterType string `json:"clusterType,omitempty"`

	// When valuesFrom items have a context defined, the values will be included in the sylva-units release
	// only if this context is defined in EnabledContexts.
	// This enables to add conditionally some layers of values like bootstrap.values.yaml
	// or preview.values.yaml in specific circumstances.
	// +optional
	EnabledContexts []string `json:"enabledContexts,omitempty"`

	// +optional
	SylvaUnitsSource *SylvaUnitsSourcePreset `json:"sylvaUnitsSource,omitempty"`

	// +optional
	ValuesFrom []ValuesFrom `json:"valuesFrom,omitempty"`

	// +optional
	Values *apiextensionsv1.JSON `json:"values,omitempty"`

	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +kubebuilder:default="30m"
	// +optional
	Interval *metav1.Duration `json:"interval"`
}

SylvaUnitsReleasePresetSpec is a subset of SylvaUnitsReleaseSpec, with also all fields made optional

func (*SylvaUnitsReleasePresetSpec) DeepCopy added in v1.1.0

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

func (*SylvaUnitsReleasePresetSpec) DeepCopyInto added in v1.1.0

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

type SylvaUnitsReleaseSpec

type SylvaUnitsReleaseSpec struct {

	// ClusterType defines the type of Sylva cluster that this release
	// of sylva-units will manage. It governs the pre-selection of values.xxx.yaml
	// files from sylva-units Helm chart.
	// Deprecated: will be removed in a future release. Use EnabledContexts instead.
	// +optional
	ClusterType string `json:"clusterType,omitempty"`

	// When valuesFrom items have a context defined, the values will be included in the sylva-units release
	// only if this context is defined in EnabledContexts.
	// This enables to add conditionally some layers of values like bootstrap.values.yaml
	// or preview.values.yaml in specific circumstances.
	// +optional
	EnabledContexts []string `json:"enabledContexts,omitempty"`

	// +required
	SylvaUnitsSource *SylvaUnitsSource `json:"sylvaUnitsSource"`

	// PreUpgradeUnitsSource defines a pinned source for Sylva-units that need
	// to be upgraded first (flux-system, external-secrets-operator, sylva-units-operator).
	// You can operate a 2 steps upgrade by first updating preUpgradeUnitsSource to the new version,
	// then once the pre-upgrade units are upgraded, you can update sylvaUnitsSource to the new version.
	// +optional
	PreUpgradeUnitsSource *SylvaUnitsSource `json:"preUpgradeUnitsSource,omitempty"`

	// +optional
	ValuesFrom []ValuesFrom `json:"valuesFrom,omitempty"`

	// Values holds the values for this Helm release.
	// +optional
	Values *apiextensionsv1.JSON `json:"values,omitempty"`

	// Interval at which the FluxCD resources are reconciled
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +kubebuilder:default="30m"
	// +optional
	Interval *metav1.Duration `json:"interval,omitempty"`

	// Suspend tells the controller to suspend reconciliation for this SylvaUnitsRelease,
	// +kubebuilder:default=false
	// +optional
	Suspend bool `json:"suspend,omitempty"`
}

SylvaUnitsReleaseSpec defines the desired state of SylvaUnitsRelease +kubebuilder:validation:XValidation:rule="!(has(self.preUpgradeUnitsSource) && has(oldSelf.preUpgradeUnitsSource) && self.preUpgradeUnitsSource == oldSelf.preUpgradeUnitsSource && self.sylvaUnitsSource != oldSelf.sylvaUnitsSource && (self.sylvaUnitsSource.type != self.preUpgradeUnitsSource.type || self.sylvaUnitsSource.url != self.preUpgradeUnitsSource.url || ((has(self.sylvaUnitsSource.tag) ? self.sylvaUnitsSource.tag : \"\") != (has(self.preUpgradeUnitsSource.tag) ? self.preUpgradeUnitsSource.tag : \"\")) || ((has(self.sylvaUnitsSource.branch) ? self.sylvaUnitsSource.branch : \"\") != (has(self.preUpgradeUnitsSource.branch) ? self.preUpgradeUnitsSource.branch : \"\")) || ((has(self.sylvaUnitsSource.commit) ? self.sylvaUnitsSource.commit : \"\") != (has(self.preUpgradeUnitsSource.commit) ? self.preUpgradeUnitsSource.commit : \"\")) ))",message="sylvaUnitsSource cannot be changed to a different value than preUpgradeUnitsSource when preUpgradeUnitsSource is set. Unset preUpgradeUnitsSource or set sylvaUnitsSource to the same value as preUpgradeUnitsSource."

func (*SylvaUnitsReleaseSpec) DeepCopy

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

func (*SylvaUnitsReleaseSpec) DeepCopyInto

func (in *SylvaUnitsReleaseSpec) DeepCopyInto(out *SylvaUnitsReleaseSpec)

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

type SylvaUnitsReleaseStatus

type SylvaUnitsReleaseStatus struct {
	// ObservedGeneration is the last observed generation.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// This is the status of the generated HelmRelease
	// +optional
	HelmReleaseStatus helmv2.HelmReleaseStatus `json:"helmReleaseStatus,omitempty"`

	// This is the status of managed resources
	// +optional
	ResourcesStatus []ResourceStatus `json:"resourcesStatus,omitempty"`
}

SylvaUnitsReleaseStatus defines the observed state of SylvaUnitsRelease

func (*SylvaUnitsReleaseStatus) DeepCopy

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

func (*SylvaUnitsReleaseStatus) DeepCopyInto

func (in *SylvaUnitsReleaseStatus) DeepCopyInto(out *SylvaUnitsReleaseStatus)

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

type SylvaUnitsReleaseTemplate deprecated

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

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

Deprecated: use SylvaUnitsReleasePreset instead. +kubebuilder:object:root=true +kubebuilder:validation:XValidation:rule="self.spec == oldSelf.spec",message="spec is immutable"

func (*SylvaUnitsReleaseTemplate) DeepCopy

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

func (*SylvaUnitsReleaseTemplate) DeepCopyInto

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

func (*SylvaUnitsReleaseTemplate) DeepCopyObject

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

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

type SylvaUnitsReleaseTemplateList deprecated

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

Deprecated: old list type for SURT +kubebuilder:object:root=true

func (*SylvaUnitsReleaseTemplateList) DeepCopy

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

func (*SylvaUnitsReleaseTemplateList) DeepCopyInto

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

func (*SylvaUnitsReleaseTemplateList) DeepCopyObject

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

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

type SylvaUnitsReleaseTemplateSpec added in v0.4.4

type SylvaUnitsReleaseTemplateSpec struct {

	// ClusterType defines the type of Sylva cluster that this release
	// of sylva-units will manage. It governs the pre-selection of values.xxx.yaml
	// files from sylva-units Helm chart.
	// Deprecated: will be removed in a future release. Use EnabledContexts instead.
	// +optional
	ClusterType string `json:"clusterType,omitempty"`

	// When valuesFrom items have a context defined, the values will be included in the sylva-units release
	// only if this context is defined in EnabledContexts.
	// This enables to add conditionally some layers of values like bootstrap.values.yaml
	// or preview.values.yaml in specific circumstances.
	// +optional
	EnabledContexts []string `json:"enabledContexts,omitempty"`

	// +optional
	SylvaUnitsSource *SylvaUnitsSourceTemplate `json:"sylvaUnitsSource,omitempty"`

	// +optional
	ValuesFrom []ValuesFrom `json:"valuesFrom,omitempty"`

	// +optional
	Values *apiextensionsv1.JSON `json:"values,omitempty"`

	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +kubebuilder:default="30m"
	// +optional
	Interval *metav1.Duration `json:"interval"`
}

func (*SylvaUnitsReleaseTemplateSpec) DeepCopy added in v0.4.4

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

func (*SylvaUnitsReleaseTemplateSpec) DeepCopyInto added in v0.4.4

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

type SylvaUnitsSource

type SylvaUnitsSource SylvaUnitsSourcePreset

+kubebuilder:validation:XValidation:rule="self.type in ['git','oci']",message="type must be defined and be one of git or oci" +kubebuilder:validation:XValidation:rule="self.type == oldSelf.type",message="sylvaUnitsSource type is immutable" +kubebuilder:validation:XValidation:rule="!(self.type == \"oci\" && !has(self.tag))",message="tag is required for type oci" +kubebuilder:validation:XValidation:rule="!(self.type == \"oci\" && has(self.branch))",message="branch cannot be set for type oci" +kubebuilder:validation:XValidation:rule="!(self.type == \"oci\" && has(self.commit))",message="commit cannot be set for type oci" +kubebuilder:validation:XValidation:rule="!(self.type == \"oci\" && !(url(self.url).getScheme() == \"oci\"))",message="url scheme must be oci:// for a source of type oci" +kubebuilder:validation:XValidation:rule="!(self.type == \"git\" && !(has(self.tag) || has(self.branch) || has(self.commit)))",message="for type git, one of tag/branch/commit is required" +kubebuilder:validation:XValidation:rule="!(self.type == \"git\" && !(url(self.url).getScheme() == \"https\" || url(self.url).getScheme() == \"http\" || url(self.url).getScheme() == \"ssh\"))",message="url scheme must be http://,https:// or ssh:// for a source of type git" +kubebuilder:validation:XValidation:rule="!(self.type == \"oci\" && !self.url.endsWith(\"/sylva-units\"))",message="url must target sylva-units artifact: oci://.../sylva-units. Two artifacts sylva-units and kustomize-units are expected in the same registry at the same tag."

func (*SylvaUnitsSource) DeepCopy

func (in *SylvaUnitsSource) DeepCopy() *SylvaUnitsSource

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

func (*SylvaUnitsSource) DeepCopyInto

func (in *SylvaUnitsSource) DeepCopyInto(out *SylvaUnitsSource)

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

type SylvaUnitsSourcePreset added in v1.1.0

type SylvaUnitsSourcePreset struct {
	// +optional
	Type string `json:"type"`

	// +optional
	URL string `json:"url"`

	// contains a Git tag or for OCI deployments the version
	// of the Helm chart.
	// +optional
	Tag string `json:"tag,omitempty"`

	// contains a Git branch name (only for Git deployments)
	// +optional
	Branch string `json:"branch,omitempty"`

	// contains a Git commit id (only for Git deployments)
	// +optional
	Commit string `json:"commit,omitempty"`

	// Interval defines how often the underlying Flux Source (GitRepository or HelmRepository)
	// should be reconciled.
	// If set to null, the controllers will use their internal default (typically 1m).
	// Pattern matches Flux controller accepted duration formats (e.g. 5m, 1h, 30s).
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +kubebuilder:default="168h"
	// +optional
	Interval *metav1.Duration `json:"interval,omitempty"`

	// Timeout defines the maximum duration allowed for a single source fetch (clone, pull, chart download).
	// If set to null, the controllers will use their internal default (typically 60s).
	// Pattern matches Flux controller accepted duration formats (e.g. 5m, 1h, 30s).
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +kubebuilder:default="5m"
	// +optional
	Timeout *metav1.Duration `json:"timeout,omitempty"`
}

func (*SylvaUnitsSourcePreset) DeepCopy added in v1.1.0

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

func (*SylvaUnitsSourcePreset) DeepCopyInto added in v1.1.0

func (in *SylvaUnitsSourcePreset) DeepCopyInto(out *SylvaUnitsSourcePreset)

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

type SylvaUnitsSourceTemplate added in v0.4.5

type SylvaUnitsSourceTemplate = SylvaUnitsSourcePreset

type ValuesFrom

type ValuesFrom struct {
	// Type of the resource to read values from.
	// +kubebuilder:validation:Enum=ConfigMap;Secret;ExternalSecret;GitRepository;OCIRepository;SylvaUnitsFile
	// +required
	Type string `json:"type"`

	// Name of the resource to read values from.
	// Required when type is one of: ConfigMap, Secret, GitRepository, OCIRepository.
	// Optional for type SylvaUnitsFile (the controller will generate a Secret name,
	// When provided, it must match the constraints below.
	// +kubebuilder:validation:Pattern="^[a-zA-Z][a-zA-Z0-9-_]*[a-zA-Z0-9]$"
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	// +optional
	Name string `json:"name,omitempty"`

	// ValuesKey is the data key where the values.yaml or a specific value can be found at. Defaults to 'values.yaml'.
	// This is only relevant for ConfigMaps, Secrets and ExternalSecrets
	// When set, must be a valid Data Key, consisting of alphanumeric characters,
	// '-', '_' or '.'.
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:Pattern=`^[\-._a-zA-Z0-9]+$`
	// +optional
	ValuesKey string `json:"valuesKey,omitempty"`

	// ValuesPath is the path of the values file to use in repository artifact. Defaults to 'values.yaml'.
	// This is only relevant for GitRepositories, OCIRepositories and SylvaUnitsFile
	// +optional
	ValuesPath string `json:"valuesPath,omitempty"`

	// Context restricts when these values will be added to the release: when valuesFrom items have a context defined,
	// the values will be included in the sylva-units release only if this context is defined in EnabledContexts
	// If empty, the entry applies in all cases.
	// +optional
	Context string `json:"context,omitempty"`

	// TargetPath is the YAML dot notation path the value should be merged at. When
	// set, the ValuesKey is expected to be a single flat value. Defaults to 'None',
	// which results in the values getting merged at the root.
	// +kubebuilder:validation:MaxLength=250
	// +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$`
	// +optional
	TargetPath string `json:"targetPath,omitempty"`

	// Optional marks this ValuesReference as optional. When set, a not found error
	// for the values reference is ignored, but any ValuesKey, TargetPath or
	// transient error will still result in a reconciliation failure.
	// +optional
	Optional bool `json:"optional,omitempty"`
}

func (*ValuesFrom) DeepCopy

func (in *ValuesFrom) DeepCopy() *ValuesFrom

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

func (*ValuesFrom) DeepCopyInto

func (in *ValuesFrom) DeepCopyInto(out *ValuesFrom)

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