clusterops

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ClusterSummaryLabelName is added to each policy deployed by a ClusterSummary
	// instance to a CAPI Cluster
	ClusterSummaryLabelName = "projectsveltos.io/cluster-summary-name"

	// ClusterProfileLabelName is added to all ClusterSummary instances created
	// by a ClusterProfile instance
	ClusterProfileLabelName = "projectsveltos.io/cluster-profile-name"

	// ProfileLabelName is added to all ClusterSummary instances created
	// by a Profile instance
	ProfileLabelName = "projectsveltos.io/profile-name"
)

Variables

This section is empty.

Functions

func ConvertHelmResourcesToObjectReference

func ConvertHelmResourcesToObjectReference(helmResources []libsveltosv1beta1.HelmResources,
) []corev1.ObjectReference

ConvertHelmResourcesToObjectReference converts a slice of HelmResources to a slice of ObjectReference

func ConvertResourceReportsToObjectReference

func ConvertResourceReportsToObjectReference(resourceReports []libsveltosv1beta1.ResourceReport,
) []corev1.ObjectReference

ConvertResourceReportsToObjectReference converts a slice of ResourceReports to a slice of ObjectReference

func GetClusterReportName

func GetClusterReportName(profileKind, profileName, clusterName string, clusterType libsveltosv1beta1.ClusterType) string

func GetClusterSummary

func GetClusterSummary(ctx context.Context, c client.Client,
	profileKind, profileName string, clusterNamespace, clusterName string,
	clusterType libsveltosv1beta1.ClusterType) (*configv1beta1.ClusterSummary, error)

GetClusterSummary returns the ClusterSummary instance created by a specific ClusterProfile/Profile for a specific Cluster

func GetClusterSummaryName

func GetClusterSummaryName(profileKind, profileName, clusterName string, isSveltosCluster bool) string

GetClusterSummaryName returns the ClusterSummary name given a ClusterProfile/Profile kind/name and cluster type/Name.

func GetPrefix

func GetPrefix(clusterType libsveltosv1beta1.ClusterType) string

func GetResourceSummaryNameInManagedCluster

func GetResourceSummaryNameInManagedCluster(clusterSummaryNamespace, clusterSummaryName string) string

func GetResourceSummaryNameInManagemntCluster

func GetResourceSummaryNameInManagemntCluster(clusterSummaryName string) string

func GetResourceSummaryNamespaceInManagedCluster

func GetResourceSummaryNamespaceInManagedCluster() string

func IsReloaderInstalled

func IsReloaderInstalled(ctx context.Context, c client.Client) (bool, error)

IsReloaderInstalled returns true if Reloader CRD is installed, false otherwise

func UpdateClusterConfiguration

func UpdateClusterConfiguration(ctx context.Context, c client.Client, isDryRun, clean bool,
	clusterNamespace, clusterName string, clusterType libsveltosv1beta1.ClusterType,
	profileRef *corev1.ObjectReference, featureID libsveltosv1beta1.FeatureID,
	policyDeployed []configv1beta1.DeployedResource, chartDeployed []configv1beta1.Chart) error

No action in DryRun mode.

func UpdateClusterReportWithResourceReports

func UpdateClusterReportWithResourceReports(ctx context.Context, c client.Client,
	clusterNamespace, clusterName string, clusterType libsveltosv1beta1.ClusterType, isDryRun bool,
	profileRef *corev1.ObjectReference, resourceReports []libsveltosv1beta1.ResourceReport,
	featureID libsveltosv1beta1.FeatureID) error

UpdateClusterReportWithResourceReports updates ClusterReport Status with ResourceReports. This is no-op unless mode is DryRun

func UpdateReloaderWithDeployedResources

func UpdateReloaderWithDeployedResources(ctx context.Context, reloaderClient client.Client,
	profileRef *corev1.ObjectReference, feature libsveltosv1beta1.FeatureID,
	resources []corev1.ObjectReference, removeReloader bool,
	logger logr.Logger) error

UpdateReloaderWithDeployedResources updates corresponding Reloader instance in the managed cluster. Reload indicates whether reloader instance needs to be removed, which can happen because ClusterSummary is being deleted or ClusterProfile.Spec.Reloader is set to false.

func ValidateHealthPolicies

func ValidateHealthPolicies(ctx context.Context, remoteConfig *rest.Config, validateHealths []libsveltosv1beta1.ValidateHealth,
	featureID libsveltosv1beta1.FeatureID, logger logr.Logger) error

ValidateHealthPolicies runs all validateDeployment checks registered for the feature (Helm/Kustomize/Resources)

Types

This section is empty.

Jump to

Keyboard shortcuts

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