Skip to content

feat: add tags and use ephemeral volumes for snapshot archives#183

Merged
Christos Vontas (cv711) merged 7 commits intomainfrom
feat/snapshot-tags
Mar 16, 2026
Merged

feat: add tags and use ephemeral volumes for snapshot archives#183
Christos Vontas (cv711) merged 7 commits intomainfrom
feat/snapshot-tags

Conversation

@cv711
Copy link
Copy Markdown
Contributor

@cv711 Christos Vontas (cv711) commented Mar 11, 2026

This pull request introduces support for attaching labels to snapshots, allowing metadata to be passed from Kubernetes jobs through the CLI and ultimately stored in S3 as object tags. The implementation ensures consistent label ordering to avoid unnecessary job restarts and propagates labels throughout the snapshot creation and upload process.

Label support and propagation:

  • Added a --label CLI flag to cmd/snapshot/snapshot.go for specifying snapshot labels, and implemented parsing of label strings into a map for use in the snapshot context. [1] [2]
  • Modified internal/job/snapshot.go to pass labels from Kubernetes job metadata as CLI arguments, ensuring consistent ordering by sorting label keys.
  • Extended the SnapshotContext struct to include a Labels field for label propagation throughout the snapshot process.

S3 upload enhancements:

  • Updated the S3 upload logic in internal/snapshot/s3.go to accept the full snapshot context and attach user-specified labels as S3 object tags, along with a default object-type tag. [1] [2]
  • Adjusted the archive upload call in internal/snapshot/archive.go to pass the snapshot context instead of just the backup file URL.

Job configuration improvements:

  • Set a TTL for finished Kubernetes jobs to 60 seconds, ensuring cleanup after completion.

Dependency and import updates:

  • Added the strings and sort packages to support label parsing and ordering. [1] [2]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cv711 Christos Vontas (cv711) changed the title feat: add tags to the snapshot archives feat: add tags and use ephemeral volumes for snapshot archives Mar 13, 2026
@cv711
Copy link
Copy Markdown
Contributor Author

Implements also #178

@cv711 Christos Vontas (cv711) merged commit ed65364 into main Mar 16, 2026
4 checks passed
@cv711 Christos Vontas (cv711) deleted the feat/snapshot-tags branch March 16, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants