Skip to content

Conversation

@mdzraf
Copy link
Member

@mdzraf mdzraf commented Nov 25, 2025

What type of PR is this?

/kind feature

What is this PR about? / Why do we need it?

This PR adds the ability for users to lock snapshots on creation by passing in desired LockSnapshot parameters through the VolumeSnapshotClass.

How was this change tested?

Ran various unit tests as well as e2e tests that:

  • Created locked snapshots in governance mode
  • Create locked snapshots in compliance mode
  • Create locked snapshots with FSR

Also manually tested by running a modified version of our snapshot example.

  • In the examples/kubernetes/snapshot Change snapshotclass.yaml to:
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: csi-aws-vsc
driver: ebs.csi.aws.com
deletionPolicy: Delete
parameters: 
  snapshotLockEnabled: "true"
  snapshotLockMode: "governance"
  snapshotLockDuration: "1"
  • Run through example, and just make sure to unlock snapshot through AWS CLI before doing cleanup by running:
aws ec2 unlock-snapshot --snapshot-id  snap-<snapshot-id>

Does this PR introduce a user-facing change?

Added Ability To Lock Snapshots On Creation Through VolumeSnapshotClass Parameters. 

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. labels Nov 25, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign torredil for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 25, 2025
@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Code Coverage Diff

This PR does not change the code coverage

@ConnorJC3
Copy link
Contributor

/retest

@mdzraf mdzraf force-pushed the snapshotLockOnCreate branch from 5a301d7 to 94ec03f Compare December 2, 2025 18:12
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 2, 2025
@mdzraf mdzraf force-pushed the snapshotLockOnCreate branch 2 times, most recently from a809c40 to 744ab62 Compare December 2, 2025 19:21
@mdzraf mdzraf changed the title [WIP] Adding SnapshotLock Capabilities Adding SnapshotLock Capabilities Dec 2, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 2, 2025
@mdzraf
Copy link
Member Author

mdzraf commented Dec 2, 2025

/hold

Waiting on managed policy change.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 2, 2025
@mdzraf mdzraf force-pushed the snapshotLockOnCreate branch 3 times, most recently from cb5430d to 53808c2 Compare December 3, 2025 16:36
@mdzraf mdzraf force-pushed the snapshotLockOnCreate branch from 53808c2 to f7a57e0 Compare December 3, 2025 17:51
Copy link
Member

@torredil torredil left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants