-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support multiple versions of Kubernetes #130
Conversation
Publish the model as part of the client interface. That way the client can determine which model is suitable for interacting with the designated Kubernetes API server.
Codecov Report
@@ Coverage Diff @@
## master #130 +/- ##
==========================================
- Coverage 98.16% 97.86% -0.31%
==========================================
Files 25 25
Lines 2122 2245 +123
Branches 201 210 +9
==========================================
+ Hits 2083 2197 +114
- Misses 26 33 +7
- Partials 13 15 +2
Continue to review full report at Codecov.
|
src/txkube/_network.py
Outdated
_versions = { | ||
(u"1", u"5"): v1_5_model, | ||
(u"1", u"6"): v1_6_model, | ||
(u"1", u"7"): v1_7_model, |
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.
In LeastAuthority/kubetop#44 I tried testing kubetop against minikube start --kubernetes-version v1.7.0-alpha.2
.
It gave this error:
(kubetop) [richard@drax txkube]$ kubetop
Traceback (most recent call last):
Failure: twisted.internet.defer.FirstError: FirstError[#1, [Failure instance: Traceback: <type 'exceptions.ValueError'>: Unsupported Kubernetes version: .
The version.Info in this case looked like this:
version.Info(major=u'', gitTreeState=u'not a git tree', buildDate=u'1970-01-01T00:00:00Z', platform=u'linux/amd64', gitVersion=u'v0.0.0-master+$Format:%h$', gitCommit=u'$Format:%H$', compiler=u'gc', minor=u'', goVersion=u'go1.7.3')
src/txkube/_network.py
Outdated
model = self._versions[version.major, version.minor] | ||
except KeyError: | ||
raise ValueError( | ||
"Unsupported Kubernetes version: {}.{}".format( |
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.
❓ It would have been clearer if the exception had included the full version.Info repr.
To be replaced by a new PR. |
Fixes #121