feat: Create endpoint for fetching the flux namespace #1515
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add new endpoint to query flux namespace. For simplicity, no arguments
on the request and returns only the name of the namespace. That fulfills
the original request so we can remove the constant1 from the UI.
== Considered solutions
The consumer could query namespaces and filter them with provided
filters.
Dropped this solution, because it could open up some weird surfaces
where the client can query arbitrary filters.
The consumer could query namespaces with a set of filter options and if
they are not specified, throw back an error.
Dropped this solution, because changing the filtering rules would
require code change. The final solution in this change-set has the same
issue, but less complex. If we don't get extra value out of the
complexity, it's not worth it.
== Follow-up
If/when we need a complex endpoint to query all namespaces with filter
options, then we can add one with a plan like:
== Other changes
make proto
updated a lot of auto-generated files.In
tools/dependencies.toml
, removed the system-wide installation ofa tool, because the last thing I want from a project to download a
binary and place it somewhere with root permission. I'm not giving
root permissions just to install dependencies.
Use
tools/bin/tilt
inMakefile
(see previous entry).Replaced the logic behind
getMatchingLabels
. Using thewith option
pattern, we can build up more complex labeling queries, and the
codebase will remain clean.
Closes #1465
Footnotes
https://github.com/weaveworks/weave-gitops/pull/1451/files#diff-35acf2adc3a7b1021fb41d3473b47e030d3708ba2e8ff7a4b76c13ee80b4076cR42 ↩