Skip to content

Conversation

aanm
Copy link
Member

@aanm aanm commented Mar 8, 2022

Trimmed down all Cilium's Cluster Roles to only the necessary rules.

Note for reviewers: all tests have passed on PR #19449 which includes these changes.

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 8, 2022
@aanm
Copy link
Member Author

aanm commented Mar 8, 2022

/test

@aanm aanm added the release-note/misc This PR makes changes that have no direct user impact. label Mar 8, 2022
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 8, 2022
@aanm
Copy link
Member Author

aanm commented Mar 8, 2022

/test-1.23-net-next

@aanm
Copy link
Member Author

aanm commented Mar 8, 2022

/test

@aanm
Copy link
Member Author

aanm commented Mar 8, 2022

/test

@aanm
Copy link
Member Author

aanm commented Mar 8, 2022

/test-1.21-5.4

@aanm
Copy link
Member Author

aanm commented Mar 8, 2022

/ttest-1.21-5.4

@aanm
Copy link
Member Author

aanm commented Mar 8, 2022

/test-1.23-net-next

@aanm aanm force-pushed the pr/trim-rbac branch 2 times, most recently from f943893 to 553538f Compare March 26, 2022 03:14
@aanm aanm changed the title wip Trimmed down Cilium's Cluster Roles to only the necessary rules Apr 16, 2022
@aanm aanm marked this pull request as ready for review April 16, 2022 22:04
@aanm aanm requested a review from a team as a code owner April 16, 2022 22:04
@aanm aanm requested review from a team April 16, 2022 22:04
@aanm aanm requested review from a team as code owners April 16, 2022 22:04
aanm added 8 commits April 21, 2022 22:56
Since Cilium does not set any finalizer in the owner of the CEP, a Pod,
it does not make sense to set "BlockOwnerDeletion: true". Regardless of
this option being `true` or `false`, the Pod dependent, in this case the
CEP, is always* Garbage Collected by Kubernetes. *Only if the user
specifies the pod deletion with the "orphan" deletion cascading strategy
that the CEP will be kept. However, Cilium Operator will garbage collect
orphaned Cilium Endpoints every 5 minutes by default.

Signed-off-by: André Martins <andre@cilium.io>
Cilium does not need to perform any Pod update thus this permission can
be removed from Cilium's Cluster Role.

Signed-off-by: André Martins <andre@cilium.io>
Follow up of 0f4d3a7 ("helm: Remove Unnecessary RBAC Permissions for Agent")

Signed-off-by: André Martins <andre@cilium.io>
Trimmed down Cilium's ClusterRole to the exact permissions that Cilium
requires.

Signed-off-by: André Martins <andre@cilium.io>
Trimmed down clustermesh-apiserver's ClusterRole to the exact
permissions that clustermesh-apiserver requires.

Signed-off-by: André Martins <andre@cilium.io>
Since this option only existed to set up annotations in Kubernetes Nodes
before the introduction of CiliumNodes, it can be default to 'false' so
that Cilium's RBAC can have less permissions as possible.

Signed-off-by: André Martins <andre@cilium.io>
To decrease the amount of permissions Cilium's requires to operate in a
cluster, the node taint removal and the setup of the node condition
NetworkUnavailable can be set through cilium-operator.

Cilium-operator will remove, if set, the Cilium's specific node taints from
the Kubernetes nodes as well as setting up the NetworkUnavailable node
condition to 'false' once it detects there is a "Ready" Cilium pod in
that node.

Signed-off-by: André Martins <andre@cilium.io>
Trimmed down Cilium-Operator's ClusterRole to the exact permissions
that Cilium-Operator requires.

Signed-off-by: André Martins <andre@cilium.io>
@aanm
Copy link
Member Author

aanm commented Apr 22, 2022

The CI has passed in #19449 although AKS test is failing on master so it's not a regression introduced by these changes. Merging...

@cure53
Copy link

cure53 commented Nov 15, 2022

✔️ LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants