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

feat: multi namespace RBAC manifests #897

Merged
merged 4 commits into from
Jul 31, 2023

Conversation

jnoordsij
Copy link
Collaborator

@jnoordsij jnoordsij commented Jul 27, 2023

What does this PR do?

When adding multiple namespaces to watch by the Traefik and using namespaced RBAC, this PR ensures Roles and RoleBindings are added for all relevant namespaces.

Motivation

Currently, only a Role + RoleBinding is added for the chart namespaces. When watching more namespaces, manual adding (and maintaining) of additional resources is required, as by default the ServiceAccount has no access to the resources.

This also includes new behavior for the default list of watched namespaces, which previously did not respect namespace overrides (always using .Release.Namespace).

More

  • Yes, I updated the tests accordingly
  • Yes, I ran make test and all the tests passed

@mloiseleur mloiseleur changed the title Multi namespace RBAC manifests feat: multi namespace RBAC manifests Jul 28, 2023
Copy link
Contributor

@mloiseleur mloiseleur left a comment

Choose a reason for hiding this comment

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

Interesting PR
Many thanks @jnoordsij !

@mloiseleur mloiseleur added the kind/enhancement New feature or request label Jul 28, 2023
Copy link
Contributor

@mloiseleur mloiseleur left a comment

Choose a reason for hiding this comment

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

Would you please add two tests, one with namespaces only on kubernetesIngress and an other one with namespaces only on kubernetesCRD ?

@jnoordsij
Copy link
Collaborator Author

Would you please add two tests, one with namespaces only on kubernetesIngress and an other one with namespaces only on kubernetesCRD ?

Sure! I added two additional tests in the newest commit.

Copy link
Contributor

@darkweaver87 darkweaver87 left a comment

Choose a reason for hiding this comment

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

LGTM

@traefiker traefiker merged commit 43e535c into traefik:master Jul 31, 2023
1 check passed
@jnoordsij jnoordsij deleted the multi-namespace-rbac branch July 31, 2023 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants