Shift to ServerVersion call to get version#640
Conversation
Pull Request Test Coverage Report for Build 1076
💛 - Coveralls |
|
This won't be reviewed until the |
instead of useing OpenAPISchema for version because openshift stores its own version data in Info.Version Signed-off-by: Derek Wilson <derek@heptio.com>
d3a76d0 to
9c08501
Compare
bryanl
left a comment
There was a problem hiding this comment.
This changes how ksonnet works. If at all possible, it should retrieve the cluster schema from the cluster itself.
Here is an example failure:
$ ks init mule --skip-default-registries
INFO Using context "gke_bryan-heptio_us-central1-a_dev-001" from kubeconfig file "/Users/bryan/.kube/config"
INFO Creating environment "default" with namespace "default", pointing to "version:v1.10.2-gke.1" cluster at address "https://35.175.192.254"
ERROR Received status code '404' when trying to retrieve OpenAPI schema for cluster version 'v1.10.2-gke.1' from URL 'https://raw.githubusercontent.com/kubernetes/kubernetes/v1.10.2-gke.1/api/openapi-spec/swagger.json'
To undo this simply delete directory 'mule' and re-run `ks init`.
If the error persists, try using flag '--context' to set a different context or run `ks init --help` for more options
because gke used - instead of + ... just look for version-ish thing instead Signed-off-by: Derek Wilson <derek@heptio.com>
|
@bryanl the reason it didn't work against GKE is because the git version representation was different than on openshift so rather than splitting on anything we can look for something that looks like a kubernetes version instead. This also does hit the cluster to ask for version if at all possible. if it fails to hit the live cluster we fall back to 1.8.0 still. The major difference with this PR is that we are hitting the api at Also because |
instead of using OpenAPISchema for version because openshift stores its
own version data in Info.Version
this only addresses the app init section - there are other places where version info could be gathered for environments that will need to be addressed as well. before i head down that road i'm pushing this to check and see if this is the right direction to move in - which is why it's WIP right now.
related to #427