generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 11
Add bootstrap changes to support eks-pod-identity-agent with IAM-RA #13
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
Merged
yeazelm
merged 1 commit into
bottlerocket-os:develop
from
abhay-krishna:pod-identity-agent-support
Apr 28, 2025
Merged
Add bootstrap changes to support eks-pod-identity-agent with IAM-RA #13
yeazelm
merged 1 commit into
bottlerocket-os:develop
from
abhay-krishna:pod-identity-agent-support
Apr 28, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jpculp
reviewed
Apr 22, 2025
jpculp
reviewed
Apr 22, 2025
bcressey
reviewed
Apr 22, 2025
bcressey
reviewed
Apr 22, 2025
1a099e7 to
1a84c1b
Compare
bcressey
reviewed
Apr 23, 2025
1a84c1b to
478e197
Compare
bcressey
reviewed
Apr 23, 2025
478e197 to
6ce49a6
Compare
bcressey
approved these changes
Apr 23, 2025
59986e7 to
cff7290
Compare
cff7290 to
98f593b
Compare
jpculp
approved these changes
Apr 24, 2025
bcressey
approved these changes
Apr 24, 2025
yeazelm
approved these changes
Apr 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The eks-pod-identity-agent add-on requires AWS credentials to call the EKS Auth
AssumeRoleForPodIdentityAPI which enables it to grant AWS resource access (based on the permissions of the assumed role) to other Pods in the cluster. The eks-pod-identity-agent Daemonset for Bottlerocket hybrid nodes mounts the host path/var/eks-hybrid/.awsto consume AWS credentials present on the host at/var/eks-hybrid/.aws/credentials. We need some process that creates this credentials file and manages the rotation of these credentials. In case of the SSM credentials provider, the Bottlerocket control container generates a credentials file which is symlinked to/var/eks-hybrid/.awson the host, and theamazon-ssm-agentrefreshes these credentials every 30 minutes or so. We follow the symlink approach in nodeadm as well, albeit without the added abstraction of the control container.To achieve the same in the IAM-RA credentials provider, we are adding a systemd unit file which runs the
aws_signing_helper updatecommand. his aligns with what nodeadm does to get pod-identity-agent working in other operating systems. This command creates (first invocation only) the AWS credentials file (/root/.aws/credentialsby default but we're overriding this to/var/eks-hybrid/.aws/credentials) with temporary credentials and continuously updates them through a call to the IAM Roles AnywhereCreateSessionAPI five minutes before the previous set of credentials are set to expire.Changes:
aws_signing_helper updatecommand. The systemd unit file is added as a template in the bootstrap container during build time, and the actual unit file is created on-the-fly through the script. For creating the unit file, I went with the approach of simply extracting the entireaws_signing_helper credential-processcommand from thecredential_processfield and replacing thecredential-processwith theupdatecommand. I did this to align with the values used in thecredential_processfield of the input AWS config and in favor of avoiding requiring the user to pass in additional arguments that they've already passed in the instance user-data.gettextto the list of installed packages, to be able to use theenvsubstcommand.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.