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

Make the metallb rbac namespaced for the metallb CRs #1287

Merged
merged 9 commits into from Mar 31, 2022

Conversation

fedepaol
Copy link
Member

This is based off #1275 as we need the new controller-runtime
that implements kubernetes-sigs/controller-runtime#1435 and kubernetes-sigs/controller-runtime#1602

Setting a namespace selector for all the crds allow the controllers to be namespace scoped for those, while being cluster scoped for all the other resources we need metallb to be cluster scoped to (nodes, services, etc).

@fedepaol fedepaol changed the title Namespacedcrds Make the metallb rbac namespaced for the metallb CRs Mar 25, 2022
@fedepaol fedepaol force-pushed the namespacedcrds branch 2 times, most recently from c0b0aa8 to 7c4d49d Compare March 30, 2022 13:31
@SchSeba
Copy link

SchSeba commented Mar 31, 2022

/lgtm

controller-gen is meant to generate rbac for one single role, while we
have different rbacs for the controller and for the speaker. We remove
the annotations and the generater rbac.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
By doing this, we can keep the role as namespace scoped instead of
cluster scoped, limiting the namespace we listen for crs.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
The CRs are supposed to be created in the metallb's namespace, there's
no need to create them cluster scoped.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
Aligning the helm chart to have the crs namespaced instead of cluster
scoped.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
Regenerated manifests with moving the rbac from cluster to namespace for
the metallb CRs.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
We don't have the configmap anymore, we remove the role from the charts.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
The predicate is not needed anymore, as the crds are now namespaced and
metallb listens only to those in its namespace.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
We bumped ci but we did not bump go.mod, aligning it.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
We update the version, and we wait more for it to complete.
Also, changing the nolint annotation to be compatible to the new
version.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
@SchSeba
Copy link

SchSeba commented Mar 31, 2022

/lgtm

@fedepaol fedepaol merged commit 008687a into metallb:main Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants