-
Notifications
You must be signed in to change notification settings - Fork 29
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 tenant field to Explorer objects #3580
Conversation
@jpellizzari could you expand what is the background problem around tenants? ( you could safely assume little knowledge on tenancy implementation details from my side 🤣 ) |
@enekofb Same! I don't know what it is for and why someone would use it. Our docs are very sparse on this. |
fcaf765
to
7fa68ab
Compare
pkg/query/server/server.go
Outdated
for _, ns := range namespaces { | ||
if ns.GetName() == obj.Namespace { | ||
obj.Tenant = ns.Labels["toolkit.fluxcd.io/tenant"] | ||
|
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.
An empty line.
And maybe we could add a break statement here?
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.
Updated @opudrovs
9eee999
to
44bf990
Compare
44bf990
to
d4e0797
Compare
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, great job! 🎉
Closes #3299
Populates the
.tenant
column using the existing machinery. This is a temporary fix to get parity with existing views.Currently, we don't have a list of namespaces stored in the database that we can easily look up.
A possible long-term solution would be to watch namespaces and store a table of namespaces and tenants for a faster lookup