Skip to content

Support EKS IAM Service Accounts (Web identity Providers)

Overview

AWS EKS recently released a new feature where you can have a service account per pod https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html to provide isolation. When s3 cache is configured for the Runner and it's configured to use the IAM roles, it fails to pick up the IAM role and ends up timing out with ERROR: error while generating S3 pre-signed URL error=Get http://169.254.169.254/latest/meta-data/iam/security-credentials: dial tcp 169.254.169.254:80: i/o timeout.

In GitLab Runner we are using the minio-go SDK to connect with AWS, and it seems like Web identity Providers are not supported https://github.com/minio/minio-go/issues/1156 because the IAM token path is exposed with a new environment variable AWS_WEB_IDENTITY_TOKEN_FILE. So our dependency does not support Web identity providers on EKS.

Proposal