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

Enable "multi-tenancy" lookup of terraform objects #3606

Merged
merged 4 commits into from
Nov 9, 2023
Merged

Enable "multi-tenancy" lookup of terraform objects #3606

merged 4 commits into from
Nov 9, 2023

Conversation

foot
Copy link
Collaborator

@foot foot commented Nov 8, 2023

Closes https://github.com/weaveworks/weave-gitops-interlock/issues/432

What changed?

Search across multiple namespaces using the OSS querier instead of doing a cluster-level (kubectl get -A) query which tenants won't have permissions to do.

Why was this change made?

So that tenants can see terraform objects in namespaces they have access to, instead of seeing a "you don't have permissions to list terraform objects at the cluster scope"

How was this change implemented?

  • NamespacedQuery: false -> true
  • Updating the tests so that they return the namespaces a user will have access to when querying

How did you validate the change?

  • Tests pass after being updated to return namespaces user should have access to etc.
  • tilt + Setup OIDC against dex-01 and added cluster-admin rolebinding to default/flux-system

Release notes

Documentation Changes

Other follow ups

foot added 2 commits November 8, 2023 17:25
- Search across multiple namespaces using the OSS querier instead of
  doing a cluster-level (kubectl get -A) query which tenants won't have
  permissions to do.
@foot foot added the enhancement New feature or request label Nov 8, 2023
@foot foot marked this pull request as ready for review November 9, 2023 09:53
@foot foot requested a review from bigkevmcd November 9, 2023 09:53
Copy link
Contributor

@bigkevmcd bigkevmcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with this, I don't have a better idea for that ugly nil everywhere because we already have a variadic parameter.

internal/grpctesting/grpctesting.go Show resolved Hide resolved
@foot foot merged commit ba44c08 into main Nov 9, 2023
10 checks passed
@foot foot deleted the tf-tenancy branch November 9, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants