-
Notifications
You must be signed in to change notification settings - Fork 2
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
Integrate PVC creation feature using snapshot to replication controller for single cluster #153
base: main
Are you sure you want to change the base?
Conversation
Is this PR ready for review? It's in draft state. |
939ca96
to
5cad19e
Compare
// example default snapshot class: default-csi-vxflexos | ||
snClass := group.Annotations[controller.SnapshotClass] | ||
driverClass := group.Labels[controller.DriverName] | ||
if snClass == "" { | ||
part := strings.Split(driverClass, ".")[0] | ||
snClass = "default-" + strings.TrimPrefix(part, "csi-") + "-snapshotclass" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example and the implementation do not match.
Not a big deal, but if you're making any other changes, maybe update here as well.
storageClass := group.Annotations[r.Domain+"/snapshotStorageClass"] | ||
createPVC := group.Annotations[r.Domain+"/snapshotCreatePVC"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, in the other PR, there were more concise consts for these array indexes.
Can we update here as well if they exist?
if createPVCtrue { | ||
rg.Annotations[prefix+"/snapshotCreatePVC"] = "true" | ||
} else { | ||
rg.Annotations[prefix+"/snapshotCreatePVC"] = "false" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if createPVCtrue { | |
rg.Annotations[prefix+"/snapshotCreatePVC"] = "true" | |
} else { | |
rg.Annotations[prefix+"/snapshotCreatePVC"] = "false" | |
} | |
rg.Annotations[prefix+"/snapshotCreatePVC"] = createPVCtrue |
Additionally, maybe rename createPVCtrue
to createPVC
to avoid confusion?
Moving to Draft state, need to check with POs regarding this feature's milestone. |
Description
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Manual Testing Instruction
repctl
repctl snapshot --rg rg-id --sn-class vxflexos-snapclass-delete --sn-namespace test-delete --create-pvcs --storage-class vxflexos-217
repctl snapshot --rg rg-id --sn-namespace test-default --create-pvcs --storage-class vxflexos-217
test-pg1
)Test Coverage Change
/controllers/replication-controller/dellcsireplicationgroup_controller.go
change: