Documentation
¶
Index ¶
- Constants
- func DeleteDriftDetectionVersion(ctx context.Context, c client.Client, ...) error
- func DeleteSveltosAgentVersion(ctx context.Context, c client.Client, ...) error
- func IsDriftDetectionVersionCompatible(ctx context.Context, c client.Client, ...) bool
- func IsSveltosAgentVersionCompatible(ctx context.Context, c client.Client, ...) bool
- func StoreDriftDetectionVersion(ctx context.Context, c client.Client, ...) error
- func StoreSveltosAgentVersion(ctx context.Context, c client.Client, ...) error
Constants ¶
const ( ClusterNameLabel = "version.projectsveltos.io/clustername" ClusterTypeLabel = "version.projectsveltos.io/clustertype" )
Following labels are added to any object created by Sveltos that needs to be processed or it is generated by Sveltos agents (ResourceSummary, Classifier, ClassifierReport,...) including the ConfigMaps used for compatibility checks.
Variables ¶
This section is empty.
Functions ¶
func DeleteDriftDetectionVersion ¶ added in v1.15.0
func DeleteDriftDetectionVersion(ctx context.Context, c client.Client, sveltosNamespace, clusterNamespace, clusterName string, clusterType libsveltosv1beta1.ClusterType, isAgentInMgmtMode bool, logger logr.Logger) error
DeleteDriftDetectionVersion deletes the ConfigMap that stores the drift-detection-manager version, if present. It is a no-op if the ConfigMap does not exist. See StoreDriftDetectionVersion for how the ConfigMap identity is derived.
func DeleteSveltosAgentVersion ¶ added in v1.15.0
func DeleteSveltosAgentVersion(ctx context.Context, c client.Client, sveltosNamespace, clusterNamespace, clusterName string, clusterType libsveltosv1beta1.ClusterType, isAgentInMgmtMode bool, logger logr.Logger) error
DeleteSveltosAgentVersion deletes the ConfigMap that stores the Sveltos-agent version, if present. It is a no-op if the ConfigMap does not exist. See StoreSveltosAgentVersion for how the ConfigMap identity is derived.
func StoreDriftDetectionVersion ¶
func StoreDriftDetectionVersion(ctx context.Context, c client.Client, sveltosNamespace, version, clusterNamespace, clusterName string, clusterType libsveltosv1beta1.ClusterType, isAgentInMgmtMode bool, logger logr.Logger) error
StoreDriftDetectionVersion stores the provided drift-detection-manager version in a ConfigMap. It takes three arguments:
- ctx (context.Context): Context for the function call
- c (client.Client): Kubernetes client used to interact with the API server
- clusterNamespace, clusterName, clusterType identify the managed cluster
- version (string): Version to compare against the sveltos-agent version
- isAgentInMgmtMode indicates whether agents are in the management cluster (true) or managed clusters (false)
func StoreSveltosAgentVersion ¶
func StoreSveltosAgentVersion(ctx context.Context, c client.Client, sveltosNamespace, version, clusterNamespace, clusterName string, clusterType libsveltosv1beta1.ClusterType, isAgentInMgmtMode bool, logger logr.Logger) error
StoreSveltosAgentVersion stores the provided Sveltos-agent version in a ConfigMap. It takes three arguments:
- ctx (context.Context): Context for the function call
- c (client.Client): Kubernetes client used to interact with the API server
- clusterNamespace, clusterName, clusterType identify the managed cluster
- version (string): Version to compare against the sveltos-agent version
- isAgentInMgmtMode indicates whether agents are in the management cluster (true) or managed clusters (false)
Types ¶
This section is empty.