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

Add service-account credentials into auto-import-secret. #446

Conversation

xuezhaojun
Copy link
Contributor

@xuezhaojun xuezhaojun commented Sep 24, 2024

Description

This PR add the new OCM auth method credentials "client_id" and "client_secret" into auto-import-secret to let import-controller get the cluster details.

Related Issue

This PR is to support Jira issue: https://issues.redhat.com/browse/ACM-10404 which is related to https://issues.redhat.com/browse/ACM-13056

Changes Made

Add the service-account authentication method also into auto-import-secret.

Screenshots (if applicable)

Add screenshots or GIFs that demonstrate the changes visually, if relevant.

Checklist

  • I have tested the changes locally and they are functioning as expected.
  • I have updated the documentation (if necessary) to reflect the changes.
  • I have added/updated relevant unit tests (if applicable).
  • I have ensured that my code follows the project's coding standards.
  • I have checked for any potential security issues and addressed them.
  • I have added necessary comments to the code, especially in complex or unclear sections.
  • I have rebased my branch on top of the latest main/master branch.

Additional Notes

Add any additional notes, context, or information that might be helpful for reviewers.

Reviewers

Tag the appropriate reviewers who should review this pull request. To add reviewers, please add the following line: /cc @reviewer1 @reviewer2

Definition of Done

  • Code is reviewed.
  • Code is tested.
  • Documentation is updated.
  • All checks and tests pass.
  • Approved by at least one reviewer.
  • Merged into the main/master branch.

@xuezhaojun xuezhaojun force-pushed the add-fields-in-auto-improt-secret branch from 04c7325 to 13cb209 Compare September 24, 2024 14:23
Copy link

sonarcloud bot commented Sep 24, 2024

@xuezhaojun xuezhaojun changed the title WIP: Add service-account credentials into auto-import-secret. Add service-account credentials into auto-import-secret. Sep 26, 2024
@xuezhaojun
Copy link
Contributor Author

xuezhaojun commented Sep 26, 2024

/assign @dislbenn

I used a test imge with the latest downstream to test this feature, after I change the DiscoveredCluster type to ROSA and importAsManagedCluster to true, it successfully pass the check in here and trigger the auto-import-secret creation. The auto-import-secret includes the values we need, you can see it contains the client_id and client_secret instead of api_token:

image

@dislbenn
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Sep 26, 2024
Copy link

openshift-ci bot commented Sep 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dislbenn, xuezhaojun

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 PR approval has been given label Sep 26, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 4df206e into stolostron:main Sep 26, 2024
8 checks passed
@xuezhaojun xuezhaojun deleted the add-fields-in-auto-improt-secret branch September 26, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR approval has been given dco-signoff: yes lgtm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants