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

basic auth on kubernetes - unexpected watch event object type #1596

Closed
Eriner opened this issue May 13, 2017 · 5 comments
Closed

basic auth on kubernetes - unexpected watch event object type #1596

Eriner opened this issue May 13, 2017 · 5 comments
Labels
area/authentication area/provider/k8s/ingress kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. status/5-frozen-due-to-age

Comments

@Eriner
Copy link

Eriner commented May 13, 2017

Issue

When using basic auth on kubernetes (introduced by #1488), traefik produces some noisy logs due to glog (upstream kubernetes ref), in particular the following log:

ERROR: logging before flag.Parse: E0512 22:57:36.808273       1 reflector.go:359] github.com/containous/traefik/vendor/k8s.io/client-go/tools/cache/reflector.go:94: expected type *v1.Endpoints, but watch event object had type *v1.Secret

At least in my case, it produces exactly 208 of these log entries per hour.

Mitigation

This bug does not impact the functionality of basic auth, only log production.

Disabling basic auth and redeploying the container ceases the production of this log entry.

Traefik version

Docker contianer: traefik:v1.3.0-rc1-alpine

Configuration and Environment

There's nothing special about this environment, and the authentication is implemented per the PR referenced above, functions as expected, and fits the constraints mentioned in that PR.

Debugging

If it's helpful, I can redeploy the container with debugging.

@timoreimann timoreimann added area/provider/k8s/ingress kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. labels May 13, 2017
@ajtrichards
Copy link

We are also getting this same message filling up our log files. Using the same container image: traefik:v1.3.0-rc1-alpine

@kekoav
Copy link
Contributor

kekoav commented Jun 2, 2017

@timoreimann I have submitted a fix for this issue ☝️ . This looks to be a minor typo, and resolves the error messages when running in Kubernetes.

This error happens regardless of if basic auth is in use. I am not using basic auth and it still happens when the watchers are looking for changes.

@Eriner @ajtrichards

@Eriner
Copy link
Author

Eriner commented Jun 2, 2017

@kekoav I haven't tested the PR, but I have extensive logs from A/B tests that show the bug only triggering when basic auth is enabled, FWIW. It's very possible that alternate configurations (not just the basic auth feature, perhaps something else about your environment triggers it as well) can/will trigger the bug, but at least in my case, simply disabling kubernetes-backed basic auth prevents this bug from being triggered.

Cheers for the potential fix 👍

@kekoav
Copy link
Contributor

kekoav commented Jun 2, 2017

@Eriner That is interesting, I never did anything to enable it, even with no Ingress objects this just started appearing in my logs after updating to 1.3.0. I was unaware of basic auth support until my logs started filling up and I found this issue 🤷‍♂️ .

kekoav added a commit to kekoav/traefik that referenced this issue Jun 2, 2017
…ret watcher traefik#1596

This was likely just a copy-paste issue, the bug should be benign because the secret is cast to the correct type later, but the additional logging is a major annoyance, and is happening even if basic auth is not in use with Kubernetes.
ldez pushed a commit that referenced this issue Jun 2, 2017
…ret watcher #1596

This was likely just a copy-paste issue, the bug should be benign because the secret is cast to the correct type later, but the additional logging is a major annoyance, and is happening even if basic auth is not in use with Kubernetes.
@ldez
Copy link
Member

ldez commented Jun 14, 2017

I'll close this issue, because I think the question is answered, but feel free to continue the conversation.

@ldez ldez closed this as completed Jun 14, 2017
m3co-code pushed a commit to m3co-code/traefik that referenced this issue Aug 22, 2017
…ret watcher traefik#1596

This was likely just a copy-paste issue, the bug should be benign because the secret is cast to the correct type later, but the additional logging is a major annoyance, and is happening even if basic auth is not in use with Kubernetes.
@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/authentication area/provider/k8s/ingress kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. status/5-frozen-due-to-age
Projects
None yet
Development

No branches or pull requests

6 participants