Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[controller] Add data wipe #103

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open

[controller] Add data wipe #103

wants to merge 38 commits into from

Conversation

duckhawk
Copy link
Member

@duckhawk duckhawk commented Feb 18, 2025

Description

Added the ability to delete data from volumes upon deletion in the EE edition.

What is the expected result?

Working feature of data wipe while deleting persistentVolumes

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

@duckhawk duckhawk self-assigned this Feb 19, 2025
@duckhawk duckhawk requested a review from AleksZimin February 19, 2025 12:36
@duckhawk duckhawk added the enhancement New feature or request label Feb 19, 2025
@duckhawk duckhawk changed the title Add data wipe feature [controller] Add data wipe Feb 19, 2025
duckhawk and others added 2 commits February 20, 2025 16:38
Co-authored-by: Denis Rebenok <60424108+denmaloyreb@users.noreply.github.com>
Signed-off-by: Vasily Oleynikov <archi.kun@gmail.com>
…etion in README_RU

Signed-off-by: Denis.Rebenok <denis.rebenok@flant.ru>
Denis.Rebenok and others added 4 commits February 20, 2025 17:40
denmaloyreb
denmaloyreb previously approved these changes Feb 21, 2025
Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
AleksZimin and others added 3 commits February 21, 2025 15:11
Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
@AleksZimin AleksZimin marked this pull request as ready for review February 21, 2025 12:21
Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
@AleksZimin AleksZimin requested a review from astef February 21, 2025 12:30
AleksZimin
AleksZimin previously approved these changes Feb 21, 2025
if localStorageClass != nil && localStorageClass.Spec.LVM != nil && localStorageClass.Spec.LVM.Thick != nil && localStorageClass.Spec.LVM.Thick.VolumeCleanup != "" {
volumeCleanup = localStorageClass.Spec.LVM.Thick.VolumeCleanup
}
}
Copy link
Member

Choose a reason for hiding this comment

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

This block has a duplicate below on line 312. Extract a common function.

func GetLSCBeforeLLVDelete(ctx context.Context, cl client.Client, log logger.Logger, volumeID, traceID string) (*slv.LocalStorageClass, error) {
log.Info(fmt.Sprintf("[DeleteVolume][traceID:%s] Fetching PersistentVolume with VolumeId: %s", traceID, volumeID))
var pv corev1.PersistentVolume
if err := cl.Get(ctx, client.ObjectKey{Name: volumeID}, &pv); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

When called from CreateVolume, how this pv may exist already? I thought it will be created as a result of CreateVolume.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants