-
Notifications
You must be signed in to change notification settings - Fork 18
Normalize keyAlgorithm separator character #86
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
base: main
Are you sure you want to change the base?
Normalize keyAlgorithm separator character #86
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: naclonts 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 |
|
Hi @naclonts. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
pkg/resource/certificate/sdk.go
Outdated
| } | ||
| // Normalize KeyAlgorithm to use underscores instead of dashes | ||
| // AWS API returns dashes (e.g., RSA-2048) but users specify underscores (e.g., RSA_2048) | ||
| if resp.Certificate.KeyAlgorithm != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the issue is with the comparison logic specifically it might be best to perform this normalization logic in the delta comparison in delta.go instead of mutating the value returned by the API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! Just updated.
Issue #, if available: aws-controllers-k8s/community#2394
Description of changes: Fix infinite reconciliation loop caused by KeyAlgorithm format mismatch between user input (underscores, e.g., RSA_2048) and AWS API response (dashes, e.g., RSA-2048).
Added normalizeKeyAlgorithm helper function in hooks.go and modified the SDK read template to normalize the value when reading from AWS. Includes e2e test coverage to verify the fix.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.