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

[ARO-9308] Add MDSD Certificate rotation tasks to MIMO #4091

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

hawkowl
Copy link
Collaborator

@hawkowl hawkowl commented Feb 10, 2025

Which issue this PR addresses:

Fixes ARO-9308

What this PR does / why we need it:

Adds MDSD certificate rotation to MIMO. Rewrites the code to use ClientHelper. Common underlying implementation between MIMO and AdminUpdate is used, and tests are added for the MIMO usage.

Test plan for issue:

Unit tests + E2E

Is there any documentation that needs to be updated for this PR?

N/A

How do you know this will function as expected in production?

Unit tests :)

Copy link
Contributor

@kimorris27 kimorris27 left a comment

Choose a reason for hiding this comment

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

Looks good! In the test plan you mentioned E2E. Should we expect an E2E test for this in a follow-up PR?


// "Rotate" the MDSD certificates in the cluster. The copy that is rotated from
// comes from RP-Config, and is only able to be updated when the RP is updated.
func RenewMDSDCertificate(ctx context.Context, log *logrus.Entry, _env env.Interface, ch clienthelper.Interface) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a request for change, just a question for my understanding: what was the motivation to refactor this to use the clienthelper?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Consistency with the rest of MIMO + better testability (imo).

@hawkowl
Copy link
Collaborator Author

hawkowl commented Feb 11, 2025

@kimorris27 I'm not sure that I can write an e2e test for this specific case, since it require the env to change (which is a bit hard, although I could probably come up with a way to do it). I'm mostly relying on the e2e to test the codepath works, since I'm fairly sure we do an admin update and that will run it.

@kimorris27
Copy link
Contributor

@kimorris27 I'm not sure that I can write an e2e test for this specific case, since it require the env to change (which is a bit hard, although I could probably come up with a way to do it). I'm mostly relying on the e2e to test the codepath works, since I'm fairly sure we do an admin update and that will run it.

Oh, gotcha... I was not thinking about the fact that E2E runs an admin update. Makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code ready-for-review size-small Size small skippy pull requests raised by member of Team Skippy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants