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

neonvm: add support for mounting service account tokens #1316

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

conradludgate
Copy link
Contributor

@conradludgate conradludgate commented Mar 11, 2025

Service account tokens can be created by kubernetes and automatically mounted to the pod using a projected volume: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#launch-a-pod-using-service-account-token-projection.

In EKS and AKS, there is a separate mechanism that watches pods for their service accounts, and adds a projection volumemount if that service account has an IAM policy in the annotations. https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html#_step_2_create_and_associate_iam_role. Since we don't control the volume, I've added an implicit disk source to handle this.

Using the sync mechanism, we can then mirror those into the VM.

Copy link

github-actions bot commented Mar 11, 2025

No changes to the coverage.

HTML Report

Click to open

@conradludgate
Copy link
Contributor Author

Hmm. This doesn't yet work for accessing the aws-iam-token volume mount which is automatically created for us. I'll have to think more for a potential solution. Ideally we'd have some way to encode that "this volumemount already exists, but please watch it anyway". Maybe a "none" disk?

Additionally, if the VM wants access to the kubernetes API (why??) then we would need to somehow get the local kubernetes API endpoint into the VM - I imagine we don't need this

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.

1 participant