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

Aws secretsmanager additions #6381

Merged

Conversation

mpechner-akasa
Copy link
Contributor

@mpechner-akasa mpechner-akasa commented Nov 29, 2024

This adds the ability to specify a secretKey in the awsSecretManager TriggerAuthentication. This will allow parsing of secrets that contain Key/Value pairs (returned in JSON format).

Resubmission of #6031

Provide a description of what has been changed

Checklist

Fixes #5940

Relates to #

@mpechner-akasa mpechner-akasa requested a review from a team as a code owner November 29, 2024 18:28
@mpechner-akasa mpechner-akasa force-pushed the aws-secretsmanager-additions branch from a4701ef to 23175d8 Compare November 29, 2024 20:09
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

Looking good, thanks. We should also update docs

@mpechner-akasa
Copy link
Contributor Author

#5940

docs. kedacore/keda-docs#1508

Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

Really nice job! some comments inline

@mpechner-akasa mpechner-akasa force-pushed the aws-secretsmanager-additions branch 2 times, most recently from 36f2dcc to a6b4067 Compare December 16, 2024 22:38
Signed-off-by: michael pechner <[email protected]>
Signed-off-by: michael pechner <[email protected]>
…-akasa/keda into aws-secretsmanager-additions
…ect.

Will remove  REMOVETestAwsSecretManagerJSONFormat and change aws_secret_manager_pod_identity.go once I have changed this file as expected.

Signed-off-by: michael pechner <[email protected]>
// Local imports
	. "github.com/kedacore/keda/v2/tests/helper"

Signed-off-by: michael pechner <[email protected]>
@JorTurFer
Copy link
Member

JorTurFer commented Jan 17, 2025

e2e tests are failing because the secret has the same name in both cases. This makes that one case passes and the other one fails because the e2e test is trying to create a secret with the same name and the secret is in deletion process

You can't create this secret because a secret with this name is already scheduled for deletion

You need to update the value of AwsCredentialsSecretName to include a different value per test case (as well as the random number to not conflict between tests). e.g: You can move the value calculation to the function getTemplateData and append a suffix with the test case

…e the secret.

Instead of tryinfg to further randomize the secretname, just let the code do what it should.
Added a poll to wait on the secret to be removed.  Hoping 2 minniutes is more than enough.

Signed-off-by: michael pechner <[email protected]>
…e the secret.

Instead of trying to further randomize the secretname, just let the code do what it should.
Added a poll to wait on the secret to be removed.

Should happen within a few seconds.  But we are talking AWS.  5 minutes really should be more then enough.

Signed-off-by: michael pechner <[email protected]>
…-akasa/keda into aws-secretsmanager-additions
Signed-off-by: michael pechner <[email protected]>
Signed-off-by: michael pechner <[email protected]>
Signed-off-by: michael pechner <[email protected]>
made sure we set a new secret name for each run

Signed-off-by: michael pechner <[email protected]>
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

Really great job! 2 small comments inline and we are almost there!

@JorTurFer
Copy link
Member

JorTurFer commented Feb 3, 2025

/run-e2e aws
Update: You can check the progress here

@JorTurFer
Copy link
Member

JorTurFer commented Feb 3, 2025

/run-e2e aws
Update: You can check the progress here

@JorTurFer
Copy link
Member

JorTurFer commented Feb 4, 2025

/run-e2e aws
Update: You can check the progress here

@JorTurFer JorTurFer mentioned this pull request Feb 3, 2025
25 tasks
@zroubalik
Copy link
Member

zroubalik commented Feb 6, 2025

/run-e2e aws
Update: You can check the progress here

@zroubalik
Copy link
Member

zroubalik commented Feb 6, 2025

/run-e2e aws
Update: You can check the progress here

@JorTurFer JorTurFer merged commit ca83efd into kedacore:main Feb 6, 2025
17 checks passed
JorTurFer pushed a commit to kedacore/keda-docs that referenced this pull request Feb 6, 2025
…1508)

* Documented adding secretKey parameter to access aws secret manager

Doc for issue: kedacore/keda#5940
PR: kedacore/keda#6381

Signed-off-by: michael pechner <[email protected]>

* Added a note to the description for the secretKey parameter and entry to the example for the parameter.

Signed-off-by: michael pechner <[email protected]>

---------

Signed-off-by: michael pechner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants