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

Add tech preview features struct to DPA CRD, add enableDataMover flag to DPA features , data-mover controller deployment and data-mover csi plugin #727

Conversation

shubham-pampattiwar
Copy link
Member

@shubham-pampattiwar shubham-pampattiwar commented Jun 3, 2022

This PR does the following:

  • adds a new struct spec to DPA CRD called features for OADP tech preview features, this PR adds the first tech preview feature - a boolean flag called enableDataMover.
  • adds a new reconcile function ReconcileDataMoverController which enables the deployment of volume-snapshot-mover based on the enableDataMover flag.
  • updates the csi plugin image based on the existence/value of enableDataMover flag
  • adds unsupportedOverrides support for data-mover controller
  • adds unit tests
  • adds 2 new CRDs - VolumeSnapshotBackup and VolumeSnapshotRestore
  • fixes Enable DM through OADP migtools/volume-snapshot-mover#69

@kaovilai
Copy link
Member

kaovilai commented Jun 3, 2022

/woof

@openshift-ci
Copy link

openshift-ci bot commented Jun 3, 2022

@kaovilai: dog image

In response to this:

/woof

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@shubham-pampattiwar
Copy link
Member Author

/retest

controllers/datamover.go Outdated Show resolved Hide resolved
Copy link
Member

@dymurray dymurray left a comment

Choose a reason for hiding this comment

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

This should be configurable from the DPA spec, a user needs to explicitly enable this feature for 1.1 since we are tech-preview.

@kaovilai kaovilai added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2022
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2022
@kaovilai
Copy link
Member

kaovilai commented Jun 3, 2022

MySQL application NoDefaultBackupStorageLocation was removed from master. Rebase to test without this entry.

@shubham-pampattiwar shubham-pampattiwar changed the title Add datamover controller deployment Add enableDataMover flag to DPA, data-mover controller deployment and data-mover csi plugin Jun 5, 2022
@shubham-pampattiwar shubham-pampattiwar force-pushed the add-datamover-controller branch from ce33ca3 to 2e3753f Compare June 5, 2022 20:48
@shubham-pampattiwar
Copy link
Member Author

This should be configurable from the DPA spec, a user needs to explicitly enable this feature for 1.1 since we are tech-preview.

@dymurray Added a new spec enableDataMover which needs to be specifically set to true by the user in order to enable the data-mover functionality

@shubham-pampattiwar
Copy link
Member Author

/retest

Copy link
Member

@kaovilai kaovilai left a comment

Choose a reason for hiding this comment

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

Please apply all bundle changes in config/ then use make bundle to generate updated bundle. Reach out if you have any questions.

Copy link
Member

@dymurray dymurray left a comment

Choose a reason for hiding this comment

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

Overall changes look sane to me. Couple questions


// EnableDataMover is used to specify whether you want to deploy the volume snapshot mover controller and a modified csi datamover plugin
// +optional
EnableDataMover bool `json:"enableDataMover,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

I was wondering, is it worth adding a new type TechPreviewConfiguration that hides this behind a pointer? This would allow us to change this API as we go to GA if upstream velero makes this totally native.

Then if we have other tech preview features in the future we can always use this field.

Copy link
Member

Choose a reason for hiding this comment

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

Using UnsupportedOverrides config would not require CRD changes. This maybe better approach as we discuss final api.

Copy link
Member Author

Choose a reason for hiding this comment

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

@dymurray I am not sure if TechPreviewConfigutarion is the right naming here, I am unsure. Can we not rely on the docs to let the users know that this is a tech-preview feature ? Or is it the right way to do from the API side as you suggested ?

Copy link
Member

Choose a reason for hiding this comment

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

yeah but this will be a supported field, just maybe something we don't keep around in future versions. So I don't think unsupportedOverrides is the correct place for it

Copy link
Member

Choose a reason for hiding this comment

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

I don't know what the right naming is... but my thought is as we add new features down the line we may not want to keep adding new bools to the top level of the spec.

What about Features and documentation covers what is tech-preview and what isn't? This way it goes:

features:
  enableDataMover: true

and if data mover becomes a first class citizen down the line we just rip it out of the feature set?

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool, I like features more and its combination with the docs. Will be similar to what Velero does

Copy link
Member Author

Choose a reason for hiding this comment

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

@dymurray updated the PR, PTAL, Thanks !

controllers/datamover.go Outdated Show resolved Hide resolved
@shubham-pampattiwar shubham-pampattiwar changed the title Add enableDataMover flag to DPA, data-mover controller deployment and data-mover csi plugin Add tech preview features struct to DPA CRD, add enableDataMover flag to DPA features , data-mover controller deployment and data-mover csi plugin Jun 7, 2022
pkg/common/common.go Outdated Show resolved Hide resolved
Copy link
Member

@kaovilai kaovilai left a comment

Choose a reason for hiding this comment

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

please add a few comments regarding what each images does.

dymurray
dymurray previously approved these changes Jun 7, 2022
Copy link
Member

@dymurray dymurray left a comment

Choose a reason for hiding this comment

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

Tested PR and worked for me, agree with tiger on the unsupported override field for CSI plugin.

Please also rename the data mover deployment to be volume-snapshot-mover

@dymurray dymurray dismissed their stale review June 7, 2022 20:16

Missing CRD

@dymurray
Copy link
Member

dymurray commented Jun 7, 2022

Please add missing CRDs for volume snapshot mover as well

@shubham-pampattiwar
Copy link
Member Author

@dymurray @kaovilai Added the CRDs - VolumeSnapshotBackup and VolumeSnapshotRestore.

@savitharaghunathan
Copy link
Member

/test 4.10-operator-e2e-gcp
/test 4.10-operator-e2e-azure

@kaovilai
Copy link
Member

kaovilai commented Jun 8, 2022

Could be another PR.
Add example annotation to csv by adding example objects for following.

  • config/samples/volumesnapshotbackup.yaml
  • config/samples/volumesnapshotrestore.yaml

Add above to

  • config/samples/kustomization.yaml

Would resolve operator-sdk warnings as well as provide default template in openshift web console yaml view when creating these resources.

WARN[0000] Warning: Value datamover.oadp.openshift.io/v1alpha1, Kind=VolumeSnapshotBackup: provided API should have an example annotation 
WARN[0000] Warning: Value datamover.oadp.openshift.io/v1alpha1, Kind=VolumeSnapshotRestore: provided API should have an example annotation 

@openshift-ci
Copy link

openshift-ci bot commented Jun 8, 2022

@shubham-pampattiwar: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@eemcmullan eemcmullan left a comment

Choose a reason for hiding this comment

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

Tested these changes and was able to complete a backup and restore successfully using data mover.

@savitharaghunathan
Copy link
Member

backup/restore workflow worked with these changes!
/pony party

@openshift-ci
Copy link

openshift-ci bot commented Jun 8, 2022

@savitharaghunathan: pony image

In response to this:

backup/restore workflow worked with these changes!
/pony party

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@shubham-pampattiwar
Copy link
Member Author

Thank you everyone for the PR review and feedback. Going ahead with the merge.

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.

Enable DM through OADP
5 participants