-
Notifications
You must be signed in to change notification settings - Fork 141
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
Check SMI CRDs version before starting the controller #714
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jspdown
added
kind/enhancement
a new or improved feature.
status/2-needs-review
area/smi
area/prepare
labels
Aug 25, 2020
jspdown
changed the title
Check SMI CRDs version before starting controller
Check SMI CRDs version before starting the controller
Aug 25, 2020
kevinpollet
requested changes
Aug 26, 2020
kevinpollet
approved these changes
Aug 26, 2020
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.
LGTM 🚢
kevinpollet
force-pushed
the
GH-711-prepare-simplified
branch
from
August 26, 2020 11:53
72f925d
to
e1cc26d
Compare
jspdown
force-pushed
the
GH-711-prepare-simplified
branch
from
August 26, 2020 14:21
e1cc26d
to
979e73f
Compare
kevinpollet
force-pushed
the
GH-711-prepare-simplified
branch
from
August 26, 2020 20:13
b416ecc
to
911c2e1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
In order to improve the user experience when incompatible SMI CRDs versions are installed (outdated or not yet supported), this PR introduce some changes on the prepare command.
In the past we use to start informers and start collecting the different SMI objects already present on the cluster. If SMI CRDs were not installed or an unsupported version was we would get the following errors many times:
This PR introduce a simpler solution based on the
Discovery
API of the kubernetes sdk to discover which resource groups are installed and what are there versions.Fixes #711
How to test it
--skip-crds
flag: The controller should fail and you should see a message in the init container logs telling you that the SMI CRDs are missing.--skip-crds
you should see an error in the logs too.