Documentation
¶
Index ¶
- Constants
- func Backup(ctx context.Context, c client.Client, log *zap.Logger, ...) (err error)
- func Cleanup(ctx context.Context, c client.Client, ...) (completedCleanup bool, err error)
- func GetPreservedResourceCounts(ctx context.Context, c client.Client, log *zap.Logger, ...) (clusterIDCount, otherCount int, err error)
- func GetRestoredResourceCounts(ctx context.Context, c client.Client, log *zap.Logger, ...) (clusterIDCount, otherCount int, err error)
- func Restore(ctx context.Context, c client.Client, log *zap.Logger, ...) (err error)
Constants ¶
View Source
const (
// InternalPreservationLabelKey is used to mark resources that are required internally
// for ClusterInstance operations and should not be deleted during preservation or restoration.
InternalPreservationLabelKey = v1alpha1.PreservationLabelKey + ".internal"
// InternalPreservationLabelValue represents the label value used for identifying
// internally required ClusterInstance resources.
InternalPreservationLabelValue = "cluster-instance-required-resource"
// PreservationModeInternal is a special preservation mode (for internal use only)
// that indicates resources essential for ClusterInstance operations will be preserved.
PreservationModeInternal v1alpha1.PreservationMode = "Internal"
)
View Source
const (
// ClusterIdentityDataAnnotationKey stores cluster identity data for preserved resources.
ClusterIdentityDataAnnotationKey = preservedDataLabelKey + ".cluster-identity"
// RestoredAtAnnotationKey indicates when a resource was restored.
RestoredAtAnnotationKey = v1alpha1.PreservationLabelKey + ".restored-at"
)
Variables ¶
This section is empty.
Functions ¶
func Backup ¶
func Backup(
ctx context.Context,
c client.Client,
log *zap.Logger,
clusterInstance *v1alpha1.ClusterInstance,
) (err error)
Backup preserves ConfigMaps and Secrets based on the specified preservation mode. The outcome of each backup is logged and any errors encountered are aggregated.
func Cleanup ¶
func Cleanup(
ctx context.Context,
c client.Client,
deletionHandler *deletion.DeletionHandler,
log *zap.Logger,
clusterInstance *v1alpha1.ClusterInstance,
) (completedCleanup bool, err error)
Cleanup deletes preserved ConfigMaps and Secrets. The outcome of each deletion is logged and any errors encountered are aggregated.
func GetPreservedResourceCounts ¶
func GetPreservedResourceCounts(
ctx context.Context,
c client.Client,
log *zap.Logger,
clusterInstance *v1alpha1.ClusterInstance,
) (clusterIDCount, otherCount int, err error)
func GetRestoredResourceCounts ¶
func GetRestoredResourceCounts(
ctx context.Context,
c client.Client,
log *zap.Logger,
clusterInstance *v1alpha1.ClusterInstance,
) (clusterIDCount, otherCount int, err error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.