Skip to content
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

Merged
merged 5 commits into from
Oct 12, 2017

Conversation

conorbranagan
Copy link
Contributor

What does this PR do?

Update k8s library, allow deployment API to fail.

  • The latest version of the library includes better logging for errors
    which include the status code. See Include statusCode when failure to unmarshal 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.

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.

* 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.
@conorbranagan conorbranagan requested review from masci and hkaj October 10, 2017 22:35
@bits-bot
Copy link
Collaborator

bits-bot commented Oct 10, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@masci
Copy link
Contributor

masci commented Oct 11, 2017

Tests are failing for a known issue, a fix is on the way

hkaj
hkaj previously approved these changes Oct 11, 2017
Copy link
Member

@hkaj hkaj left a 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)
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh!

@masci masci merged commit c119d8c into master Oct 12, 2017
@masci masci deleted the conor/k8s-deployments branch October 12, 2017 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants