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

✨ Adding second group for aws auth flow #735

Conversation

jaswalkiranavtar
Copy link
Contributor

Summary

Adding a second group, that will be used when the spoke starts registration with aws auth type. The aws solution uses EKS access entries and an access entry cannot contain a group name with "system:" prefix. More details can be found on this slack thread.

It can’t start with system:, eks:, aws:, amazon:, or iam:.

Related issue(s)

Fixes # #514

@openshift-ci openshift-ci bot requested review from skeeey and xuezhaojun December 3, 2024 17:03
Copy link
Member

@mikeshng mikeshng left a comment

Choose a reason for hiding this comment

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

/lgtm

Expecting test(s) to come later when we are closer to the AWS/EKS integration?

@mikeshng
Copy link
Member

mikeshng commented Dec 3, 2024

/assign @qiujian16

@jaswalkiranavtar
Copy link
Contributor Author

/lgtm

Expecting test(s) to come later when we are closer to the AWS/EKS integration?

Yes, we will add them later when we implement hub side changes. Hopefully, this addition should not break anything existing.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.32%. Comparing base (ed367fd) to head (14795c2).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #735      +/-   ##
==========================================
- Coverage   63.51%   63.32%   -0.19%     
==========================================
  Files         185      186       +1     
  Lines       17838    17912      +74     
==========================================
+ Hits        11329    11343      +14     
- Misses       5576     5634      +58     
- Partials      933      935       +2     
Flag Coverage Δ
unit 63.32% <ø> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jaswalkiranavtar
Copy link
Contributor Author

Looks like the e2e test failed because of intermittent error. Could you please re-run this build?

@mikeshng
Copy link
Member

mikeshng commented Dec 3, 2024

Looks like the e2e test failed because of intermittent error. Could you please re-run this build?

Re-running as requested.

@@ -12,3 +12,6 @@ subjects:
- kind: Group
apiGroup: rbac.authorization.k8s.io
name: system:open-cluster-management:{{ .ManagedClusterName }}
- kind: Group
Copy link
Member

@qiujian16 qiujian16 Dec 4, 2024

Choose a reason for hiding this comment

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

please add some comments on the reasoning and plan for migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are adding a second group, as for aws flow we are trying to use eks access entries which doesn't allow us to allow access to group with system prefix "system".

Also based on kubernetes docs, "system" prefix is a reserved prefix for kubernetes internal usage.

The reason to add second group is to not update existing group abruptly and cause failure while upgrade existing installation to newer version of OCM. So, the plan is adding second group now to support aws flow and later in the next version, delete old group.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also request you to drive the migration of existing group for csr flow on your end.

@qiujian16
Copy link
Member

cc @elgnay

@qiujian16
Copy link
Member

something to followup:

  1. add this group as org in csr.
  2. update subject in csr to remove system prefix
  3. update addon to remove system prefix ✨ Adding second group for aws auth flow #735

@elgnay
Copy link
Contributor

elgnay commented Dec 4, 2024

LGTM

@qiujian16
Copy link
Member

/approve

Copy link
Contributor

openshift-ci bot commented Dec 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jaswalkiranavtar, mikeshng, qiujian16

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Dec 5, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit a138a54 into open-cluster-management-io:main Dec 5, 2024
15 checks passed
@jaswalkiranavtar jaswalkiranavtar deleted the feature/adding-new-group-rolebindings branch December 9, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants