Documentation
¶
Index ¶
- func RunAdminProjectDisoceryWorkflow(cloudName string, timeoutSeconds int, ...) error
- func RunKubeOperatorWorkflow(namespace string, cloudName string, timeoutSeconds int, ...) error
- func RunProjectSnapshotExpiryWorkflow(cloudName string, timeoutSeconds int, logLevel string, now time.Time, ...) error
- func RunProjectSnapshotWorkflow(cloudName string, timeoutSeconds int, ...) error
- func SetupLogger(level string, cloudName string) *slog.Logger
- func SubscribeVolumeDaily(cloudName, logLevel, volID string, enabled bool, retention int, ...) error
- func SubscribeVolumeExpress(cloudName, logLevel, volID string, enabled bool, retention int, tz string, ...) error
- func SubscribeVolumeMonthly(cloudName, logLevel, volID string, enabled bool, retention int, ...) error
- func SubscribeVolumeWeekly(cloudName, logLevel, volID string, enabled bool, retention int, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunAdminProjectDisoceryWorkflow ¶
func RunAdminProjectDisoceryWorkflow(cloudName string, timeoutSeconds int, notificationTargets []notifications.NotificationTarget, logLevel string) error
func RunKubeOperatorWorkflow ¶
func RunKubeOperatorWorkflow( namespace string, cloudName string, timeoutSeconds int, notificationTargets []notifications.NotificationTarget, logLevel string, kubeconfig string, incluster bool, requestsCPU string, requestsMem string, limitsCPU string, limitsMem string, snapsentryImage string, ) error
RunKubeOperatorWorkflow orchestrates the deployment of Snapsentry agents across multiple OpenStack projects.
It performs a discovery phase to identify subscribed projects, checks for existing Kubernetes deployments, and for any missing deployments, it automates:
- The creation of specialized OpenStack service users.
- The generation of a clouds.yaml configuration stored as a Kubernetes Secret.
- The rollout of a Snapsentry Deployment in the specified K8s namespace.
Returns an error if the initial OpenStack connection or Kubernetes configuration fails, but continues processing other projects if a single project deployment fails.
func RunProjectSnapshotExpiryWorkflow ¶
func RunProjectSnapshotExpiryWorkflow(cloudName string, timeoutSeconds int, logLevel string, now time.Time, notifier *notifications.NotificationManager) error
RunProjectSnapshotExpiryWorkflow executes the retention enforcement process for a tenant.
Responsibilities:
- Discovery: Retrieves *all* snapshots in the project that bear the SnapSentry management tag. This is a "Sweep" operation, independent of the source volumes (which might have been deleted).
- Evaluation: Checks the `ExpiryDate` metadata on each snapshot against the current reference time.
- cleanup: Permanently deletes snapshots that have exceeded their retention period.
Parameters:
- now: The reference time for expiry (usually time.Now(), but injected for deterministic testing. UTC).
func RunProjectSnapshotWorkflow ¶
func RunProjectSnapshotWorkflow(cloudName string, timeoutSeconds int, notifier *notifications.NotificationManager, logLevel string) error
func SetupLogger ¶
setupLogger configures the application-wide logger. It uses "tint" for colorized, structured logging that is easy to read in terminals.
func SubscribeVolumeDaily ¶
func SubscribeVolumeDaily(cloudName, logLevel, volID string, enabled bool, retention int, start, tz string) error
SubscribeVolumeDaily configures the Daily policy on a volume.
func SubscribeVolumeExpress ¶
func SubscribeVolumeExpress(cloudName, logLevel, volID string, enabled bool, retention int, tz string, interval int) error
SubscribeVolumeDaily configures the Daily policy on a volume.
Types ¶
This section is empty.