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

Allow querying multiple namespaces at once #7341

Open
schmichael opened this issue Mar 13, 2020 · 4 comments
Open

Allow querying multiple namespaces at once #7341

schmichael opened this issue Mar 13, 2020 · 4 comments
Assignees

Comments

@schmichael
Copy link
Member

All HTTP APIs for namespaced objects (eg jobs) only allow querying against a single namespace. They should also support querying multiple namespaces at a time similar to how Policy Namespace Rules can be applied with glob pattern matching: https://learn.hashicorp.com/nomad/acls/policies#namespace-rules

HTTP API Selection, projection, and pagination #7340 could be viewed as a generalization of this issue, but namespacing may warrant special handling given its security implications.

@schmichael schmichael added type/enhancement theme/api HTTP API and SDK issues theme/enterprise Issues related to Enterprise features labels Mar 13, 2020
@davejhilton
Copy link

+1 this would be incredibly useful.

As you mentioned in terms of "special handling"... obviously there is some trickiness involved here, because it would have to find the intersection of {namespaces matched by the glob} and {namespaces you actually have access to}, so I'm sensitive to the potential complexity of implementing this well. But in our case, this would be incredibly useful, especially for our privileged admins (and some integrations we have that inspect things via the HTTP API)

Additionally, this would be fantastic if it were also extended to the cli as well. It would be great to be able to do things like:
nomad job status -namespace='*-web'
or
nomad job status -namespace='*'

To be honest, my preference might even be to make the default behavior (for the nomad job status cli command especially) be to include things from all namespaces (and add an output column to show the namespace) unless otherwise specified. However I can understand that this would introduce backwards incompatibility issues, and would be a potentially expensive api call for being the default. (I suppose this could also be done just by setting NOMAD_NAMESPACE='*' if globs were supported).

Anyway, figured I'd at least add my input here, as we're evaluating nomad enterprise. Keep up the good work 👍

@tgross tgross added theme/namespaces and removed theme/enterprise Issues related to Enterprise features labels Jan 6, 2021
@tgross
Copy link
Member

tgross commented Jan 6, 2021

@schmichael can this one be closed? I know we implemented this for jobs and allocations in 0.12.0 #8192 Was that the limit of what we wanted to do here?

@schmichael schmichael self-assigned this Jan 27, 2021
@tgross tgross added this to Needs Roadmapping in Nomad - Community Issues Triage Feb 12, 2021
@tgross tgross removed this from Needs Roadmapping in Nomad - Community Issues Triage Mar 4, 2021
@schmichael
Copy link
Member Author

schmichael commented May 26, 2021

We're missing /v1/deployments?namespaces=* support

@lgfa29
Copy link
Contributor

lgfa29 commented Sep 17, 2021

CSI plugins and volumes can also benefit from a namespace=* as shown in #11200

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

No branches or pull requests

4 participants