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

Add additional log statements and update client-go #92

Merged
merged 2 commits into from
Nov 20, 2020

Conversation

shravan-achar
Copy link
Contributor

Issue #, if available:

Description of changes:

  • Add logging statements where containers/pod already have required properties
  • Update client-go to kubernetes-1.18. Update to go1.13

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@shravan-achar shravan-achar requested a review from a team as a code owner November 19, 2020 03:24
@shravan-achar shravan-achar changed the title Add addition log statements and update client-go Add additional log statements and update client-go Nov 19, 2020
Copy link
Contributor

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

Great stuff @shravan-achar :) Just one request inline to remove the unrelated Gauge -> Histogram metric change.

Thanks!
-jay

go.mod Show resolved Hide resolved
pkg/cert/request.go Show resolved Hide resolved
Copy link
Contributor

@jqmichael jqmichael left a comment

Choose a reason for hiding this comment

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

/lgtm.

Minor comments.

Can we test this change against a 1.15 cluster to ensure backwards-compatibility?

pkg/handler/handler.go Outdated Show resolved Hide resolved
pkg/handler/handler.go Outdated Show resolved Hide resolved
pkg/cache/cache.go Outdated Show resolved Hide resolved
pkg/handler/handler.go Outdated Show resolved Hide resolved
@shravan-achar
Copy link
Contributor Author

Can we test this change against a 1.15 cluster to ensure backwards-compatibility?

@jqmichael - Can confirm the container image works against k8s 1.15 server

jaypipes
jaypipes previously approved these changes Nov 19, 2020
Copy link
Contributor

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

pkg/cert/request.go Show resolved Hide resolved
pkg/handler/handler.go Outdated Show resolved Hide resolved
@@ -60,6 +60,7 @@ func (c *serviceAccountCache) Get(name, namespace string) (role, aud string, use
klog.V(5).Infof("Fetching sa %s/%s from cache", namespace, name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want a very high (i.e. 9) level log that prints out the service account cache on every read?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have been following this logging convention doc https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md. Anything >=5 is trace level logging. If I enable logLevel 9, I can see HTTP level logs (Request headers). So, I kept it at 5.

Copy link
Contributor

@nckturner nckturner left a comment

Choose a reason for hiding this comment

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

Nice! Had some minor suggestions.

properties

Use read lock instead of RW lock when listing cache contents

Update README.md
@shravan-achar
Copy link
Contributor Author

@jaypipes @nckturner - Pushed a small update to bump up logging levels for some statements. Re-requesting review :)

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.

None yet

5 participants