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

Fix: pod not picking up role from service account #152

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

croesnick
Copy link
Contributor

The cert-exporter does not properly assume the role stored in env variable AWS_ROLE_ARN. Apparently, switching from session.New() to session.NewSession() should fix it: aws/aws-sdk-go#4436

@@ -43,7 +43,8 @@ func (p *PeriodicAwsChecker) StartChecking() {
p.exporter.ResetMetrics()

// Create a Session with a custom region
svc := secretsmanager.New(session.New(), aws.NewConfig().WithRegion(p.awsRegion))
session, _ := session.NewSession()
Copy link
Owner

Choose a reason for hiding this comment

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

if this returns an error we should log it and increment the errors metric

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @joe-elliott. Definitely makes sense. :) Added logging and error counter increment. Thanks for the swift reply!

Copy link
Owner

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

thanks for the fix!

@joe-elliott joe-elliott merged commit 0f28975 into joe-elliott:master Dec 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants