-
Notifications
You must be signed in to change notification settings - Fork 89
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
Move resource collection logic from migration controller #344
Conversation
return object, nil | ||
} | ||
|
||
func (r *ResourceCollector) prepareServiceResource( |
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.
Add a comment to all the perpareXXXResource functions, as to what they are doing and why.
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.
prepareServiceResource
does exactly one thing and there is a comment inline
d1c10c5
to
303d46e
Compare
} | ||
|
||
switch resource.Kind { | ||
case "PersistentVolumeClaim", |
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.
we should allow users to configure this list as with CRDs, we would skip those leading to a partial migration. If this is configurable, users can feed in their new types without a stork update.
Also I think we discussed this before but this needs to have storage classes. A statefulset scale up will fail post migration, which means we aren't doing a complete statefulset migration.
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.
There is already an open issue for migrating CRs and CRDs (#282). There is more effort required to support that than just allowing them here since the resources created by the CRs don't need to be migrated themselves. Also, need to be able to handle cases where the CRD isn't registered on the destination.
Storageclasses are cluster specific, admins will create them during cluster install. Although a good to have I don't see that as a blocker for anything.
a37ca2f
to
9ddc334
Compare
* Can be used by other modules to get unstructured objects from a namepsace and matching label selectors * Added support to collect clusterrolebindings inlcuding users and groups for a namespace * Added merging of clusterrolebindings when applying resources
dbbe3a9
to
f66e649
Compare
Codecov Report
@@ Coverage Diff @@
## master #344 +/- ##
=======================================
Coverage 72.82% 72.82%
=======================================
Files 24 24
Lines 2112 2112
=======================================
Hits 1538 1538
Misses 444 444
Partials 130 130
Continue to review full report at Codecov.
|
Can be used by other modules to get unstructured objects from a namepsace
and matching label selectors
What type of PR is this?
Cleanup
What this PR does / why we need it:
Refactored code so that same code can be shared by multiple modules
Does this PR change a user-facing CRD or CLI?:
No
Is a release note needed?:
No
Does this change need to be cherry-picked to a release branch?:
No