Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

fix providerServiceAccountRBACRules to remove ResourceNames #4618

Open
wants to merge 1 commit into
base: release-0.29
Choose a base branch
from

Conversation

liu4480
Copy link
Contributor

@liu4480 liu4480 commented May 18, 2023

What this PR does / why we need it

Which issue(s) this PR fixes

Fixes #
The issue is that Antrea addon controller needs to create a ClusterRole to allow tkg controllers
to read all NSXServiceAccount CRs, however, the Antrea addon controller wrongly adds the specific
NSXServiceAccount name (instead of all) restriction to the permission. This only allows the
tkg controllers to read a specific NSXServiceAccount instead all NSXServiceAccounts.

So if the Cluster is created one by one, customer will not hit this bug. For each cluster, Antrea
addon controller updates the ClusterRole with the current NSXServiceAccount name for the current Cluster.

If the Clusters are created in batch, all controllers need to process Clusters in parallel, chances are
Antrea addon controller specifies a specific NSXServiceAccount name for Cluster A, but tkg controllers are
processing Cluster B, then tkg controllers will fail to read NSXServiceAccount.

Describe testing done for PR

Release note


Additional information

Special notes for your reviewer

The issue is that Antrea addon controller needs to create a ClusterRole to allow tkg controllers
to read all NSXServiceAccount CRs, however, the Antrea addon controller wrongly adds the specific
NSXServiceAccount name (instead of all) restriction to the permission. This only allows the
tkg controllers to read a specific NSXServiceAccount instead all NSXServiceAccounts.

So if the Cluster is created one by one, customer will not hit this bug. For each cluster, Antrea
addon controller updates the ClusterRole with the current NSXServiceAccount name for the current Cluster.

If the Clusters are created in batch, all controllers need to process Clusters in parallel, chances are
Antrea addon controller specifies a specific NSXServiceAccount name for Cluster A, but tkg controllers are
processing Cluster B, then tkg controllers will fail to read NSXServiceAccount.

Signed-off-by: Bin Liu <biliu@vmware.com>
@liu4480 liu4480 requested review from a team as code owners May 18, 2023 11:26
@navidshaikh navidshaikh added the do-not-merge/hold Some fixes necessary, hold for merging label May 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-not-required do-not-merge/hold Some fixes necessary, hold for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants