Skip to content

📖 ROSA HCP IAM Roles proposal #5451

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

serngawy
Copy link
Contributor

@serngawy serngawy commented Mar 28, 2025

What type of PR is this?
/kind documentation

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Mar 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dlipovetsky for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 28, 2025
@serngawy
Copy link
Contributor Author

serngawy commented Mar 28, 2025

/cc @PanSpagetka

@k8s-ci-robot
Copy link
Contributor

@serngawy: GitHub didn't allow me to assign the following users: PanSpagetka.

Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @PanSpagetka

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@serngawy serngawy force-pushed the rosa-iam branch 3 times, most recently from ffa2a6d to 52c3652 Compare April 2, 2025 15:59
Copy link
Contributor

@nrb nrb left a comment

Choose a reason for hiding this comment

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

I have a few questions and a couple nitpicks for style consistency, but overall I'm happy to approve this once those are addressed.

- [Resources](#resources)

## Summary
The ROSA HCP in CAPA (Cluster API Provider AWS) project currently lacks built-in support for managing IAM account roles, IAM operator roles, and OIDC configuration as Custom Resource Definitions (CRDs). This proposal suggests integrating the [ROSA library](https://github.com/openshift/rosa) to extend ROSA-HCP's functionality, enabling declarative IAM and OIDC management.
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be worth adding a way to declare IAM account roles within CAPA's shared API? Or does it not make sense in self-managed clusters?

EDIT: looks like this is addressed later under the alternatives section. Restating it here - this proposal's primarily aimed about integrating existing code from ROSA's library into a controller. This proposal isn't concerned with any other type of AWS cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, its only about ROSA-HCP clusters. The ROSA lib add by default some tags that are required by OCM (hypershift) to identify/own the roles.

- Reduce operational overhead for users deploying OpenShift ROSA HCP clusters on AWS via CAPA.

### Non-Goals
- Replacing existing IAM management workflows outside of CAPA.
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to write outside of ROSA here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ya , I will fix that.


### Implementation Details
1. **Define CRDs for ROSA-HCP IAM roles and OIDC resources**
ROSARoleConfig is a cluster scope CRD defines the required IAM account roles, operator roles and OIDC configurations to create ROSA HCP cluster. Creating the Roles and oidc config should be in order as follow;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ROSARoleConfig is a cluster scope CRD defines the required IAM account roles, operator roles and OIDC configurations to create ROSA HCP cluster. Creating the Roles and oidc config should be in order as follow;
ROSARoleConfig is a cluster scope CRD defines the required IAM account roles, operator roles and OIDC configurations to create ROSA HCP cluster. Creating the Roles and OIDC config should be in order as follows;

1. **Define CRDs for ROSA-HCP IAM roles and OIDC resources**
ROSARoleConfig is a cluster scope CRD defines the required IAM account roles, operator roles and OIDC configurations to create ROSA HCP cluster. Creating the Roles and oidc config should be in order as follow;
1. Create ROSA HCP account roles.
1. Create ROSA HCP oidc config & oidc provider.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. Create ROSA HCP oidc config & oidc provider.
1. Create ROSA HCP OIDC config & OIDC provider.

spec:
accountRoleConfig:
# User-defined prefix for all generated AWS resources (default "ManagedOpenShift")
# required
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is a required field, would the default prefix ever be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes you are right I will remove the default value from the description. The default is used with rosa command CLI

- Ensure proper IAM permissions and security best practices.
3. **Validate and test integration**
- Develop unit tests for ROSA HCP IAM and OIDC CRD reconciliation.
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to re-open discussions about getting some community-owned, ROSA-backed clusters for CI. Right now, I think most of this testing would happen outside of this repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, we need to have CI test AND yes, there are some test done out of the CAPA repo.

Signed-off-by: serngawy <[email protected]>
@k8s-ci-robot
Copy link
Contributor

@serngawy: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-aws-apidiff-main a51a79d link false /test pull-cluster-api-provider-aws-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. needs-priority release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants