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

Enable IRSA Mode for Kubernetes Deployments #98

Merged
merged 2 commits into from
Dec 13, 2024
Merged

Conversation

michaelbauerinc
Copy link

@michaelbauerinc michaelbauerinc commented Oct 23, 2024

This PR adds support for IAM Roles for Service Accounts (IRSA) in the Percona RDS Exporter, allowing it to run in Kubernetes environments with improved security and reduced management overhead.

Context

IRSA is a feature in AWS EKS that allows Kubernetes pods to assume IAM roles directly using service accounts, eliminating the need to manage and store static credentials (e.g., access key/secret key pairs) within the pods. By enabling IRSA, Kubernetes workloads can leverage temporary security credentials obtained directly from the service account role, simplifying credential management and improving security posture. Previously, an aws secret was required by the exporter to assume the role arn and the exporter would fail is this was missing.

Changes

  • If IRSA is enabled (irsa_enabled: true in the config), the exporter will utilize the default credential provider chain of the AWS SDK.
  • The AWS SDK will automatically use the credentials mounted by IRSA in the pod, bypassing the need for explicit credential handling.
  • In scenarios where IRSA is not enabled, the exporter retains its existing behavior of using a specified IAM role with access key/secret key, ensuring backward compatibility.

@it-percona-cla
Copy link

it-percona-cla commented Oct 23, 2024

CLA assistant check
All committers have signed the CLA.

@michaelbauerinc
Copy link
Author

michaelbauerinc commented Dec 6, 2024

Hey @BupycHuk thanks for the approval. Would you be able to point me in the right direction as to why the CI seems to be stuck here?

It looks like its failing because the tests require an AWS access key, but we have not configured the testing environment on our fork. Is it considered a requirement for us to fully configure/run the tests in our own aws env before merging or am I missing something here?

@BupycHuk
Copy link
Member

BupycHuk commented Dec 6, 2024

Hi, yes, we have not proper environment for rds_exporter tests, we need to fix it.

@michaelbauerinc
Copy link
Author

Gotcha, thanks for the quick feedback 😄

@michaelbauerinc
Copy link
Author

Do you have an estimate when you might have a time to prioritize this?

@BupycHuk BupycHuk merged commit 915aceb into percona:main Dec 13, 2024
1 of 2 checks 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.

3 participants