Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Unable to use team registry when not using cluster registry. #113

Open
MarcusPorterAtQuestDiagnostics opened this issue Oct 14, 2019 · 3 comments

Comments

@MarcusPorterAtQuestDiagnostics

I have a number of clusters that are defined in a kubeconfig file. Everything works great except for the teams feature. I have created a registry that seems to return the right information, but the only team that shows up is "?unknown?"

In the logs I find the following:
"WARNING:kube_resource_report.report:Failed to look up application audit: Invalid OAuth credentials: Failed to read token "read-only" from ."

Digging into the code I see that "resolve_application_ids" in report.py calls "cluster_discovery.OAuthTokenAuth("read-only")" to set an auth header. But within cluster_discoverer.py only "ClusterRegistryDiscoverer" references OAuthTokenAuth. KubeconfigDiscoverer does not.

Since my registry doesn't require an oath token anyway, is there a way to turn off this behavior, or is this a bug?

@hjacobs
Copy link
Owner

hjacobs commented Oct 15, 2019

Thanks for reporting, as a quick workaround, you can create a file read-only-token-secret with arbitrary fake content (the fake OAuth token).

@MarcusPorterAtQuestDiagnostics
Copy link
Author

Thanks! Where should this file be mounted on the pod?

@hjacobs
Copy link
Owner

hjacobs commented Oct 16, 2019

@MarcusPorterAtQuestDiagnostics it reads from CREDENTIALS_DIR env var so mount it anywhere and point CREDENTIALS_DIR to the folder.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants