v1beta1

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 12 Imported by: 15 modules, 15 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package v1beta1 contains API Schema definitions for the config v1beta1 API group +kubebuilder:object:generate=true +groupName=config.projectsveltos.io

Index

Constants

View Source
const (
	// ClusterProfileFinalizer allows ClusterProfileReconciler to clean up resources associated with
	// ClusterProfile before removing it from the apiserver.
	ClusterProfileFinalizer = "clusterprofilefinalizer.projectsveltos.io"

	ClusterProfileKind = "ClusterProfile"
)
View Source
const (
	// ClusterPromotionFinalizer allows ClusterPromotionReconciler to clean up resources associated with
	// ClusterPromotion before removing it from the apiserver.
	ClusterPromotionFinalizer = "config.projectsveltos.io/clusterpromotion"

	ClusterPromotionKind = "ClusterPromotion"
)
View Source
const (
	// ClusterSummaryFinalizer allows ClusterSummaryReconciler to clean up resources associated with
	// ClusterSummary before removing it from the apiserver.
	ClusterSummaryFinalizer = "clustersummaryfinalizer.projectsveltos.io"

	ClusterSummaryKind = "ClusterSummary"
)
View Source
const (
	// HelChartStatusManaging indicates helm chart is successfully being managed
	HelmChartStatusManaging = HelmChartStatus("Managing")

	// HelChartStatusConflict indicates there is a conflict with another
	// ClusterSummary to manage the helm chart
	HelmChartStatusConflict = HelmChartStatus("Conflict")
)
View Source
const (
	// ProfileFinalizer allows ProfileReconciler to clean up resources associated with
	// Profile before removing it from the apiserver.
	ProfileFinalizer = "profilefinalizer.projectsveltos.io"

	ProfileKind = "Profile"
)
View Source
const (
	// ClusterNameLabel is the label set on:
	// - ClusterSummary instances created by a ClusterProfile instance for a given cluster;
	// - ClusterConfiguration instances created by a ClusterProfile instance for a given cluster;
	// - ClusterReport instances created by a ClusterProfile instance for a given cluster;
	ClusterNameLabel = "projectsveltos.io/cluster-name"

	// ClusterTypeLabel is the label set on:
	// - ClusterSummary instances created by a ClusterProfile instance for a given cluster;
	// - ClusterConfiguration instances created by a ClusterProfile instance for a given cluster;
	// - ClusterReport instances created by a ClusterProfile instance for a given cluster;
	ClusterTypeLabel = "projectsveltos.io/cluster-type"

	// ProfilePausedAnnotation is the annotation that, when set on a Profile or ClusterProfile,
	// will pause reconciliation, preventing any changes from being propagated to clusters.
	ProfilePausedAnnotation = "profile.projectsveltos.io/paused"

	// ProfileRedeployAnnotation is the annotation that, when set on a Profile, ClusterProfile or
	// ClusterSummary, forces a redeployment when its value changes. Any value is accepted.
	// When set on a Profile or ClusterProfile, all the ClusterSummary instances it manages are
	// redeployed. When set on a ClusterSummary, only that instance is redeployed. If set on both,
	// the value on the Profile/ClusterProfile takes precedence.
	// Ignored for Profiles/ClusterProfiles with SyncMode OneTime.
	ProfileRedeployAnnotation = "profile.projectsveltos.io/redeploy"
)
View Source
const (
	// SyncModeOneTime indicates feature sync should happen only once
	SyncModeOneTime = SyncMode("OneTime")

	// SyncModeContinuous indicates feature sync should continuously happen
	SyncModeContinuous = SyncMode("Continuous")

	// SyncModeContinuousWithDriftDetection indicates that feature synchronization
	// should occur continuously. If configuration drift is detected in the managed
	// cluster, it will be overridden.
	SyncModeContinuousWithDriftDetection = SyncMode("ContinuousWithDriftDetection")

	// SyncModeDryRun indicates feature sync should continuously happen
	// no feature will be updated in the CAPI Cluster though.
	SyncModeDryRun = SyncMode("DryRun")
)
View Source
const (
	// DeploymentTypeLocal indicates resource deployment need to
	// be in the management cluster
	DeploymentTypeLocal = DeploymentType("Local")

	// DeploymentTypeRemote indicates resource deployment need to
	// be in the managed cluster
	DeploymentTypeRemote = DeploymentType("Remote")
)
View Source
const (
	// HelmChartActionInstall will cause Helm chart to be installed
	HelmChartActionInstall = HelmChartAction("Install")

	// HelmChartActionUninstall will cause Helm chart to be removed
	HelmChartActionUninstall = HelmChartAction("Uninstall")
)
View Source
const (
	// PostRenderStrategyCombined sends hooks and regular templates together as a single
	// stream to the post-renderer. This is Helm's own default.
	PostRenderStrategyCombined = PostRenderStrategy("combined")

	// PostRenderStrategySeparate sends hooks and regular templates to the post-renderer
	// in independent invocations. Use this to avoid duplicate-resource errors from
	// post-renderers that de-duplicate by resource identity, such as Patches, when the
	// same resource appears in both a hook and a regular template.
	PostRenderStrategySeparate = PostRenderStrategy("separate")

	// PostRenderStrategyNoHooks sends only regular templates to the post-renderer and
	// leaves hooks untouched. This matches Helm 3's behavior.
	PostRenderStrategyNoHooks = PostRenderStrategy("nohooks")
)
View Source
const (
	// ExistingCRDsPolicySkip leaves the existing CRD as it is and carries on with the
	// remaining CRDs of the chart. CRDs not yet in the cluster are created.
	ExistingCRDsPolicySkip = ExistingCRDsPolicy("Skip")

	// ExistingCRDsPolicyFail fails the installation, reporting the CRDs that differ.
	// No CRD of the chart is created or changed.
	ExistingCRDsPolicyFail = ExistingCRDsPolicy("Fail")

	// ExistingCRDsPolicyOverwrite applies the CRD of the chart over the existing one.
	ExistingCRDsPolicyOverwrite = ExistingCRDsPolicy("Overwrite")
)
View Source
const (
	// HealthMonitoringClusterSummaryUIDLabel is set, with the UID of the ClusterSummary as value, on the
	// HealthCheck and ClusterHealthCheck instances created for a ClusterSummary when health monitoring is enabled.
	HealthMonitoringClusterSummaryUIDLabel = "projectsveltos.io/health-monitoring-clustersummary-uid"

	// HealthMonitoringClusterSummaryNamespaceAnnotation and HealthMonitoringClusterSummaryNameAnnotation
	// are set on the same instances to identify the ClusterSummary they have been created for.
	HealthMonitoringClusterSummaryNamespaceAnnotation = "projectsveltos.io/health-monitoring-clustersummary-namespace"
	HealthMonitoringClusterSummaryNameAnnotation      = "projectsveltos.io/health-monitoring-clustersummary-name"
)
View Source
const (
	ClusterConfigurationKind = "ClusterConfiguration"
)

Variables

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

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = runtime.SchemeBuilder{
		addKnownTypes,
	}

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

Functions

func GetClusterConfigurationSectionIndex

func GetClusterConfigurationSectionIndex(clusterConfiguration *ClusterConfiguration,
	profileKind, profileName string) (int, error)

GetClusterConfigurationSectionIndex returns Status.ClusterProfileResources index for given ClusterProfile. If not found, returns an error

func GetProfileOwnerAndTier

func GetProfileOwnerAndTier(ctx context.Context, c client.Client, clusterSummary *ClusterSummary,
) (profileOwner client.Object, tier int32, err error)

GetProfileOwnerAndTier returns the (Cluster)Profile owning this clusterSummary and its tier. Returns nil if (Cluster)Profile does not exist anymore.

func GetProfileOwnerReference

func GetProfileOwnerReference(clusterSummary *ClusterSummary) (*metav1.OwnerReference, error)

GetProfileOwnerReference returns the ClusterProfile/Profile owning a given ClusterSummary

func GetProfileRef added in v1.0.0

func GetProfileRef(clusterSummary *ClusterSummary) (*corev1.ObjectReference, error)

GetProfileOwnerReference returns the ClusterProfile/Profile owning a given ClusterSummary

Types

type AutoTrigger added in v1.2.0

type AutoTrigger struct {
	// Delay is an optional time duration to wait after the WaitForStatus condition
	// is met before proceeding with the promotion.
	// +optional
	Delay *metav1.Duration `json:"delay,omitempty"`

	// PreHealthCheckDeployment is a slice of resources Sveltos will deploy after the Delay
	// period has elapsed and before running PostDelayHealthChecks.
	// This can be used, for example, to deploy a Job that performs validation tasks.
	// The PostDelayHealthChecks can then validate the successful completion of these resources (e.g., a Job).
	// +optional
	PreHealthCheckDeployment []PolicyRef `json:"preHealthCheckDeployment,omitempty"`

	// PostDelayHealthChecks is a slice of health checks Sveltos will run after the delay
	// period has elapsed.
	// +optional
	PostDelayHealthChecks []libsveltosv1beta1.ValidateHealth `json:"postDelayHealthChecks,omitempty"`

	// PromotionWindow defines the recurring time window during which the
	// automatic promotion is permitted. The controller evaluates this window
	// *only after* the Delay (if defined) has elapsed and all PostDelayHealthChecks
	// have passed. The controller will then wait until the window defined by From/To
	// is open before proceeding.
	// +optional
	PromotionWindow *TimeWindow `json:"promotionWindow,omitempty"`
}

AutoTrigger defines the conditions for an automatic promotion.

func (*AutoTrigger) DeepCopy added in v1.2.0

func (in *AutoTrigger) DeepCopy() *AutoTrigger

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

func (*AutoTrigger) DeepCopyInto added in v1.2.0

func (in *AutoTrigger) DeepCopyInto(out *AutoTrigger)

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

type Chart

type Chart struct {
	// RepoURL URL of the repo containing the helm chart deployed
	// in the Cluster.
	// +kubebuilder:validation:MinLength=1
	RepoURL string `json:"repoURL"`

	// ReleaseName name of the release deployed in the Cluster.
	// +kubebuilder:validation:MinLength=1
	ReleaseName string `json:"releaseName"`

	// Namespace where chart is deployed in the Cluster.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// ChartVersion is the version of the helm chart deployed in the Cluster.
	ChartVersion string `json:"chartVersion"`

	// AppVersion is the version of the app deployed in the Cluster.
	// +optional
	AppVersion string `json:"appVersion,omitempty"`

	// The URL to an icon file.
	Icon string `json:"icon,omitempty"`

	// LastAppliedTime identifies when this resource was last applied to the cluster.
	LastAppliedTime *metav1.Time `json:"lastAppliedTime"`
}

func (*Chart) DeepCopy

func (in *Chart) DeepCopy() *Chart

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

func (*Chart) DeepCopyInto

func (in *Chart) DeepCopyInto(out *Chart)

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

type ClusterConfiguration

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

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

ClusterConfiguration is the Schema for the clusterconfigurations API

func (*ClusterConfiguration) DeepCopy

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

func (*ClusterConfiguration) DeepCopyInto

func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration)

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

func (*ClusterConfiguration) DeepCopyObject

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

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

type ClusterConfigurationList

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

ClusterConfigurationList contains a list of ClusterConfiguration

func (*ClusterConfigurationList) DeepCopy

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

func (*ClusterConfigurationList) DeepCopyInto

func (in *ClusterConfigurationList) DeepCopyInto(out *ClusterConfigurationList)

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

func (*ClusterConfigurationList) DeepCopyObject

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

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

type ClusterConfigurationStatus

type ClusterConfigurationStatus struct {
	// ClusterProfileResources is the list of resources currently deployed in a Cluster due
	// to ClusterProfiles
	// +optional
	ClusterProfileResources []ClusterProfileResource `json:"clusterProfileResources,omitempty"`

	// ProfileResources is the list of resources currently deployed in a Cluster due
	// to Profiles
	// +optional
	ProfileResources []ProfileResource `json:"profileResources,omitempty"`
}

ClusterConfigurationStatus defines the observed state of ClusterConfiguration

func (*ClusterConfigurationStatus) DeepCopy

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

func (*ClusterConfigurationStatus) DeepCopyInto

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

type ClusterProfile

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

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

ClusterProfile is the Schema for the clusterprofiles API

func (*ClusterProfile) DeepCopy

func (in *ClusterProfile) DeepCopy() *ClusterProfile

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

func (*ClusterProfile) DeepCopyInto

func (in *ClusterProfile) DeepCopyInto(out *ClusterProfile)

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

func (*ClusterProfile) DeepCopyObject

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

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

type ClusterProfileList

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

ClusterProfileList contains a list of ClusterProfile

func (*ClusterProfileList) DeepCopy

func (in *ClusterProfileList) DeepCopy() *ClusterProfileList

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

func (*ClusterProfileList) DeepCopyInto

func (in *ClusterProfileList) DeepCopyInto(out *ClusterProfileList)

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

func (*ClusterProfileList) DeepCopyObject

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

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

type ClusterProfileResource

type ClusterProfileResource struct {
	// ProfileName is the name of the ClusterProfile matching the Cluster.
	ClusterProfileName string `json:"clusterProfileName"`

	// Features contains the list of policies deployed in the Cluster because
	// of a given feature
	// +optional
	Features []Feature `json:"Features,omitempty"`
}

ClusterProfileResource keeps info on all of the resources deployed in this Cluster due to a given ClusterProfile

func (*ClusterProfileResource) DeepCopy

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

func (*ClusterProfileResource) DeepCopyInto

func (in *ClusterProfileResource) DeepCopyInto(out *ClusterProfileResource)

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

type ClusterPromotion added in v1.2.0

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

	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`

	// spec defines the desired state of ClusterPromotion
	// +required
	Spec ClusterPromotionSpec `json:"spec"`

	// status defines the observed state of ClusterPromotion
	// +optional
	Status ClusterPromotionStatus `json:"status,omitempty,omitzero"`
}

ClusterPromotion is the Schema for the ClusterPromotions API

func (*ClusterPromotion) DeepCopy added in v1.2.0

func (in *ClusterPromotion) DeepCopy() *ClusterPromotion

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

func (*ClusterPromotion) DeepCopyInto added in v1.2.0

func (in *ClusterPromotion) DeepCopyInto(out *ClusterPromotion)

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

func (*ClusterPromotion) DeepCopyObject added in v1.2.0

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

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

type ClusterPromotionList added in v1.2.0

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

ClusterPromotionList contains a list of ClusterPromotion

func (*ClusterPromotionList) DeepCopy added in v1.2.0

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

func (*ClusterPromotionList) DeepCopyInto added in v1.2.0

func (in *ClusterPromotionList) DeepCopyInto(out *ClusterPromotionList)

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

func (*ClusterPromotionList) DeepCopyObject added in v1.2.0

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

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

type ClusterPromotionSpec added in v1.2.0

type ClusterPromotionSpec struct {
	// ProfileSpec contains the common configuration for the Sveltos ClusterProfiles
	// that will be created at each stage.
	ProfileSpec ProfileSpec `json:"profileSpec,omitempty"`

	// Stages is a list of environments in the promotion pipeline.
	// The pipeline will progress through these stages in the order they are defined.
	// +kubebuilder:validation:MinItems=1
	// +patchMergeKey=name
	// +patchStrategy=merge,retainKeys
	// +listType=map
	// +listMapKey=name
	Stages []Stage `json:"stages"`

	// PreserveClusterProfilesOnDelete, if true, prevents the controller from deleting
	// the associated ClusterProfiles when this ClusterPromotion is deleted.
	// The ClusterProfiles will remain, and will need to be manually cleaned up.
	// +optional
	PreserveClusterProfilesOnDelete bool `json:"preserveClusterProfilesOnDelete,omitempty"`
}

ClusterPromotionSpec defines the desired state of ClusterPromotion

func (*ClusterPromotionSpec) DeepCopy added in v1.2.0

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

func (*ClusterPromotionSpec) DeepCopyInto added in v1.2.0

func (in *ClusterPromotionSpec) DeepCopyInto(out *ClusterPromotionSpec)

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

type ClusterPromotionStatus added in v1.2.0

type ClusterPromotionStatus struct {
	// Stages tracks the status of each configured promotion stage
	// (e.g., "qa", "staging", "production").
	Stages []StageStatus `json:"stages,omitempty"`

	// ProfileSpecHash represents a unique value for the entire ProfileSpec configuration
	// at a fixed point in time. This is used to detect configuration changes.
	// +optional
	ProfileSpecHash []byte `json:"profileSpecHash,omitempty"`

	// StagesHash represents a unique value for the entire list of Stages.
	// This hash changes if any stage is added, removed, or if the ordering
	// or configuration (ClusterSelector, Trigger) of any stage changes.
	// +optional
	StagesHash []byte `json:"stagesHash,omitempty"`

	//  If the pipeline is currently running, this is the name of the stage
	// being processed. If the pipeline is paused or completed, this is the name
	// of the last stage that reached a target state.
	// +optional
	CurrentStageName string `json:"currentStageName,omitempty"`

	// LastPromotionTime is the time the entire promotion process was successfully completed.
	// +optional
	LastPromotionTime *metav1.Time `json:"lastPromotionTime,omitempty"`
}

ClusterPromotionStatus defines the observed state of ClusterPromotion.

func (*ClusterPromotionStatus) DeepCopy added in v1.2.0

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

func (*ClusterPromotionStatus) DeepCopyInto added in v1.2.0

func (in *ClusterPromotionStatus) DeepCopyInto(out *ClusterPromotionStatus)

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

type ClusterReport

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

	Spec   ClusterReportSpec   `json:"spec,omitempty"`
	Status ClusterReportStatus `json:"status,omitempty"`
}

ClusterReport is the Schema for the clusterreports API

func (*ClusterReport) DeepCopy

func (in *ClusterReport) DeepCopy() *ClusterReport

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

func (*ClusterReport) DeepCopyInto

func (in *ClusterReport) DeepCopyInto(out *ClusterReport)

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

func (*ClusterReport) DeepCopyObject

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

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

type ClusterReportList

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

ClusterReportList contains a list of ClusterReport

func (*ClusterReportList) DeepCopy

func (in *ClusterReportList) DeepCopy() *ClusterReportList

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

func (*ClusterReportList) DeepCopyInto

func (in *ClusterReportList) DeepCopyInto(out *ClusterReportList)

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

func (*ClusterReportList) DeepCopyObject

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

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

type ClusterReportSpec

type ClusterReportSpec struct {
	// ClusterNamespace is the namespace of the CAPI Cluster this
	// ClusterReport is for.
	ClusterNamespace string `json:"clusterNamespace"`

	// ClusterName is the name of the CAPI Cluster this ClusterReport
	// is for.
	ClusterName string `json:"clusterName"`
}

ClusterReportSpec defines the desired state of ClusterReport

func (*ClusterReportSpec) DeepCopy

func (in *ClusterReportSpec) DeepCopy() *ClusterReportSpec

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

func (*ClusterReportSpec) DeepCopyInto

func (in *ClusterReportSpec) DeepCopyInto(out *ClusterReportSpec)

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

type ClusterReportStatus

type ClusterReportStatus struct {
	// ReleaseReports contains report on helm releases
	// +optional
	ReleaseReports []ReleaseReport `json:"releaseReports,omitempty"`

	// HelmResourceReports contains report on helm resources (when in pull mode, helm template resources are
	// deployed directly)
	// +optional
	HelmResourceReports []libsveltosv1beta1.ResourceReport `json:"helmResourceReports,omitempty"`

	// ResourceReports contains report on Kubernetes resources
	// deployed because of PolicyRefs
	// +optional
	ResourceReports []libsveltosv1beta1.ResourceReport `json:"resourceReports,omitempty"`

	// KustomizeResourceReports contains report on Kubernetes resources
	// deployed because of KustomizationRefs
	// +optional
	KustomizeResourceReports []libsveltosv1beta1.ResourceReport `json:"kustomizeResourceReports,omitempty"`
}

ClusterReportStatus defines the observed state of ClusterReport

func (*ClusterReportStatus) DeepCopy

func (in *ClusterReportStatus) DeepCopy() *ClusterReportStatus

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

func (*ClusterReportStatus) DeepCopyInto

func (in *ClusterReportStatus) DeepCopyInto(out *ClusterReportStatus)

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

type ClusterSummary

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

	Spec   ClusterSummarySpec   `json:"spec,omitempty"`
	Status ClusterSummaryStatus `json:"status,omitempty"`
}

ClusterSummary is the Schema for the clustersummaries API

func GetClusterSummary

func GetClusterSummary(ctx context.Context, c client.Client, namespace, name string,
) (*ClusterSummary, error)

func (*ClusterSummary) DeepCopy

func (in *ClusterSummary) DeepCopy() *ClusterSummary

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

func (*ClusterSummary) DeepCopyInto

func (in *ClusterSummary) DeepCopyInto(out *ClusterSummary)

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

func (*ClusterSummary) DeepCopyObject

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

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

type ClusterSummaryList

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

ClusterSummaryList contains a list of ClusterSummary

func (*ClusterSummaryList) DeepCopy

func (in *ClusterSummaryList) DeepCopy() *ClusterSummaryList

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

func (*ClusterSummaryList) DeepCopyInto

func (in *ClusterSummaryList) DeepCopyInto(out *ClusterSummaryList)

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

func (*ClusterSummaryList) DeepCopyObject

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

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

type ClusterSummarySpec

type ClusterSummarySpec struct {
	// ClusterNamespace is the namespace of the workload Cluster this
	// ClusterSummary is for.
	ClusterNamespace string `json:"clusterNamespace"`

	// ClusterName is the name of the workload Cluster this ClusterSummary is for.
	ClusterName string `json:"clusterName"`

	// ClusterType is the type of Cluster
	ClusterType libsveltosv1beta1.ClusterType `json:"clusterType"`

	// ClusterProfileSpec represent the configuration that will be applied to
	// the workload cluster.
	ClusterProfileSpec Spec `json:"clusterProfileSpec,omitempty"`
}

ClusterSummarySpec defines the desired state of ClusterSummary

func (*ClusterSummarySpec) DeepCopy

func (in *ClusterSummarySpec) DeepCopy() *ClusterSummarySpec

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

func (*ClusterSummarySpec) DeepCopyInto

func (in *ClusterSummarySpec) DeepCopyInto(out *ClusterSummarySpec)

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

type ClusterSummaryStatus

type ClusterSummaryStatus struct {
	// Dependencies is a summary reporting the status of the dependencies
	// for the associated ClusterProfile
	Dependencies *string `json:"dependencies,omitempty"`

	// FeatureSummaries reports the status of each workload cluster feature
	// directly managed by ClusterProfile.
	// +listType=map
	// +listMapKey=featureID
	// +optional
	FeatureSummaries []FeatureSummary `json:"featureSummaries,omitempty"`

	// DeployedGVKs reports the list of GVKs deployed by ClusterSummary
	// in a managed cluster
	// +listType=map
	// +listMapKey=featureID
	// +optional
	DeployedGVKs []libsveltosv1beta1.FeatureDeploymentInfo `json:"deployedGVKs,omitempty"`

	// HelmReleaseSummaries reports the status of each helm chart
	// directly managed by ClusterProfile.
	// +listType=atomic
	// +optional
	HelmReleaseSummaries []HelmChartSummary `json:"helmReleaseSummaries,omitempty"`

	// NextReconcileTime is the earliest time when this resource should be reconciled again.
	// Controller skips reconciliation if current time is before this timestamp.
	// If not set, reconciliations will happen as usual.
	// +optional
	NextReconcileTime *metav1.Time `json:"nextReconcileTime,omitempty"`

	// FailureMessage reports any error encountered during the reconciliation of the ClusterSummary
	// instance itself, *excluding* errors related to the deployment of individual features.
	// +optional
	FailureMessage *string `json:"failureMessage,omitempty"`

	// ReconciliationSuspended indicates whether the reconciliation loop for this
	// ClusterSummary is currently paused due to an external action (e.g., a user annotation).
	// When true, the status will not be updated unless the pause is lifted.
	// +optional
	ReconciliationSuspended bool `json:"reconciliationSuspended,omitempty"`

	// SuspensionReason provides a brief explanation of why the reconciliation is suspended.
	// +optional
	SuspensionReason *string `json:"suspensionReason,omitempty"`
}

ClusterSummaryStatus defines the observed state of ClusterSummary

func (*ClusterSummaryStatus) DeepCopy

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

func (*ClusterSummaryStatus) DeepCopyInto

func (in *ClusterSummaryStatus) DeepCopyInto(out *ClusterSummaryStatus)

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

type Clusters

type Clusters struct {
	// Hash represents of a unique value for ClusterProfile Spec at
	// a fixed point in time
	// +optional
	Hash []byte `json:"hash,omitempty"`

	// Clusters reference all the clusters currently matching
	// ClusterProfile ClusterSelector and already updated/being updated
	// to ClusterProfile Spec
	Clusters []corev1.ObjectReference `json:"clusters,omitempty"`
}

func (*Clusters) DeepCopy

func (in *Clusters) DeepCopy() *Clusters

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

func (*Clusters) DeepCopyInto

func (in *Clusters) DeepCopyInto(out *Clusters)

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

type CosignProvider added in v1.12.0

type CosignProvider string

CosignProvider is the method used to verify a Cosign signature. +kubebuilder:validation:Enum=PublicKey;Keyless

const (
	// CosignProviderPublicKey verifies the signature against a static PEM-encoded public key.
	CosignProviderPublicKey CosignProvider = "PublicKey"

	// CosignProviderKeyless verifies the signature using the Sigstore transparency log
	// and a Fulcio-issued OIDC certificate.
	CosignProviderKeyless CosignProvider = "Keyless"
)

type CosignVerification added in v1.12.0

type CosignVerification struct {
	// Provider specifies how to obtain the verification key or certificate.
	// +kubebuilder:validation:Enum=PublicKey;Keyless
	Provider CosignProvider `json:"provider"`

	// SecretRef references a Secret in the management cluster containing the Cosign public key.
	// The Secret must have a key named "cosign.pub" holding a PEM-encoded public key.
	// Required when Provider is PublicKey.
	// If Namespace is omitted, the cluster's namespace is used.
	// +optional
	SecretRef *corev1.SecretReference `json:"secretRef,omitempty"`

	// MatchOIDCIdentity lists OIDC identity matchers for keyless verification.
	// At least one matcher must be satisfied. Required when Provider is Keyless.
	// +optional
	MatchOIDCIdentity []OIDCIdentityMatcher `json:"matchOIDCIdentity,omitempty"`
}

CosignVerification configures Cosign-based signature verification for an OCI Helm chart.

func (*CosignVerification) DeepCopy added in v1.12.0

func (in *CosignVerification) DeepCopy() *CosignVerification

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

func (*CosignVerification) DeepCopyInto added in v1.12.0

func (in *CosignVerification) DeepCopyInto(out *CosignVerification)

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

type DeployedResource added in v1.1.0

type DeployedResource struct {
	// Name of the resource deployed in the Cluster.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// Namespace of the resource deployed in the Cluster.
	// Empty for resources scoped at cluster level.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Group of the resource deployed in the Cluster.
	Group string `json:"group"`

	// Kind of the resource deployed in the Cluster.
	// +kubebuilder:validation:MinLength=1
	Kind string `json:"kind"`

	// Version of the resource deployed in the Cluster.
	// +kubebuilder:validation:MinLength=1
	Version string `json:"version"`

	// LastAppliedTime identifies when this resource was last applied to the cluster.
	// +optional
	LastAppliedTime *metav1.Time `json:"lastAppliedTime,omitempty"`

	// DeploymentType indicates whether resources is deployed
	// into the management cluster (local) or the managed cluster (remote)
	// +kubebuilder:default:=Remote
	// +optional
	DeploymentType DeploymentType `json:"deploymentType,omitempty"`
}

func (*DeployedResource) DeepCopy added in v1.1.0

func (in *DeployedResource) DeepCopy() *DeployedResource

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

func (*DeployedResource) DeepCopyInto added in v1.1.0

func (in *DeployedResource) DeepCopyInto(out *DeployedResource)

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

type DeploymentType

type DeploymentType string

DeploymentType indicates whether resources need to be deployed into the management cluster (local) or the managed cluster (remote) +kubebuilder:validation:Enum:=Local;Remote

type DriftHistory added in v1.17.0

type DriftHistory struct {
	// LastDetectedTime is when the most recent drift was detected. When the component that
	// detected it did not report a time, it is the time the drift was collected.
	LastDetectedTime metav1.Time `json:"lastDetectedTime"`

	// Resources lists the resources that drifted, the most recently drifted first. A resource
	// that drifts again is listed once, with the time of its latest drift. When more than
	// MaxDriftedResources resources drifted, the oldest ones are dropped. Empty when the
	// component that detected the drift did not report which resources changed.
	// +optional
	Resources []DriftedResourceRef `json:"resources,omitempty"`

	// Truncated is true when the most recent drift involved more resources than the component
	// that detected it could report, so some of the resources that drifted are not listed.
	// +optional
	Truncated bool `json:"truncated,omitempty"`
}

DriftHistory describes the configuration drifts detected on the resources deployed by a feature.

func (*DriftHistory) DeepCopy added in v1.17.0

func (in *DriftHistory) DeepCopy() *DriftHistory

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

func (*DriftHistory) DeepCopyInto added in v1.17.0

func (in *DriftHistory) DeepCopyInto(out *DriftHistory)

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

type DriftedResourceRef added in v1.17.0

type DriftedResourceRef struct {
	// Group of the resource.
	Group string `json:"group,omitempty"`

	// Kind of the resource.
	Kind string `json:"kind"`

	// Namespace of the resource. Empty for cluster scoped resources.
	Namespace string `json:"namespace,omitempty"`

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

	// HelmReleaseNamespace is the namespace of the Helm release that deployed the resource.
	// Only set for the Helm feature.
	// +optional
	HelmReleaseNamespace string `json:"helmReleaseNamespace,omitempty"`

	// HelmReleaseName is the name of the Helm release that deployed the resource.
	// Only set for the Helm feature.
	// +optional
	HelmReleaseName string `json:"helmReleaseName,omitempty"`

	// DetectedTime is when the latest drift of this resource was detected.
	DetectedTime metav1.Time `json:"detectedTime"`
}

DriftedResourceRef identifies a resource that drifted.

func (*DriftedResourceRef) DeepCopy added in v1.17.0

func (in *DriftedResourceRef) DeepCopy() *DriftedResourceRef

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

func (*DriftedResourceRef) DeepCopyInto added in v1.17.0

func (in *DriftedResourceRef) DeepCopyInto(out *DriftedResourceRef)

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

type DryRunReconciliationError

type DryRunReconciliationError struct{}

func (*DryRunReconciliationError) DeepCopy

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

func (*DryRunReconciliationError) DeepCopyInto

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

func (*DryRunReconciliationError) Error

func (m *DryRunReconciliationError) Error() string

type ExistingCRDsPolicy added in v1.17.0

type ExistingCRDsPolicy string

ExistingCRDsPolicy controls what happens when a Helm chart is installed and one of the CRDs in the chart's crds/ directory already exists in the cluster with a different definition. +kubebuilder:validation:Enum:=Skip;Fail;Overwrite

type FailedCluster added in v1.6.0

type FailedCluster struct {
	// ClusterRef is a reference to the cluster where the failure occurred.
	ClusterRef corev1.ObjectReference `json:"clusterRef"`

	// FailureMessage is a human-readable explanation of why the
	// ClusterSummary creation/update failed.
	FailureMessage string `json:"failureMessage"`

	// LastFailureTime is the time the error occurred.
	// +optional
	LastFailureTime *metav1.Time `json:"lastFailureTime,omitempty"`
}

FailedCluster describes an error encountered while trying to manage resources for a specific matching cluster.

func (*FailedCluster) DeepCopy added in v1.6.0

func (in *FailedCluster) DeepCopy() *FailedCluster

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

func (*FailedCluster) DeepCopyInto added in v1.6.0

func (in *FailedCluster) DeepCopyInto(out *FailedCluster)

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

type Feature

type Feature struct {
	// FeatureID is an identifier of the feature whose status is reported
	FeatureID libsveltosv1beta1.FeatureID `json:"featureID"`

	// Resources is a list of resources deployed in the Cluster.
	// +optional
	Resources []DeployedResource `json:"resources,omitempty"`

	// Charts is a list of helm charts deployed in the Cluster.
	// +optional
	Charts []Chart `json:"charts,omitempty"`
}

func (*Feature) DeepCopy

func (in *Feature) DeepCopy() *Feature

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

func (*Feature) DeepCopyInto

func (in *Feature) DeepCopyInto(out *Feature)

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

type FeatureSummary

type FeatureSummary struct {
	// FeatureID is an identifier of the feature whose status is reported
	FeatureID libsveltosv1beta1.FeatureID `json:"featureID"`

	// Hash represents of a unique value for a feature at a fixed point in
	// time
	// +optional
	Hash []byte `json:"hash,omitempty"`

	// The number of consecutive deployment failures.
	// +optional
	ConsecutiveFailures uint `json:"consecutiveFailures,omitempty"`

	// Status represents the state of the feature in the workload cluster
	// +optional
	Status libsveltosv1beta1.FeatureStatus `json:"status,omitempty"`

	// FailureReason indicates the type of error that occurred.
	// +optional
	FailureReason *string `json:"failureReason,omitempty"`

	// FailureMessage provides more information about the error.
	// +optional
	FailureMessage *string `json:"failureMessage,omitempty"`

	// DeployedGroupVersionKind contains all GroupVersionKinds deployed in either
	// the workload cluster or the management cluster because of this feature.
	// Each element has format kind.version.group
	//
	// Deprecated: Replaced by FeatureDeploymentInfo field instead
	// +optional
	DeployedGroupVersionKind []string `json:"deployedGroupVersionKind,omitempty"`

	// LastAppliedTime is the time feature was last reconciled
	// +optional
	LastAppliedTime *metav1.Time `json:"lastAppliedTime,omitempty"`

	// ResourceSummaryDeployed tracks whether a ResourceSummary was deployed
	// to the managed cluster for drift detection. nil means unknown (upgrade
	// scenario); true means currently deployed; false means removed.
	// +optional
	ResourceSummaryDeployed *bool `json:"resourceSummaryDeployed,omitempty"`

	// DriftHistory records the configuration drifts detected on the resources this feature
	// deployed. Only set when SyncMode is ContinuousWithDriftDetection. It is kept after a
	// drift has been corrected by a redeploy, and every new drift is added to it.
	// +optional
	DriftHistory *DriftHistory `json:"driftHistory,omitempty"`
}

FeatureSummary contains a summary of the state of a workload cluster feature.

func (*FeatureSummary) DeepCopy

func (in *FeatureSummary) DeepCopy() *FeatureSummary

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

func (*FeatureSummary) DeepCopyInto

func (in *FeatureSummary) DeepCopyInto(out *FeatureSummary)

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

type HandOverError added in v1.0.0

type HandOverError struct {
	Message string
}

func (*HandOverError) DeepCopy added in v1.0.0

func (in *HandOverError) DeepCopy() *HandOverError

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

func (*HandOverError) DeepCopyInto added in v1.0.0

func (in *HandOverError) DeepCopyInto(out *HandOverError)

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

func (*HandOverError) Error added in v1.0.0

func (r *HandOverError) Error() string

type HealthMonitoring added in v1.17.0

type HealthMonitoring struct {
	// Enabled turns health monitoring on for the resources deployed by this profile.
	// When true, Sveltos creates a HealthCheck and a ClusterHealthCheck for each
	// matching cluster once the profile is provisioned there, and removes them
	// when monitoring is disabled or the cluster does not match anymore.
	Enabled bool `json:"enabled"`

	// DefaultChecks, when true (default), monitors the Deployments, StatefulSets, DaemonSets,
	// Jobs and PersistentVolumeClaims deployed by this profile (raw resources and Helm charts).
	// Set it to false to monitor only the HealthChecks listed in HealthChecks.
	// +kubebuilder:default:=true
	// +optional
	DefaultChecks *bool `json:"defaultChecks,omitempty"`

	// HealthChecks is a list of names of HealthCheck instances to monitor in addition
	// to the default checks. Those are deployed as they are: selecting only the
	// resources deployed by this profile is up to the HealthCheck.
	//
	// Only a ClusterProfile can set it. It is ignored for a (namespaced) Profile, which gets the
	// default checks only. A HealthCheck is a cluster-scoped resource referenced by name, and the
	// report it produces is shared by every profile that references it on a given cluster, with
	// no filtering by namespace. Allowing a Profile to reference one would let a tenant name
	// a HealthCheck it does not own, and learn about resources outside its namespace through
	// the shared report. The default checks are safe for a Profile: they select only the
	// resources that profile deployed.
	// +listType=set
	// +optional
	HealthChecks []string `json:"healthChecks,omitempty"`
}

HealthMonitoring configures the continuous health monitoring of the resources a profile deploys. Both ClusterProfile and Profile can enable it with the default checks. Referencing additional HealthChecks (healthChecks) is reserved to ClusterProfile: see the field.

+kubebuilder:validation:XValidation:rule="self.enabled || !has(self.healthChecks) || size(self.healthChecks) == 0",message="healthChecks can only be set when enabled is true" +kubebuilder:validation:XValidation:rule="!self.enabled || !has(self.defaultChecks) || self.defaultChecks || (has(self.healthChecks) && size(self.healthChecks) > 0)",message="defaultChecks cannot be false when healthChecks is empty: there would be nothing to monitor"

func (*HealthMonitoring) DeepCopy added in v1.17.0

func (in *HealthMonitoring) DeepCopy() *HealthMonitoring

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

func (*HealthMonitoring) DeepCopyInto added in v1.17.0

func (in *HealthMonitoring) DeepCopyInto(out *HealthMonitoring)

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

type HelmAction

type HelmAction string

HelmAction represents the type of action on a give resource or helm release

const (
	NoHelmAction           HelmAction = "No Action"
	UpdateHelmValuesAction HelmAction = "Update Values"
	InstallHelmAction      HelmAction = "Install"
	UpgradeHelmAction      HelmAction = "Upgrade"
	UninstallHelmAction    HelmAction = "Delete"
	ConflictHelmAction     HelmAction = "Conflict"
)

Define the HelmAction constants.

type HelmChart

type HelmChart struct {
	// RepositoryURL is the URL helm chart repository
	// It can point to a traditional HTTP-based repository or an OCI registry.
	// Examples:
	//   - HTTP Repository: https://charts.example.com/stable
	//   - OCI Registry: oci://registry.example.com/namespace/charts
	//   - GitHub Pages: https://<username>.github.io/<repository>/
	//   - Any other valid URL where Helm charts are hosted.
	//
	// Alternatively, it can be a Flux source reference:
	//   <flux source kind>://<flux source namespace>/<flux source name>/<path>
	//
	// Where:
	//   - <flux source kind> is the type of Flux source (gitrepository, ocirepository, bucket).
	//   - <flux source namespace> and <flux source name> are the namespace and name of the Flux Source in the management cluster.
	//   - <path> is the path within the source repository where the Helm charts are located.
	//
	// For instance:
	//   gitrepository://flux-system/flux-system/charts/projectsveltos
	//
	// Assuming there is a Flux GitRepository named 'flux-system' in the 'flux-system' namespace
	// syncing 'https://github.com/projectsveltos/helm-charts.git/', and the Helm charts are
	// located in the 'charts/projectsveltos' directory of that repository.
	// +kubebuilder:validation:MinLength=1
	RepositoryURL string `json:"repositoryURL"`

	// RepositoryName is the name helm chart repository
	// This field is used only when RepositoryURL points to a traditional HTTP or OCI repository.
	// It is ignored if RepositoryURL references a Flux Source.
	// Must be defined otherwise.
	// +optional
	RepositoryName string `json:"repositoryName,omitempty"`

	// ChartName is the chart name
	// This field is used only when RepositoryURL points to a traditional HTTP or OCI repository.
	// Must be defined otherwise.
	// +optional
	ChartName string `json:"chartName,omitempty"`

	// ChartVersion is the chart version
	// This field is used only when RepositoryURL points to a traditional HTTP or OCI repository.
	// It is ignored if RepositoryURL references a Flux Source.
	// Must be defined otherwise.
	// +optional
	ChartVersion string `json:"chartVersion,omitempty"`

	// ReleaseName is the chart release
	// +kubebuilder:validation:MinLength=1
	ReleaseName string `json:"releaseName"`

	// ReleaseNamespace is the namespace release will be installed
	// +kubebuilder:validation:MinLength=1
	ReleaseNamespace string `json:"releaseNamespace"`

	// Values field allows to define configuration for the Helm release.
	// These values can be static or leverage Go templates for dynamic customization.
	// When expressed as templates, the values are filled in using information from
	// resources within the management cluster before deployment (Cluster and TemplateResourceRefs)
	// +optional
	Values string `json:"values,omitempty"`

	// ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data,
	// it is possible to store configuration for the Helm release.
	// These values can be static or leverage Go templates for dynamic customization.
	// When expressed as templates, the values are filled in using information from
	// resources within the management cluster before deployment (Cluster and TemplateResourceRefs)
	// +optional
	ValuesFrom []ValueFrom `json:"valuesFrom,omitempty"`

	// HelmChartAction is the action that will be taken on the helm chart
	// +kubebuilder:default:=Install
	// +optional
	HelmChartAction HelmChartAction `json:"helmChartAction,omitempty"`

	// Options allows to set flags which are used during installation.
	// +optional
	Options *HelmOptions `json:"options,omitempty"`

	// RegistryCredentialsConfig is an optional configuration for credentials,
	// including information to connect to private registries.
	// +optional
	RegistryCredentialsConfig *RegistryCredentialsConfig `json:"registryCredentialsConfig,omitempty"`

	// SignatureVerification configures Cosign-based signature verification for OCI Helm charts.
	// Ignored when RepositoryURL does not start with "oci://".
	// +optional
	SignatureVerification *CosignVerification `json:"signatureVerification,omitempty"`

	// ProvenanceVerification configures Helm GPG .prov file verification for HTTP chart repositories.
	// Ignored for OCI and Flux-sourced charts.
	// +optional
	ProvenanceVerification *ProvenanceVerification `json:"provenanceVerification,omitempty"`
}

func (*HelmChart) DeepCopy

func (in *HelmChart) DeepCopy() *HelmChart

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

func (*HelmChart) DeepCopyInto

func (in *HelmChart) DeepCopyInto(out *HelmChart)

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

type HelmChartAction

type HelmChartAction string

HelmChartAction specifies action on an helm chart +kubebuilder:validation:Enum:=Install;Uninstall

type HelmChartStatus

type HelmChartStatus string

HelChartStatus specifies whether ClusterSummary is successfully managing an helm chart or not +kubebuilder:validation:Enum:=Managing;Conflict

type HelmChartSummary

type HelmChartSummary struct {
	// ReleaseName is the chart release
	// +kubebuilder:validation:MinLength=1
	ReleaseName string `json:"releaseName"`

	// ReleaseNamespace is the namespace release will be installed
	// +kubebuilder:validation:MinLength=1
	ReleaseNamespace string `json:"releaseNamespace"`

	// Status indicates whether ClusterSummary can manage the helm
	// chart or there is a conflict
	Status HelmChartStatus `json:"status"`

	// ValuesHash represents of a unique value for the values section
	// +optional
	ValuesHash []byte `json:"valuesHash,omitempty"`

	// PatchesHash represents of a unique value for the patches section
	// +optional
	PatchesHash []byte `json:"patchesHash,omitempty"`

	// Status indicates whether ClusterSummary can manage the helm
	// chart or there is a conflict
	// +optional
	ConflictMessage string `json:"conflictMessage,omitempty"`

	// +optional
	// FailureMessage provides the specific error from the Helm engine for this release
	FailureMessage *string `json:"failureMessage,omitempty"`

	// ChartName, RepositoryName, RepoURL, and ChartVersion mirror the fully resolved
	// (post-template) HelmChart entry that produced this release, captured at deploy time.
	// Never set for Flux-source-backed charts (Flux owns version resolution there).
	// +optional
	ChartName string `json:"chartName,omitempty"`

	// +optional
	RepositoryName string `json:"repositoryName,omitempty"`

	// +optional
	RepoURL string `json:"repoURL,omitempty"`

	// +optional
	ChartVersion string `json:"chartVersion,omitempty"`

	// CredentialsSecretRef is the resolved secret reference (if any) used to authenticate
	// against RepoURL, captured at deploy time. Only the reference is stored, never secret
	// contents.
	// +optional
	CredentialsSecretRef *corev1.SecretReference `json:"credentialsSecretRef,omitempty"`

	// LatestVersion is the highest version currently published upstream for this chart, if
	// greater than ChartVersion. Populated by a periodic background check, independent of
	// the reconcile loop. Detection only: Sveltos never mutates ChartVersion based on this.
	// +optional
	LatestVersion *string `json:"latestVersion,omitempty"`

	// LatestPatchVersion is the highest published version sharing ChartVersion's
	// major.minor, if greater than ChartVersion. Distinguishes "a same-minor patch bump is
	// available" from "a newer minor/major line exists" (LatestVersion).
	// +optional
	LatestPatchVersion *string `json:"latestPatchVersion,omitempty"`

	// LastCheckedTime is when LatestVersion/LatestPatchVersion were last evaluated.
	// +optional
	LastCheckedTime *metav1.Time `json:"lastCheckedTime,omitempty"`

	// NeedsRedeploy is set to true when drift-detection reports that a resource deployed by
	// this chart changed out of band. Only meaningful when SyncMode is ContinuousWithDriftDetection.
	// When true, this chart is upgraded on the next reconciliation regardless of whether its
	// desired values/version changed; cleared once the upgrade succeeds.
	// +optional
	NeedsRedeploy bool `json:"needsRedeploy,omitempty"`

	// AppliedContentHash is, in pull mode, the hash of what sveltos-applier last confirmed as applied
	// for this chart: the rendered resources plus the settings that change how they are applied.
	// While it matches the hash of the chart about to be applied, and drift-detection has not
	// reported the chart, sveltos-applier is told not to apply it again.
	// Not set in push mode.
	// +optional
	AppliedContentHash []byte `json:"appliedContentHash,omitempty"`

	// StagedContentHash is, in pull mode, the hash of what has been staged for sveltos-applier and
	// is not yet confirmed as applied. It becomes AppliedContentHash once sveltos-applier reports
	// success. While set, the chart is never skipped, so a failed apply is retried.
	// Not set in push mode.
	// +optional
	StagedContentHash []byte `json:"stagedContentHash,omitempty"`
}

func (*HelmChartSummary) DeepCopy

func (in *HelmChartSummary) DeepCopy() *HelmChartSummary

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

func (*HelmChartSummary) DeepCopyInto

func (in *HelmChartSummary) DeepCopyInto(out *HelmChartSummary)

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

type HelmInstallOptions

type HelmInstallOptions struct {
	// Create the release namespace if not present. Defaults to true
	// +kubebuilder:default:=true
	// +optional
	CreateNamespace *bool `json:"createNamespace,omitempty"`

	// Replaces if set indicates to replace an older release with this one
	// +kubebuilder:default:=true
	// +optional
	Replace *bool `json:"replace,omitempty"`

	// prevent hooks from running during install. If set to true, overrides
	// DisableHooks in HelmOptions. Use this one when you want to selective
	// disable hooks on install
	// Default to false
	// +kubebuilder:default:=false
	// +optional
	DisableHooks bool `json:"disableHooks,omitempty"`

	// if set, install will ignore the check for helm annotations
	// and take ownership of the existing resources
	// +kubebuilder:default:=false
	// +optional
	TakeOwnership bool `json:"takeOwnership,omitempty"`

	// ExistingCRDs controls what happens when a CRD in the chart's crds/ directory (subcharts
	// included) already exists in the cluster with a different definition. CRDs not yet in the
	// cluster are always created. Ignored when SkipCRDs is true.
	// Fail fails the installation and reports the CRDs that differ. No CRD is created or changed.
	// Skip leaves the existing CRD as it is, logs it and carries on with the rest of the chart.
	// Overwrite applies the CRD of the chart over the existing one.
	// Default to Fail
	// +kubebuilder:default:=Fail
	// +optional
	ExistingCRDs ExistingCRDsPolicy `json:"existingCRDs,omitempty"`

	// RecoverAfterConsecutiveFailures is the number of consecutive install failures for this
	// chart after which Sveltos uninstalls any existing release under this name before
	// retrying, to clear potentially stale Helm release history that would otherwise keep
	// blocking every subsequent install attempt. This only ever runs when there is no
	// currently deployed release to protect: a release that is deployed, or mid-upgrade, or
	// failed while already existing, is always retried through helm upgrade instead, never
	// through this. It only applies to a release that was never successfully installed, or
	// was already cleanly uninstalled.
	// Default to 5
	// +kubebuilder:default:=5
	// +optional
	RecoverAfterConsecutiveFailures int `json:"recoverAfterConsecutiveFailures,omitempty"`
}

func (*HelmInstallOptions) DeepCopy

func (in *HelmInstallOptions) DeepCopy() *HelmInstallOptions

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

func (*HelmInstallOptions) DeepCopyInto

func (in *HelmInstallOptions) DeepCopyInto(out *HelmInstallOptions)

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

type HelmOptions

type HelmOptions struct {
	// SkipCRDs controls whether CRDs should be installed during install/upgrade operation.
	// By default, CRDs are installed if not already present.
	// +kubebuilder:default:=false
	// +optional
	SkipCRDs bool `json:"skipCRDs,omitempty"`

	// SkipSchemaValidation determines if JSON schema validation is disabled.
	// +kubebuilder:default:=false
	// +optional
	SkipSchemaValidation bool `json:"skipSchemaValidation,omitempty"`

	// if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet
	// are in a ready state before marking the release as successful. It will wait for as long as --timeout
	// Default to false
	// +kubebuilder:default:=false
	// +optional
	Wait bool `json:"wait,omitempty"`

	// if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful.
	// It will wait for as long as --timeout
	// Default to false
	// +kubebuilder:default:=false
	// +optional
	WaitForJobs bool `json:"waitForJobs,omitempty"`

	// time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s)
	// +optional
	Timeout *metav1.Duration `json:"timeout,omitempty"`

	// prevent hooks from running during install/upgrade/uninstall
	// Default to false
	// +kubebuilder:default:=false
	// +optional
	DisableHooks bool `json:"disableHooks,omitempty"`

	// if set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema
	// Default to false
	// +kubebuilder:default:=false
	// +optional
	DisableOpenAPIValidation bool `json:"disableOpenAPIValidation,omitempty"`

	// if set, the installation process deletes the installation/upgrades on failure.
	// The --wait flag will be set automatically if --atomic is used
	// Default to false
	// +kubebuilder:default:=false
	// +optional
	Atomic bool `json:"atomic,omitempty"`

	// update dependencies if they are missing before installing the chart
	// Default to false
	// +kubebuilder:default:=false
	// +optional
	DependencyUpdate bool `json:"dependencyUpdate,omitempty"`

	// Labels that would be added to release metadata.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// EnableClientCache is a flag to enable Helm client cache. If it is not specified, it will be set to false.
	// +kubebuilder:default=false
	// +optional
	EnableClientCache bool `json:"enableClientCache,omitempty"`

	// Description is the description of an helm operation
	// +optional
	Description string `json:"description,omitempty"`

	// PassCredentialsAll is the flag to pass credentials to all domains
	// +optional
	PassCredentialsAll bool `json:"passCredentialsAll,omitempty"`

	// RunTests if set to true, Sveltos will run helm test after each successful install or upgrade
	// operation. The tests are the test hooks defined in the chart (annotated with
	// "helm.sh/hook: test"). If any test fails the deployment is considered failed and the
	// error is surfaced in the ClusterSummary status, providing operational gating.
	// Has no effect in DryRun mode.
	// Default to false
	// +kubebuilder:default:=false
	// +optional
	RunTests bool `json:"runTests,omitempty"`

	// PostRenderStrategy controls whether Helm hooks are included when Patches/PatchesFrom
	// are applied as a post-renderer during this chart's install/upgrade. Only relevant
	// when Patches or PatchesFrom is set on the Spec; ignored otherwise. Defaults to
	// Helm's own default (combined) when unset.
	// +optional
	PostRenderStrategy PostRenderStrategy `json:"postRenderStrategy,omitempty"`

	// HelmInstallOptions are options specific to helm install
	// +optional
	InstallOptions HelmInstallOptions `json:"installOptions,omitempty"`

	// HelmUpgradeOptions are options specific to helm upgrade
	// +optional
	UpgradeOptions HelmUpgradeOptions `json:"upgradeOptions,omitempty"`

	// HelmUninstallOptions are options specific to helm uninstall
	// +optional
	UninstallOptions HelmUninstallOptions `json:"uninstallOptions,omitempty"`
}

func (*HelmOptions) DeepCopy

func (in *HelmOptions) DeepCopy() *HelmOptions

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

func (*HelmOptions) DeepCopyInto

func (in *HelmOptions) DeepCopyInto(out *HelmOptions)

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

type HelmUninstallOptions

type HelmUninstallOptions struct {
	// When uninstall a chart with this flag, Helm removes the resources associated with the chart,
	// but it keeps the release information. This allows to see details about the uninstalled release
	// using the helm history command.
	// +optional
	KeepHistory bool `json:"keepHistory,omitempty"`

	// DeletionPropagation
	// +kubebuilder:validation:Enum:=orphan;foreground;background
	// +optional
	DeletionPropagation string `json:"deletionPropagation,omitempty"`

	// prevent hooks from running during install. If set to true, overrides
	// DisableHooks in HelmOptions. Use this one when you want to selective
	// disable hooks on uninstall
	// Default to false
	// +kubebuilder:default:=false
	// +optional
	DisableHooks bool `json:"disableHooks,omitempty"`
}

func (*HelmUninstallOptions) DeepCopy

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

func (*HelmUninstallOptions) DeepCopyInto

func (in *HelmUninstallOptions) DeepCopyInto(out *HelmUninstallOptions)

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

type HelmUpgradeOptions

type HelmUpgradeOptions struct {
	// Force will, if set to `true`, ignore certain warnings and perform the upgrade anyway.
	// This should be used with caution.
	// +kubebuilder:default:=false
	// +optional
	Force bool `json:"force,omitempty"`

	// ResetValues will reset the values to the chart's built-ins rather than merging with existing.
	// +kubebuilder:default:=false
	// +optional
	ResetValues bool `json:"resetValues,omitempty"`

	// ReuseValues copies values from the current release to a new release if the
	// new release does not have any values. If the request already has values,
	// or if there are no values in the current release, this does nothing.
	// This is skipped if the ResetValues flag is set, in which case the
	// request values are not altered.
	// +kubebuilder:default:=false
	// +optional
	ReuseValues bool `json:"reuseValues,omitempty"`

	// ResetThenReuseValues will reset the values to the chart's built-ins then merge with user's last supplied values.
	// +kubebuilder:default:=false
	// +optional
	ResetThenReuseValues bool `json:"resetThenReuseValues,omitempty"`

	// Recreate will (if true) recreate pods after a rollback.
	// +kubebuilder:default:=false
	//
	// Deprecated: This field is no longer supported
	//
	// +optional
	Recreate bool `json:"recreate,omitempty"`

	// MaxHistory limits the maximum number of revisions saved per release
	// Default to 2
	// +kubebuilder:default=2
	// +optional
	MaxHistory int `json:"maxHistory,omitempty"`

	// CleanupOnFail will, if true, cause the upgrade to delete newly-created resources on a failed update.
	// +kubebuilder:default:=false
	// +optional
	CleanupOnFail bool `json:"cleanupOnFail,omitempty"`

	// SubNotes determines whether sub-notes are rendered in the chart.
	// +kubebuilder:default:=false
	// +optional
	SubNotes bool `json:"subNotes,omitempty"`

	// UpgradeCRDs upgrade CRDs from the Helm Chart's crds directory
	// By default, CRDs are not applied during Helm upgrade action by Helm
	// https://helm.sh/docs/chart_best_practices/custom_resource_definitions/
	// +kubebuilder:default:=false
	// +optional
	UpgradeCRDs bool `json:"upgradeCRDs,omitempty"`

	// prevent hooks from running during install. If set to true, overrides
	// DisableHooks in HelmOptions. Use this one when you want to selective
	// disable hooks on upgrade
	// Default to false
	// +kubebuilder:default:=false
	// +optional
	DisableHooks bool `json:"disableHooks,omitempty"`

	// if set, upgrade will ignore the check for helm annotations
	// and take ownership of the existing resources
	// +kubebuilder:default:=false
	// +optional
	TakeOwnership bool `json:"takeOwnership,omitempty"`
}

func (*HelmUpgradeOptions) DeepCopy

func (in *HelmUpgradeOptions) DeepCopy() *HelmUpgradeOptions

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

func (*HelmUpgradeOptions) DeepCopyInto

func (in *HelmUpgradeOptions) DeepCopyInto(out *HelmUpgradeOptions)

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

type KustomizationRef

type KustomizationRef struct {
	// Namespace of the referenced resource.
	// For ClusterProfile namespace can be left empty. In such a case, namespace will
	// be implicit set to cluster's namespace.
	// For Profile namespace must be left empty. The Profile namespace will be used.
	// Namespace can be expressed as a template and instantiate using any cluster field.
	// Not used when RemoteURL is set.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Name of the referenced resource.
	// Name can be expressed as a template and instantiate using any cluster field.
	// Required when RemoteURL is not set.
	// +optional
	Name string `json:"name,omitempty"`

	// Kind of the resource. Supported kinds are:
	// - flux GitRepository;OCIRepository;Bucket
	// - ConfigMap/Secret
	// Required when RemoteURL is not set.
	// +kubebuilder:validation:Enum=GitRepository;OCIRepository;Bucket;ConfigMap;Secret
	// +optional
	Kind string `json:"kind,omitempty"`

	// Path to the directory containing the kustomization.yaml file, or the
	// set of plain YAMLs a kustomization.yaml should be generated for.
	// Defaults to 'None', which translates to the root path of the SourceRef.
	// These values can be static or leverage Go templates for dynamic customization.
	// When expressed as templates, the values are filled in using information from
	// resources within the management cluster before deployment (Cluster and TemplateResourceRefs)
	// +optional
	Path string `json:"path,omitempty"`

	// Components is a list of paths to Kustomize components. These paths are relative to the
	// `Path` field and are included in the Kustomize build to provide reusable configuration logic.
	// These values can be static or leverage Go templates for dynamic customization.
	// When expressed as templates, the values are filled in using information from
	// resources within the management cluster before deployment (Cluster and TemplateResourceRefs)
	// +optional
	Components []string `json:"components,omitempty"`

	// Optional indicates that the referenced resource is not mandatory.
	// If set to true and the resource is not found, the error will be ignored,
	// and Sveltos will continue processing other ValueFroms.
	// +kubebuilder:default:=false
	// +optional
	Optional bool `json:"optional,omitempty"`

	// TargetNamespace sets or overrides the namespace in the
	// kustomization.yaml file.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Optional
	// +optional
	TargetNamespace string `json:"targetNamespace,omitempty"`

	// DeploymentType indicates whether resources need to be deployed
	// into the management cluster (local) or the managed cluster (remote)
	// NOTE: DeploymentType Local cannot be used when the matching cluster is the management cluster itself.
	// +kubebuilder:default:=Remote
	// +optional
	DeploymentType DeploymentType `json:"deploymentType,omitempty"`

	// Values is a map[string]string type that allows to define a set of key-value pairs.
	// These key-value pairs can optionally leverage Go templates for further processing.
	// With Sveltos, you can define key-value pairs where the values can be Go templates.
	// These templates have access to management cluster information during deployment. This allows
	// to do more than just replace placeholders. Variables can be used to dynamically
	// construct values based on other resources or variables within the Kustomize output.
	// For example, imagine you have a Region key with a template value like:
	// '{{ index .Cluster.metadata.labels "region" }}'.
	// This template retrieves the region label from the cluster instance metadata.
	// Finally, Sveltos uses these processed values to fill placeholders in the Kustomize output.
	// The output itself can also contain templates, like:
	// region: '{{ default "west" .Region }}'.
	// This way, the final output from Kustomize will have the region set dynamically based on
	// the actual region retrieved earlier.
	// +optional
	Values map[string]string `json:"values,omitempty"`

	// ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data,
	// it is possible to define key-value pairs. These key-value pairs can optionally leverage
	// Go templates for further processing.
	// With Sveltos, you can define key-value pairs where the values can be Go templates.
	// These templates have access to management cluster information during deployment. This allows
	// to do more than just replace placeholders. Variables can be used to dynamically
	// construct values based on other resources or variables within the Kustomize output.
	// For example, imagine you have a Region key with a template value like:
	// '{{ index .Cluster.metadata.labels "region" }}'.
	// This template retrieves the region label from the cluster instance metadata.
	// Finally, Sveltos uses these processed values to fill placeholders in the Kustomize output.
	// The output itself can also contain templates, like:
	// region: '{{ default "west" .Region }}'.
	// This way, the final output from Kustomize will have the region set dynamically based on
	// the actual region retrieved earlier.
	// +optional
	ValuesFrom []ValueFrom `json:"valuesFrom,omitempty"`

	// Tier controls the order of deployment for resources coming from different KustomizationRef
	// within the same ClusterProfile or Profile.
	// When two KustomizationRef attempt to deploy the same resource, the KustomizationRef with the lowest
	// Tier value takes priority and deploys/updates the resource.
	// This priority mechanism is only checked after the parent ClusterProfile has won
	// the primary conflict resolution against other ClusterProfiles.
	// Higher Tier values represent lower priority. The default Tier value is 100.
	// +kubebuilder:default:=100
	// +kubebuilder:validation:Minimum=1
	// +optional
	Tier int32 `json:"tier,omitempty"`

	// SkipNamespaceCreation indicates whether Sveltos should skip creating the namespace
	// for namespaced resources defined in this KustomizationRef.
	// This field is ignored for cluster-scoped resources.
	// By default, Sveltos attempts to get or create the target namespace if it does not exist.
	// Setting this to true avoids those calls, which is necessary when Sveltos lacks
	// permissions to manage namespaces at the cluster level.
	// +kubebuilder:default:=false
	// +optional
	SkipNamespaceCreation bool `json:"skipNamespaceCreation,omitempty"`

	// Force indicates whether Sveltos should delete and recreate a resource defined in this
	// KustomizationRef when an update is rejected with an error that only a delete+recreate
	// can resolve (eg an invalid combination of fields, or a field enforced as immutable).
	// By default, such errors are surfaced instead of recreating the resource.
	// This applies to every resource produced by this KustomizationRef. To force just one
	// resource, regardless of this field's value, annotate that resource with
	// projectsveltos.io/forceRecreate instead.
	// +kubebuilder:default:=false
	// +optional
	Force bool `json:"force,omitempty"`

	// RemoteURL configures fetching the Kustomize directory content from an HTTP/HTTPS
	// endpoint or an OCI registry, without requiring a Flux GitRepository/OCIRepository/Bucket
	// or a ConfigMap/Secret.
	// When set, Kind/Name/Namespace must be omitted.
	// +optional
	RemoteURL *RemoteKustomizeURL `json:"remoteURL,omitempty"`
}

+kubebuilder:validation:XValidation:rule="has(self.remoteURL) != has(self.kind)",message="either remoteURL or kind must be set, but not both"

func (*KustomizationRef) DeepCopy

func (in *KustomizationRef) DeepCopy() *KustomizationRef

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

func (*KustomizationRef) DeepCopyInto

func (in *KustomizationRef) DeepCopyInto(out *KustomizationRef)

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

type ManualTrigger added in v1.2.0

type ManualTrigger struct {
	// Delay is an optional time duration to wait after the WaitForStatus condition
	// is met before proceeding with the promotion.
	// +optional
	Delay *metav1.Duration `json:"delay,omitempty"`

	// PreHealthCheckDeployment is a slice of resources Sveltos will deploy after the Delay
	// period has elapsed and before running PostDelayHealthChecks.
	// This can be used, for example, to deploy a Job that performs validation tasks.
	// The PostDelayHealthChecks can then validate the successful completion of these resources (e.g., a Job).
	// +optional
	PreHealthCheckDeployment []PolicyRef `json:"preHealthCheckDeployment,omitempty"`

	// PostDelayHealthChecks is a slice of health checks Sveltos will run after the delay
	// period has elapsed.
	// +optional
	PostDelayHealthChecks []libsveltosv1beta1.ValidateHealth `json:"postDelayHealthChecks,omitempty"`

	// Approved, when set to true, signals to the controller that
	// promotion to the next stage is approved.
	// +optional
	Approved *bool `json:"approved,omitempty"`

	// AutomaticReset, when set to true, instructs the controller to automatically
	// reset the 'Approved' field to nil/false after successfully promoting
	// to the next stage. This prevents unintended immediate advancement
	// past the next manual stage. Defaults to true.
	// +kubebuilder:default:=true
	// +optional
	AutomaticReset bool `json:"automaticReset,omitempty"`
}

ManualTrigger is a placeholder to represent a manual trigger.

func (*ManualTrigger) DeepCopy added in v1.2.0

func (in *ManualTrigger) DeepCopy() *ManualTrigger

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

func (*ManualTrigger) DeepCopyInto added in v1.2.0

func (in *ManualTrigger) DeepCopyInto(out *ManualTrigger)

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

type NonRetriableError added in v1.0.0

type NonRetriableError struct {
	Message string
}

func (*NonRetriableError) DeepCopy added in v1.0.0

func (in *NonRetriableError) DeepCopy() *NonRetriableError

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

func (*NonRetriableError) DeepCopyInto added in v1.0.0

func (in *NonRetriableError) DeepCopyInto(out *NonRetriableError)

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

func (*NonRetriableError) Error added in v1.0.0

func (r *NonRetriableError) Error() string

type OIDCIdentityMatcher added in v1.12.0

type OIDCIdentityMatcher struct {
	// Issuer is the OIDC issuer URL or regex.
	// +kubebuilder:validation:MinLength=1
	Issuer string `json:"issuer"`

	// Subject is the OIDC subject or regex, typically the workload identity or GitHub Actions workflow URL.
	// +kubebuilder:validation:MinLength=1
	Subject string `json:"subject"`
}

OIDCIdentityMatcher specifies the expected OIDC issuer and subject for keyless Cosign verification.

func (*OIDCIdentityMatcher) DeepCopy added in v1.12.0

func (in *OIDCIdentityMatcher) DeepCopy() *OIDCIdentityMatcher

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

func (*OIDCIdentityMatcher) DeepCopyInto added in v1.12.0

func (in *OIDCIdentityMatcher) DeepCopyInto(out *OIDCIdentityMatcher)

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

type PolicyRef

type PolicyRef struct {
	// Namespace of the referenced resource.
	// For ClusterProfile namespace can be left empty. In such a case, namespace will
	// be implicit set to cluster's namespace.
	// For Profile namespace must be left empty. Profile namespace will be used.
	// Namespace can be expressed as a template and instantiate using any cluster field.
	// Not used when RemoteURL is set.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Name of the referenced resource.
	// Name can be expressed as a template and instantiate using any cluster field.
	// Required when RemoteURL is not set.
	// +optional
	Name string `json:"name,omitempty"`

	// Kind of the resource. Supported kinds are:
	// - ConfigMap/Secret
	// - flux GitRepository;OCIRepository;Bucket
	// Required when RemoteURL is not set.
	// +kubebuilder:validation:Enum=GitRepository;OCIRepository;Bucket;ConfigMap;Secret
	// +optional
	Kind string `json:"kind,omitempty"`

	// Path to the directory containing the YAML files.
	// Defaults to 'None', which translates to the root path of the SourceRef.
	// Used only for GitRepository;OCIRepository;Bucket
	// This value can be static or leverage Go templates for dynamic customization.
	// When expressed as a template, it is filled in using information from
	// resources within the management cluster before deployment (Cluster and TemplateResourceRefs)
	// +optional
	Path string `json:"path,omitempty"`

	// DeploymentType indicates whether resources need to be deployed
	// into the management cluster (local) or the managed cluster (remote)
	// +kubebuilder:default:=Remote
	// +optional
	DeploymentType DeploymentType `json:"deploymentType,omitempty"`

	// Optional indicates that the referenced resource is not mandatory.
	// If set to true and the resource is not found, the error will be ignored,
	// and Sveltos will continue processing other PolicyRefs.
	// +kubebuilder:default:=false
	// +optional
	Optional bool `json:"optional,omitempty"`

	// Tier controls the order of deployment for resources coming from different PolicyRefs
	// within the same ClusterProfile or Profile.
	// When two PolicyRefs attempt to deploy the same resource, the PolicyRef with the lowest
	// Tier value takes priority and deploys/updates the resource.
	// This priority mechanism is only checked after the parent ClusterProfile has won
	// the primary conflict resolution against other ClusterProfiles.
	// Higher Tier values represent lower priority. The default Tier value is 100.
	// +kubebuilder:default:=100
	// +kubebuilder:validation:Minimum=1
	// +optional
	Tier int32 `json:"tier,omitempty"`

	// SkipNamespaceCreation indicates whether Sveltos should skip creating the namespace
	// for namespaced resources defined in this PolicyRef.
	// This field is ignored for cluster-scoped resources.
	// By default, Sveltos attempts to get or create the target namespace if it does not exist.
	// Setting this to true avoids those calls, which is necessary when Sveltos lacks
	// permissions to manage namespaces at the cluster level.
	// +kubebuilder:default:=false
	// +optional
	SkipNamespaceCreation bool `json:"skipNamespaceCreation,omitempty"`

	// Force indicates whether Sveltos should delete and recreate a resource defined in this
	// PolicyRef when an update is rejected with an error that only a delete+recreate can
	// resolve (eg an invalid combination of fields, or a field enforced as immutable).
	// By default, such errors are surfaced instead of recreating the resource.
	// This applies to every resource produced by this PolicyRef. To force just one
	// resource, regardless of this field's value, annotate that resource with
	// projectsveltos.io/forceRecreate instead.
	// +kubebuilder:default:=false
	// +optional
	Force bool `json:"force,omitempty"`

	// RemoteURL configures fetching content from an HTTP/HTTPS endpoint or an OCI registry.
	// When set, Kind/Name/Namespace must be omitted.
	// +optional
	RemoteURL *RemoteURL `json:"remoteURL,omitempty"`
}

+kubebuilder:validation:XValidation:rule="has(self.remoteURL) != has(self.kind)",message="either remoteURL or kind must be set, but not both"

func (*PolicyRef) DeepCopy

func (in *PolicyRef) DeepCopy() *PolicyRef

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

func (*PolicyRef) DeepCopyInto

func (in *PolicyRef) DeepCopyInto(out *PolicyRef)

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

type PostRenderStrategy added in v1.13.0

type PostRenderStrategy string

PostRenderStrategy controls whether Helm hooks are included when Patches/PatchesFrom are applied as a post-renderer during this HelmChart's install/upgrade. +kubebuilder:validation:Enum:=combined;separate;nohooks

type Profile

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

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

Profile is the Schema for the profiles API

func (*Profile) DeepCopy

func (in *Profile) DeepCopy() *Profile

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

func (*Profile) DeepCopyInto

func (in *Profile) DeepCopyInto(out *Profile)

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

func (*Profile) DeepCopyObject

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

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

type ProfileList

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

ProfileList contains a list of Profile

func (*ProfileList) DeepCopy

func (in *ProfileList) DeepCopy() *ProfileList

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

func (*ProfileList) DeepCopyInto

func (in *ProfileList) DeepCopyInto(out *ProfileList)

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

func (*ProfileList) DeepCopyObject

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

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

type ProfileResource

type ProfileResource struct {
	// ProfileName is the name of the Profile matching the Cluster.
	ProfileName string `json:"profileName"`

	// Features contains the list of policies deployed in the Cluster because
	// of a given feature
	// +optional
	Features []Feature `json:"Features,omitempty"`
}

ProfileResource keeps info on all of the resources deployed in this Cluster due to a given Profile

func (*ProfileResource) DeepCopy

func (in *ProfileResource) DeepCopy() *ProfileResource

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

func (*ProfileResource) DeepCopyInto

func (in *ProfileResource) DeepCopyInto(out *ProfileResource)

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

type ProfileSpec added in v1.2.0

type ProfileSpec struct {
	// SyncMode specifies how features are synced in a matching workload cluster.
	// - OneTime means, first time a workload cluster matches the ClusterProfile,
	// features will be deployed in such cluster. Any subsequent feature configuration
	// change won't be applied into the matching workload clusters;
	// - Continuous mode ensures that the first time a workload cluster matches a ClusterProfile,
	// the specified features are deployed. Subsequent changes to the feature configuration are also
	// automatically applied to all matching workload clusters.
	// _ SyncModeContinuousWithDriftDetection operates similarly to Continuous mode, but also monitors
	// matching managed clusters for configuration drift. If drift is detected, a reconciliation is
	// triggered to ensure the managed cluster's configuration aligns with the ClusterProfile.
	// - DryRun means no change will be propagated to any matching cluster. A report
	// instead will be generated summarizing what would happen in any matching cluster
	// because of the changes made to ClusterProfile while in DryRun mode.
	// +kubebuilder:default:=Continuous
	// +optional
	SyncMode SyncMode `json:"syncMode,omitempty"`

	// Tier controls the order of deployment for ClusterProfile or Profile resources targeting
	// the same cluster resources.
	// Imagine two configurations (ClusterProfiles or Profiles) trying to deploy the same resource (a Kubernetes
	// resource or an helm chart). By default, the first one to reach the cluster "wins" and deploys it.
	// Tier allows you to override this. When conflicts arise, the ClusterProfile or Profile with the **lowest**
	// Tier value takes priority and deploys the resource.
	// Higher Tier values represent lower priority. The default Tier value is 100.
	// Using Tiers provides finer control over resource deployment within your cluster, particularly useful
	// when multiple configurations manage the same resources.
	// +kubebuilder:default:=100
	// +kubebuilder:validation:Minimum=1
	// +optional
	Tier int32 `json:"tier,omitempty"`

	// By default (when ContinueOnConflict is unset or set to false), Sveltos stops deployment after
	// encountering the first conflict (e.g., another ClusterProfile already deployed the resource).
	// If set to true, Sveltos will attempt to deploy remaining resources in the ClusterProfile even
	// if conflicts are detected for previous resources.
	// +kubebuilder:default:=false
	// +optional
	ContinueOnConflict bool `json:"continueOnConflict,omitempty"`

	// By default (when ContinueOnError is unset or set to false), Sveltos stops deployment after
	// encountering the first error.
	// If set to true, Sveltos will attempt to deploy remaining resources in the ClusterProfile even
	// if errors are detected for previous resources.
	// +kubebuilder:default:=false
	// +optional
	ContinueOnError bool `json:"continueOnError,omitempty"`

	// The maximum number of clusters that can be updated concurrently.
	// Value can be an absolute number (ex: 5) or a percentage of desired cluster (ex: 10%).
	// Defaults to 100%.
	// Example: when this is set to 30%, when list of add-ons/applications in ClusterProfile
	// changes, only 30% of matching clusters will be updated in parallel. Only when updates
	// in those cluster succeed, other matching clusters are updated.
	// +kubebuilder:validation:XIntOrString
	// +kubebuilder:validation:Pattern="^((100|[0-9]{1,2})%|[0-9]+)$"
	// +optional
	MaxUpdate *intstr.IntOrString `json:"maxUpdate,omitempty"`

	// StopMatchingBehavior indicates what behavior should be when a Cluster stop matching
	// the ClusterProfile. By default all deployed Helm charts and Kubernetes resources will
	// be withdrawn from Cluster. Setting StopMatchingBehavior to LeavePolicies will instead
	// leave ClusterProfile deployed policies in the Cluster.
	// +kubebuilder:default:=WithdrawPolicies
	// +optional
	StopMatchingBehavior StopMatchingBehavior `json:"stopMatchingBehavior,omitempty"`

	// Reloader indicates whether Deployment/StatefulSet/DaemonSet instances deployed
	// by Sveltos and part of this ClusterProfile need to be restarted via rolling upgrade
	// when a ConfigMap/Secret instance mounted as volume is modified.
	// When set to true, when any mounted ConfigMap/Secret is modified, Sveltos automatically
	// starts a rolling upgrade for Deployment/StatefulSet/DaemonSet instances mounting it.
	// +kubebuilder:default:=false
	// +optional
	Reloader bool `json:"reloader,omitempty"`

	// TemplateResourceRefs is a list of resource to collect from the management cluster.
	// Those resources' values will be used to instantiate templates
	// +patchMergeKey=identifier
	// +patchStrategy=merge,retainKeys
	// +listType=map
	// +listMapKey=identifier
	// +optional
	TemplateResourceRefs []TemplateResourceRef `json:"templateResourceRefs,omitempty" patchStrategy:"merge" patchMergeKey:"identifier"`

	// DependsOn specifies a list of other profiles that this instance depends on.
	// A ClusterProfile can only depend on other ClusterProfiles, and a Profile can
	// only depend on other Profiles.
	// The add-ons and applications defined in this instance will not be deployed
	// until all add-ons and applications in the profiles listed as dependencies are deployed.
	DependsOn []string `json:"dependsOn,omitempty"`

	// TransitionFrom names the Profiles or ClusterProfiles this instance replaces.
	// For matching target clusters, teardown of the replaced profiles is deferred
	// until this instance reaches Provisioned. This instance is also permitted to
	// adopt resources owned by the replaced profiles, ignoring tier restrictions.
	// Same-kind only: a ClusterProfile names other ClusterProfiles, a Profile names
	// other Profiles in the same namespace.
	// +listType=atomic
	// +optional
	TransitionFrom []string `json:"transitionFrom,omitempty"`

	// PolicyRefs references all the ConfigMaps/Secrets/Flux Sources containing kubernetes resources
	// that need to be deployed in the matching managed clusters.
	// The values contained in those resources can be static or leverage Go templates for dynamic customization.
	// When expressed as templates, the values are filled in using information from
	// resources within the management cluster before deployment (Cluster and TemplateResourceRefs)
	// +listType=atomic
	// +optional
	PolicyRefs []PolicyRef `json:"policyRefs,omitempty"`

	// Helm charts is a list of helm charts that need to be deployed
	// +listType=atomic
	// +optional
	HelmCharts []HelmChart `json:"helmCharts,omitempty"`

	// Kustomization refs is a list of kustomization paths. Kustomization will
	// be run on those paths and the outcome will be deployed.
	// +listType=atomic
	// +optional
	KustomizationRefs []KustomizationRef `json:"kustomizationRefs,omitempty"`

	// PreDeployChecks is a slice of checks to run against the managed cluster
	// *before* Sveltos starts deploying resources.
	// Each check can use Lua scripts or CEL expressions to validate the cluster state.
	// If any check fails, the deployment of the associated feature is halted.
	// +listType=atomic
	// +optional
	PreDeployChecks []libsveltosv1beta1.ValidateHealth `json:"preDeployChecks,omitempty"`

	// ValidateHealths is a slice of checks to run against the managed cluster
	// *after* resources are deployed to validate that the state of the
	// add-ons/applications is healthy.
	// Each check can select resources and validate them using Lua scripts or CEL expressions.
	// +listType=atomic
	// +optional
	ValidateHealths []libsveltosv1beta1.ValidateHealth `json:"validateHealths,omitempty"`

	// HealthMonitoring, when enabled, continuously monitors the health of the resources
	// this profile deploys in each matching cluster. Unlike ValidateHealths, which are
	// evaluated once during deployment, these checks run for as long as the profile
	// is deployed. Results are available as HealthCheckReports.
	// +optional
	HealthMonitoring *HealthMonitoring `json:"healthMonitoring,omitempty"`

	// Define additional Kustomize inline Patches applied for all resources on this profile
	// Within the Patch Spec you can use templating
	// +listType=atomic
	// +optional
	Patches []libsveltosv1beta1.Patch `json:"patches,omitempty"`

	// PatchesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data,
	// it is possible to store additional Kustomize inline Patches applied for all resources on this profile
	// These values can be static or leverage Go templates for dynamic customization.
	// When expressed as templates, the values are filled in using information from
	// resources within the management cluster before deployment (Cluster and TemplateResourceRefs)
	// +listType=atomic
	// +optional
	PatchesFrom []ValueFrom `json:"patchesFrom,omitempty"`

	// DriftExclusions is a list of configuration drift exclusions to be applied when syncMode is
	// set to ContinuousWithDriftDetection. Each exclusion specifies JSON6902 paths to ignore
	// when evaluating drift, optionally targeting specific resources and features.
	// +listType=atomic
	// +optional
	DriftExclusions []libsveltosv1beta1.DriftExclusion `json:"driftExclusions,omitempty"`

	// The maximum number of consecutive deployment failures that Sveltos will permit.
	// After this many consecutive failures, the deployment will be considered failed, and Sveltos will stop retrying.
	// This setting applies only to feature deployments, not resource removal.
	// This field is optional. If not set, Sveltos default behavior is to keep retrying.
	// +optional
	MaxConsecutiveFailures *uint `json:"maxConsecutiveFailures,omitempty"`

	// PreDeleteChecks is a slice of checks to run against the managed cluster
	// *before* Sveltos starts deleting resources.
	// If any of these fail, the deletion process is halted.
	// Each check can select resources and validate them using Lua scripts or CEL expressions.
	// +listType=atomic
	// +optional
	PreDeleteChecks []libsveltosv1beta1.ValidateHealth `json:"preDeleteChecks,omitempty"`

	// PostDeleteChecks is a slice of checks to run against the managed cluster
	// *after* Sveltos has deleted all resources.
	// This ensures that the environment has reached the desired clean state.
	// Each check can select resources and validate them using Lua scripts or CEL expressions.
	// +listType=atomic
	// +optional
	PostDeleteChecks []libsveltosv1beta1.ValidateHealth `json:"postDeleteChecks,omitempty"`
}

func (*ProfileSpec) DeepCopy added in v1.2.0

func (in *ProfileSpec) DeepCopy() *ProfileSpec

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

func (*ProfileSpec) DeepCopyInto added in v1.2.0

func (in *ProfileSpec) DeepCopyInto(out *ProfileSpec)

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

type ProvenanceVerification added in v1.12.0

type ProvenanceVerification struct {
	// KeyringSecretRef references a Secret in the management cluster containing the GPG keyring.
	// The Secret must have a key named "keyring.gpg".
	// If Namespace is omitted, the cluster's namespace is used.
	KeyringSecretRef corev1.SecretReference `json:"keyringSecretRef"`
}

ProvenanceVerification configures Helm GPG .prov file verification for HTTP chart repositories.

func (*ProvenanceVerification) DeepCopy added in v1.12.0

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

func (*ProvenanceVerification) DeepCopyInto added in v1.12.0

func (in *ProvenanceVerification) DeepCopyInto(out *ProvenanceVerification)

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

type RegistryCredentialsConfig added in v0.38.2

type RegistryCredentialsConfig struct {
	// CredentialsSecretRef references a secret containing credentials
	// For ClusterProfile namespace can be left empty. In such a case, namespace will
	// be implicit set to cluster's namespace.
	// +optional
	CredentialsSecretRef *corev1.SecretReference `json:"credentials,omitempty"`

	// Key specifies the key within the CredentialsSecretRef containing the data
	// If not specified, it defaults to the only key in the secret if there's just one.
	// +optional
	Key string `json:"key,omitempty"`

	// CASecretRef references a secret containing the TLS CA certificate
	// For ClusterProfile namespace can be left empty. In such a case, namespace will
	// be implicit set to cluster's namespace.
	// key: ca.crt
	// +optional
	CASecretRef *corev1.SecretReference `json:"ca,omitempty"`

	// InsecureSkipTLSVerify controls server certificate verification.
	// +optional
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`

	// PlainHTTP indicates to use insecure HTTP connections for the chart download
	// +optional
	PlainHTTP bool `json:"plainHTTP,omitempty"`
}

func (*RegistryCredentialsConfig) DeepCopy added in v0.38.2

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

func (*RegistryCredentialsConfig) DeepCopyInto added in v0.38.2

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

type ReleaseReport

type ReleaseReport struct {
	// ReleaseName of the release deployed in the CAPI Cluster.
	// +kubebuilder:validation:MinLength=1
	ReleaseName string `json:"chartName"`

	// Namespace where release is deployed in the CAPI Cluster.
	// +kubebuilder:validation:MinLength=1
	ReleaseNamespace string `json:"releaseNamespace"`

	// ChartVersion is the version of the helm chart deployed
	// in the CAPI Cluster.
	ChartVersion string `json:"chartVersion"`

	// Action represent the type of operation on the Helm Chart
	// +kubebuilder:validation:Enum=No Action;Install;Upgrade;Delete;Conflict;Update Values
	// +optional
	Action string `json:"action,omitempty"`

	// Message is for any message that needs to added to better
	// explain the action.
	// +optional
	Message string `json:"message,omitempty"`
}

func (*ReleaseReport) DeepCopy

func (in *ReleaseReport) DeepCopy() *ReleaseReport

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

func (*ReleaseReport) DeepCopyInto

func (in *ReleaseReport) DeepCopyInto(out *ReleaseReport)

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

type RemoteKustomizeURL added in v1.13.0

type RemoteKustomizeURL struct {
	// URL is the remote source serving the Kustomize directory content.
	// Sveltos fetches the content on every reconciliation and redeploys if the
	// content hash has changed.
	// Supported schemes:
	//   "http://" or "https://" — HTTP/HTTPS endpoint serving a gzipped tarball
	//                             (.tar.gz) of the Kustomize directory
	//   "oci://"                — OCI registry artifact whose layers are extracted
	//                             the same way, preserving the directory tree
	// URL can be expressed as a template and instantiated using any cluster field,
	// so a single profile can fetch different content for each matching cluster,
	// e.g. "oci://registry.example/space/app-{{ .Cluster.metadata.name }}:latest".
	// +kubebuilder:validation:Pattern=`^(https?|oci)://`
	URL string `json:"url"`

	// Interval defines how often Sveltos re-fetches the source to detect changes.
	// Defaults to 5 minutes.
	// +optional
	Interval *metav1.Duration `json:"interval,omitempty"`

	// SecretRef references a Secret in the management cluster containing optional
	// credentials for fetching the source. Both Name and Namespace must be set,
	// allowing the Secret to live in any namespace (e.g. projectsveltos) so that
	// a single Secret can be shared across clusters without replication.
	// Supported Secret keys:
	//   "token"              — Bearer token (Authorization: Bearer <token>)
	//   "username"+"password" — HTTP Basic Auth or OCI registry basic auth
	//   "caFile"             — PEM-encoded CA certificate for TLS verification
	// +optional
	SecretRef *corev1.SecretReference `json:"secretRef,omitempty"`

	// InsecureSkipTLSVerify controls server certificate verification.
	// Ignored if the referenced SecretRef provides a "caFile".
	// +kubebuilder:default:=false
	// +optional
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`

	// PlainHTTP indicates to use insecure HTTP connections when URL uses the
	// "oci://" scheme. Ignored for "http://"/"https://" URLs.
	// +kubebuilder:default:=false
	// +optional
	PlainHTTP bool `json:"plainHTTP,omitempty"`
}

RemoteKustomizeURL groups all fields related to fetching a Kustomize directory from a remote source. Unlike PolicyRef's RemoteURL, which serves a single raw YAML/JSON document, the content here must preserve a directory tree, since kustomize build resolves files referenced by relative path (bases, resources, patches, generator files, and so on). Supports HTTP/HTTPS endpoints and OCI registries.

func (*RemoteKustomizeURL) DeepCopy added in v1.13.0

func (in *RemoteKustomizeURL) DeepCopy() *RemoteKustomizeURL

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

func (*RemoteKustomizeURL) DeepCopyInto added in v1.13.0

func (in *RemoteKustomizeURL) DeepCopyInto(out *RemoteKustomizeURL)

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

type RemoteURL added in v1.9.0

type RemoteURL struct {
	// URL is the remote source serving raw YAML/JSON content.
	// Sveltos fetches the content on every reconciliation and redeploys if the
	// content hash has changed.
	// Supported schemes:
	//   "http://" or "https://" — HTTP/HTTPS endpoint returning a raw YAML/JSON
	//                             document, a gzip-compressed document, an
	//                             uncompressed tar, or a gzip-compressed tar of
	//                             .yaml/.yml/.json files
	//   "oci://"                — OCI registry artifact whose layers are accepted
	//                             in the same shapes: raw YAML/JSON, gzip-compressed
	//                             YAML/JSON, uncompressed tar, or gzip-compressed tar
	// URL can be expressed as a template and instantiated using any cluster field,
	// so a single profile can fetch different content for each matching cluster,
	// e.g. "oci://registry.example/space/app-{{ .Cluster.metadata.name }}:latest".
	// +kubebuilder:validation:Pattern=`^(https?|oci)://`
	URL string `json:"url"`

	// Interval defines how often Sveltos re-fetches the source to detect changes.
	// Defaults to 5 minutes.
	// +optional
	Interval *metav1.Duration `json:"interval,omitempty"`

	// SecretRef references a Secret in the management cluster containing optional
	// credentials for fetching the source. Both Name and Namespace must be set,
	// allowing the Secret to live in any namespace (e.g. projectsveltos) so that
	// a single Secret can be shared across clusters without replication.
	// Supported Secret keys:
	//   "token"              — Bearer token (Authorization: Bearer <token>)
	//   "username"+"password" — HTTP Basic Auth or OCI registry basic auth
	//   "caFile"             — PEM-encoded CA certificate for TLS verification
	// +optional
	SecretRef *corev1.SecretReference `json:"secretRef,omitempty"`

	// Template indicates that the fetched content is a Go template that
	// must be instantiated using cluster fields and templateResourceRefs values
	// before deployment. Equivalent to the projectsveltos.io/template annotation
	// on a ConfigMap or Secret.
	// +optional
	Template bool `json:"template,omitempty"`

	// InsecureSkipTLSVerify controls server certificate verification.
	// Ignored if the referenced SecretRef provides a "caFile".
	// +kubebuilder:default:=false
	// +optional
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`

	// PlainHTTP indicates to use insecure HTTP connections when URL uses the
	// "oci://" scheme. Ignored for "http://"/"https://" URLs.
	// +kubebuilder:default:=false
	// +optional
	PlainHTTP bool `json:"plainHTTP,omitempty"`
}

RemoteURL groups all fields related to fetching policy content from a remote source. Supports HTTP/HTTPS endpoints and OCI registries.

func (*RemoteURL) DeepCopy added in v1.9.0

func (in *RemoteURL) DeepCopy() *RemoteURL

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

func (*RemoteURL) DeepCopyInto added in v1.9.0

func (in *RemoteURL) DeepCopyInto(out *RemoteURL)

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

type Spec

type Spec struct {
	// ClusterSelector identifies clusters to associate to.
	// +optional
	ClusterSelector libsveltosv1beta1.Selector `json:"clusterSelector,omitempty"`

	// ClusterRefs identifies clusters to associate to.
	// +optional
	ClusterRefs []corev1.ObjectReference `json:"clusterRefs,omitempty"`

	// SetRefs identifies referenced (cluster)Sets.
	// - ClusterProfile can reference ClusterSet;
	// - Profile can reference Set;
	// +optional
	SetRefs []string `json:"setRefs,omitempty"`

	// SyncMode specifies how features are synced in a matching workload cluster.
	// - OneTime means, first time a workload cluster matches the ClusterProfile,
	// features will be deployed in such cluster. Any subsequent feature configuration
	// change won't be applied into the matching workload clusters;
	// - Continuous mode ensures that the first time a workload cluster matches a ClusterProfile,
	// the specified features are deployed. Subsequent changes to the feature configuration are also
	// automatically applied to all matching workload clusters.
	// _ SyncModeContinuousWithDriftDetection operates similarly to Continuous mode, but also monitors
	// matching managed clusters for configuration drift. If drift is detected, a reconciliation is
	// triggered to ensure the managed cluster's configuration aligns with the ClusterProfile.
	// - DryRun means no change will be propagated to any matching cluster. A report
	// instead will be generated summarizing what would happen in any matching cluster
	// because of the changes made to ClusterProfile while in DryRun mode.
	// +kubebuilder:default:=Continuous
	// +optional
	SyncMode SyncMode `json:"syncMode,omitempty"`

	// Tier controls the order of deployment for ClusterProfile or Profile resources targeting
	// the same cluster resources.
	// Imagine two configurations (ClusterProfiles or Profiles) trying to deploy the same resource (a Kubernetes
	// resource or an helm chart). By default, the first one to reach the cluster "wins" and deploys it.
	// Tier allows you to override this. When conflicts arise, the ClusterProfile or Profile with the **lowest**
	// Tier value takes priority and deploys the resource.
	// Higher Tier values represent lower priority. The default Tier value is 100.
	// Using Tiers provides finer control over resource deployment within your cluster, particularly useful
	// when multiple configurations manage the same resources.
	// +kubebuilder:default:=100
	// +kubebuilder:validation:Minimum=1
	// +optional
	Tier int32 `json:"tier,omitempty"`

	// By default (when ContinueOnConflict is unset or set to false), Sveltos stops deployment after
	// encountering the first conflict (e.g., another ClusterProfile already deployed the resource).
	// If set to true, Sveltos will attempt to deploy remaining resources in the ClusterProfile even
	// if conflicts are detected for previous resources.
	// +kubebuilder:default:=false
	// +optional
	ContinueOnConflict bool `json:"continueOnConflict,omitempty"`

	// By default (when ContinueOnError is unset or set to false), Sveltos stops deployment after
	// encountering the first error.
	// If set to true, Sveltos will attempt to deploy remaining resources in the ClusterProfile even
	// if errors are detected for previous resources.
	// +kubebuilder:default:=false
	// +optional
	ContinueOnError bool `json:"continueOnError,omitempty"`

	// The maximum number of clusters that can be updated concurrently.
	// Value can be an absolute number (ex: 5) or a percentage of desired cluster (ex: 10%).
	// Defaults to 100%.
	// Example: when this is set to 30%, when list of add-ons/applications in ClusterProfile
	// changes, only 30% of matching clusters will be updated in parallel. Only when updates
	// in those cluster succeed, other matching clusters are updated.
	// +kubebuilder:validation:XIntOrString
	// +kubebuilder:validation:Pattern="^((100|[0-9]{1,2})%|[0-9]+)$"
	// +optional
	MaxUpdate *intstr.IntOrString `json:"maxUpdate,omitempty"`

	// StopMatchingBehavior indicates what behavior should be when a Cluster stop matching
	// the ClusterProfile. By default all deployed Helm charts and Kubernetes resources will
	// be withdrawn from Cluster. Setting StopMatchingBehavior to LeavePolicies will instead
	// leave ClusterProfile deployed policies in the Cluster.
	// +kubebuilder:default:=WithdrawPolicies
	// +optional
	StopMatchingBehavior StopMatchingBehavior `json:"stopMatchingBehavior,omitempty"`

	// Reloader indicates whether Deployment/StatefulSet/DaemonSet instances deployed
	// by Sveltos and part of this ClusterProfile need to be restarted via rolling upgrade
	// when a ConfigMap/Secret instance mounted as volume is modified.
	// When set to true, when any mounted ConfigMap/Secret is modified, Sveltos automatically
	// starts a rolling upgrade for Deployment/StatefulSet/DaemonSet instances mounting it.
	// +kubebuilder:default:=false
	// +optional
	Reloader bool `json:"reloader,omitempty"`

	// TemplateResourceRefs is a list of resource to collect from the management cluster.
	// Those resources' values will be used to instantiate templates
	// +patchMergeKey=identifier
	// +patchStrategy=merge,retainKeys
	// +listType=map
	// +listMapKey=identifier
	// +optional
	TemplateResourceRefs []TemplateResourceRef `json:"templateResourceRefs,omitempty" patchStrategy:"merge" patchMergeKey:"identifier"`

	// DependsOn specifies a list of other profiles that this instance depends on.
	// A ClusterProfile can only depend on other ClusterProfiles, and a Profile can
	// only depend on other Profiles.
	// The add-ons and applications defined in this instance will not be deployed
	// until all add-ons and applications in the profiles listed as dependencies are deployed.
	DependsOn []string `json:"dependsOn,omitempty"`

	// TransitionFrom names the Profiles or ClusterProfiles this instance replaces.
	// For matching target clusters, teardown of the replaced profiles is deferred
	// until this instance reaches Provisioned. This instance is also permitted to
	// adopt resources owned by the replaced profiles, ignoring tier restrictions.
	// Same-kind only: a ClusterProfile names other ClusterProfiles, a Profile names
	// other Profiles in the same namespace.
	// +listType=atomic
	// +optional
	TransitionFrom []string `json:"transitionFrom,omitempty"`

	// PolicyRefs references all the ConfigMaps/Secrets/Flux Sources containing kubernetes resources
	// that need to be deployed in the matching managed clusters.
	// The values contained in those resources can be static or leverage Go templates for dynamic customization.
	// When expressed as templates, the values are filled in using information from
	// resources within the management cluster before deployment (Cluster and TemplateResourceRefs)
	// +listType=atomic
	// +optional
	PolicyRefs []PolicyRef `json:"policyRefs,omitempty"`

	// Helm charts is a list of helm charts that need to be deployed
	// +listType=atomic
	// +optional
	HelmCharts []HelmChart `json:"helmCharts,omitempty"`

	// Kustomization refs is a list of kustomization paths. Kustomization will
	// be run on those paths and the outcome will be deployed.
	// +listType=atomic
	// +optional
	KustomizationRefs []KustomizationRef `json:"kustomizationRefs,omitempty"`

	// PreDeployChecks is a slice of checks to run against the managed cluster
	// *before* Sveltos starts deploying resources.
	// Each check can use Lua scripts or CEL expressions to validate the cluster state.
	// If any check fails, the deployment of the associated feature is halted.
	// +listType=atomic
	// +optional
	PreDeployChecks []libsveltosv1beta1.ValidateHealth `json:"preDeployChecks,omitempty"`

	// ValidateHealths is a slice of checks to run against the managed cluster
	// *after* resources are deployed to validate that the state of the
	// add-ons/applications is healthy.
	// Each check can select resources and validate them using Lua scripts or CEL expressions.
	// +listType=atomic
	// +optional
	ValidateHealths []libsveltosv1beta1.ValidateHealth `json:"validateHealths,omitempty"`

	// HealthMonitoring, when enabled, continuously monitors the health of the resources
	// this profile deploys in each matching cluster. Unlike ValidateHealths, which are
	// evaluated once during deployment, these checks run for as long as the profile
	// is deployed. Results are available as HealthCheckReports.
	// +optional
	HealthMonitoring *HealthMonitoring `json:"healthMonitoring,omitempty"`

	// Define additional Kustomize inline Patches applied for all resources on this profile
	// Within the Patch Spec you can use templating
	// +listType=atomic
	// +optional
	Patches []libsveltosv1beta1.Patch `json:"patches,omitempty"`

	// PatchesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data,
	// it is possible to store additional Kustomize inline Patches applied for all resources on this profile
	// These values can be static or leverage Go templates for dynamic customization.
	// When expressed as templates, the values are filled in using information from
	// resources within the management cluster before deployment (Cluster and TemplateResourceRefs)
	// +listType=atomic
	// +optional
	PatchesFrom []ValueFrom `json:"patchesFrom,omitempty"`

	// DriftExclusions is a list of configuration drift exclusions to be applied when syncMode is
	// set to ContinuousWithDriftDetection. Each exclusion specifies JSON6902 paths to ignore
	// when evaluating drift, optionally targeting specific resources and features.
	// +listType=atomic
	// +optional
	DriftExclusions []libsveltosv1beta1.DriftExclusion `json:"driftExclusions,omitempty"`

	// The maximum number of consecutive deployment failures that Sveltos will permit.
	// After this many consecutive failures, the deployment will be considered failed, and Sveltos will stop retrying.
	// This setting applies only to feature deployments, not resource removal.
	// This field is optional. If not set, Sveltos default behavior is to keep retrying.
	// +optional
	MaxConsecutiveFailures *uint `json:"maxConsecutiveFailures,omitempty"`

	// PreDeleteChecks is a slice of checks to run against the managed cluster
	// *before* Sveltos starts deleting resources.
	// If any of these fail, the deletion process is halted.
	// Each check can select resources and validate them using Lua scripts or CEL expressions.
	// +listType=atomic
	// +optional
	PreDeleteChecks []libsveltosv1beta1.ValidateHealth `json:"preDeleteChecks,omitempty"`

	// PostDeleteChecks is a slice of checks to run against the managed cluster
	// *after* Sveltos has deleted all resources.
	// This ensures that the environment has reached the desired clean state.
	// Each check can select resources and validate them using Lua scripts or CEL expressions.
	// +listType=atomic
	// +optional
	PostDeleteChecks []libsveltosv1beta1.ValidateHealth `json:"postDeleteChecks,omitempty"`

	// ExtraLabels: These labels will be added by Sveltos to all Kubernetes resources deployed in
	// a managed cluster based on this ClusterProfile/Profile instance.
	// **Important:** If a resource deployed by Sveltos already has a label with a key present in
	// `ExtraLabels`, the value from `ExtraLabels` will override the existing value.
	// (Deprecated use Patches instead)
	// +optional
	ExtraLabels map[string]string `json:"extraLabels,omitempty"`

	// ExtraAnnotations: These annotations will be added by Sveltos to all Kubernetes resources
	// deployed in a managed cluster based on this ClusterProfile/Profile instance.
	// **Important:** If a resource deployed by Sveltos already has a annotation with a key present in
	// `ExtraAnnotations`, the value from `ExtraAnnotations` will override the existing value.
	// (Deprecated use Patches instead)
	// +optional
	ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"`
}

func (*Spec) DeepCopy

func (in *Spec) DeepCopy() *Spec

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

func (*Spec) DeepCopyInto

func (in *Spec) DeepCopyInto(out *Spec)

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

type Stage added in v1.2.0

type Stage struct {
	// Name of the stage, e.g., "qa", "staging", "production".
	Name string `json:"name"`

	// ClusterSelector specifies which clusters this stage's resources will be deployed to.
	ClusterSelector libsveltosv1beta1.Selector `json:"clusterSelector,omitempty"`

	// Trigger for promoting to the next stage in the pipeline.
	// This field is only applicable to stages that are not the last stage.
	// +optional
	Trigger *Trigger `json:"trigger,omitempty"`
}

Stage defines a single step in the promotion pipeline

func (*Stage) DeepCopy added in v1.2.0

func (in *Stage) DeepCopy() *Stage

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

func (*Stage) DeepCopyInto added in v1.2.0

func (in *Stage) DeepCopyInto(out *Stage)

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

type StageStatus added in v1.2.0

type StageStatus struct {
	// Name of the stage, e.g., "qa", "staging", "production".
	Name string `json:"name"`

	// LastUpdateReconciledTime is the time the ClusterPromotion controller most recently
	// created or updated the corresponding ClusterProfile resource for this stage.
	// This indicates when the desired state was last applied to the system.
	// +optional
	LastUpdateReconciledTime *metav1.Time `json:"lastUpdateReconciledTime,omitempty"`

	// LastSuccessfulAppliedTime is the time this stage was fully and successfully deployed.
	// This means all clusters matching the stage have reported a 'Provisioned' status.
	// +optional
	LastSuccessfulAppliedTime *metav1.Time `json:"lastSuccessfulAppliedTime,omitempty"`

	// LastStatusCheckTime is the time the ClusterPromotion controller last checked the
	// statuses of the matching clusters and their provisioned state.
	// This is updated frequently while waiting for provisioning to complete.
	// +optional
	LastStatusCheckTime *metav1.Time `json:"lastStatusCheckTime,omitempty"`

	// FailureMessage reports a detailed error message if a failure occurred.
	// +optional
	FailureMessage *string `json:"failureMessage,omitempty"`

	// CurrentStatusDescription provides a high-level description of where the stage is
	// in its progression (e.g., "Waiting for cluster profiles to be created",
	// "Waiting for all clusters to be Provisioned", "Running post-deployment health checks").
	// This helps users understand the current blocking state.
	// +optional
	CurrentStatusDescription *string `json:"currentStatusDescription,omitempty"`
}

StageStatus defines the status for a given stage in a progressive deployment.

func (*StageStatus) DeepCopy added in v1.2.0

func (in *StageStatus) DeepCopy() *StageStatus

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

func (*StageStatus) DeepCopyInto added in v1.2.0

func (in *StageStatus) DeepCopyInto(out *StageStatus)

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

type Status

type Status struct {
	// MatchingClusterRefs reference all the clusters currently matching
	// ClusterProfile ClusterSelector
	// +optional
	MatchingClusterRefs []corev1.ObjectReference `json:"matchingClusters,omitempty"`

	// UpdatingClusters reference all the cluster currently matching
	// ClusterProfile ClusterSelector and being updated
	// +optional
	UpdatingClusters Clusters `json:"updatingClusters,omitempty"`

	// UpdatedClusters contains information all the cluster currently matching
	// ClusterProfile ClusterSelector and already updated to latest ClusterProfile
	// Spec
	// +optional
	UpdatedClusters Clusters `json:"updatedClusters,omitempty"`

	// FailedClusters contains information about clusters for which
	// a ClusterSummary could not be created or updated.
	// +optional
	FailedClusters []FailedCluster `json:"failedClusters,omitempty"`

	// DependenciesHash is a hash representing the set of clusters where this ClusterProfile
	// must be deployed, based on the combined configuration of its dependencies.
	DependenciesHash []byte `json:"dependenciesHash,omitempty"`

	// ReconciliationSuspended indicates whether the reconciliation loop for this
	// ClusterSummary is currently paused due to an external action (e.g., a user annotation).
	// When true, the status will not be updated unless the pause is lifted.
	// +optional
	ReconciliationSuspended bool `json:"reconciliationSuspended,omitempty"`

	// SuspensionReason provides a brief explanation of why the reconciliation is suspended.
	// +optional
	SuspensionReason *string `json:"suspensionReason,omitempty"`
}

Status defines the observed state of ClusterProfile/Profile

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

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

type StopMatchingBehavior

type StopMatchingBehavior string

StopMatchingBehavior indicates what will happen when Cluster stops matching a ClusterProfile. By default, withdrawpolicies, deployed Helm charts and Kubernetes resources will be removed from Cluster. LeavePolicy instead leaves Helm charts and Kubernetes policies in the Cluster. +kubebuilder:validation:Enum:=WithdrawPolicies;LeavePolicies

const (
	WithdrawPolicies StopMatchingBehavior = "WithdrawPolicies"
	LeavePolicies    StopMatchingBehavior = "LeavePolicies"
)

Define the StopMatchingBehavior constants.

type SyncMode

type SyncMode string

SyncMode specifies how features are synced in a workload cluster. +kubebuilder:validation:Enum:=OneTime;Continuous;ContinuousWithDriftDetection;DryRun

type TemplateInstantiationError added in v1.2.0

type TemplateInstantiationError struct {
	Message string
}

func (*TemplateInstantiationError) DeepCopy added in v1.2.0

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

func (*TemplateInstantiationError) DeepCopyInto added in v1.2.0

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

func (*TemplateInstantiationError) Error added in v1.2.0

type TemplateResourceRef

type TemplateResourceRef struct {
	// Resource references a Kubernetes instance in the management
	// cluster to fetch and use during template instantiation.
	// For ClusterProfile namespace can be left empty. In such a case, namespace will
	// be implicit set to cluster's namespace.
	// Name and namespace can be expressed as a template and instantiate using any cluster field.
	Resource corev1.ObjectReference `json:"resource"`

	// Identifier is how the resource will be referred to in the
	// template
	Identifier string `json:"identifier"`

	// Optional indicates that the referenced resource is not mandatory.
	// If set to true and the resource is not found, the error will be ignored,
	// and Sveltos will continue processing other TemplateResourceRefs.
	// +kubebuilder:default:=false
	// +optional
	Optional bool `json:"optional,omitempty"`

	// IgnoreStatusChanges indicates whether changes to the status of the referenced
	// resource should be ignored. If set to true, only changes to the spec or
	// metadata (generation change) will trigger a reconciliation.
	// +kubebuilder:default:=false
	// +optional
	IgnoreStatusChanges bool `json:"ignoreStatusChanges,omitempty"`

	// WatchFields is an optional list of dot-separated field paths to include
	// when computing the hash for this resource (e.g. "status.readyReplicas",
	// "metadata.labels"). When non-empty, only the listed fields are hashed and
	// IgnoreStatusChanges is ignored. Use this when you need to react to a
	// specific field without being sensitive to every other change on the object.
	// +optional
	WatchFields []string `json:"watchFields,omitempty"`
}

func (*TemplateResourceRef) DeepCopy

func (in *TemplateResourceRef) DeepCopy() *TemplateResourceRef

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

func (*TemplateResourceRef) DeepCopyInto

func (in *TemplateResourceRef) DeepCopyInto(out *TemplateResourceRef)

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

type TimeWindow added in v1.2.0

type TimeWindow struct {
	// From is a cron expression defining the recurring time(s) when the promotion
	// window opens. The promotion will be blocked until the time defined by 'From'
	// is reached.
	// +kubebuilder:validation:MinLength=1
	From string `json:"from"`

	// To is a cron expression defining the recurring time(s) when the promotion
	// window closes. If the promotion process is not complete when 'To' is reached,
	// the controller should pause and wait for the next 'From' time.
	// +kubebuilder:validation:MinLength=1
	To string `json:"to"`
}

TimeWindow defines a recurring time range when an operation is permitted. The time range is defined using cron expressions for the start and end of the window.

func (*TimeWindow) DeepCopy added in v1.2.0

func (in *TimeWindow) DeepCopy() *TimeWindow

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

func (*TimeWindow) DeepCopyInto added in v1.2.0

func (in *TimeWindow) DeepCopyInto(out *TimeWindow)

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

type Trigger added in v1.2.0

type Trigger struct {
	// Manual is a manual trigger. When set, promotion requires a human signal.
	// +optional
	Manual *ManualTrigger `json:"manual,omitempty"`

	// Auto is an automatic trigger. When set, promotion occurs automatically
	// based on defined conditions.
	// +optional
	Auto *AutoTrigger `json:"auto,omitempty"`
}

Trigger defines the condition for promotion to the next stage. A Trigger can be either manual or automatic, but not both. +kubebuilder:validation:XValidation:rule="has(self.manual) != has(self.auto)",message="A trigger must have either a 'manual' or 'auto' field, but not both."

func (*Trigger) DeepCopy added in v1.2.0

func (in *Trigger) DeepCopy() *Trigger

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

func (*Trigger) DeepCopyInto added in v1.2.0

func (in *Trigger) DeepCopyInto(out *Trigger)

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

type ValueFrom

type ValueFrom struct {
	// Namespace of the referenced resource.
	// For ClusterProfile namespace can be left empty. In such a case, namespace will
	// be implicit set to cluster's namespace.
	// For Profile namespace must be left empty. The Profile namespace will be used.
	// Namespace can be expressed as a template and instantiate using any cluster field.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Name of the referenced resource.
	// Name can be expressed as a template and instantiate using any cluster field.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// Kind of the resource. Supported kinds are:
	// - ConfigMap/Secret
	// +kubebuilder:validation:Enum=ConfigMap;Secret
	Kind string `json:"kind"`

	// Optional indicates that the referenced resource is not mandatory.
	// If set to true and the resource is not found, the error will be ignored,
	// and Sveltos will continue processing other ValueFroms.
	// +kubebuilder:default:=false
	// +optional
	Optional bool `json:"optional,omitempty"`
}

func (*ValueFrom) DeepCopy

func (in *ValueFrom) DeepCopy() *ValueFrom

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

func (*ValueFrom) DeepCopyInto

func (in *ValueFrom) DeepCopyInto(out *ValueFrom)

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

type WaitForProfileProcessingError added in v1.10.0

type WaitForProfileProcessingError struct {
	Message string
}

WaitForProfileProcessingError is returned when a ClusterSummary cannot yet uninstall a Helm chart because another ClusterProfile/Profile that currently matches the cluster has not finished processing its charts via the chart manager. The caller should requeue and retry.

func (*WaitForProfileProcessingError) DeepCopy added in v1.10.0

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

func (*WaitForProfileProcessingError) DeepCopyInto added in v1.10.0

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

func (*WaitForProfileProcessingError) Error added in v1.10.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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