-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[k8s] Update library, allow deployment API to fail #695
Conversation
* The latest version of the library includes better logging for errors which include the status code. See ericchiang/k8s#58 * The deployment API is unavailable in older versions of Kubernetes. We don't really _need_ this information since we can parse it from the ReplicaSet name.
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!
Tests are failing for a known issue, a fix is on the way |
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.
makes sense 👍
return nil, fmt.Errorf("failed to get deployments: %s", err) | ||
// Allow Deployments API to fail, it's not available in all version and we | ||
// can also parse this data from the replica-set name on the backend. | ||
log.Warnf("Failed to retrieve Kubernetes deployments: %s", err) |
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.
didn't notice but log
package was not imported
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.
Doh!
What does this PR do?
Update k8s library, allow deployment API to fail.
which include the status code. See Include statusCode when failure to unmarshal ericchiang/k8s#58
don't really need this information since we can parse it from the
ReplicaSet name.
Motivation
We've had a couple users (https://trello.com/c/5VjK5smo/560-braintree-having-trouble-with-custom-api-server-port-for-kubernetes, https://trello.com/c/gMllhQNi/605-k8-side-bar-filters) who hit an error in deployments API. Right now the first case at least ended up being an issue with missing RBAC configuration. The update to the library should provide some additional context here.