Skip to content

Conversation

@gurchik
Copy link

@gurchik gurchik commented Aug 15, 2025

what

Mounts the AWS credentials and config secrets as individual files within a writable .aws directory, rather than mounting them in a read-only directory.

This PR has no effect if someone mounts an arbitrary AWS secret using .Values.awsSecretName because when doing that there is no way for the Chart to know the contents of the secret so it can't know which files to mount. So in this case there is no change of behavior.

why

The AWS CLI cannot work properly when the .aws directory is read-only. This is a problem since this tool is often needed in Terraform projects. For example, a common way to configure the Helm Terraform provider is to pass in an exec argument which executes the AWS CLI to get Kubernetes credentials. Without this change, that would be impossible as the AWS CLI would error.

tests

I tested my changes by deploying this to my cluster which was previously deploying version 5.18.1 of this Helm Chart.

Values:

aws:
  config: |
    redacted
  credentials: |
    redacted

Before this change:

$ kubectl exec -n atlantis atlantis-0 -- aws sts get-caller-identity

[Errno 30] Read-only file system: '/home/atlantis/.aws/cli'
command terminated with exit code 255

After this change:

$ kubectl exec -n atlantis atlantis-0 -- aws sts get-caller-identity
{
    "UserId": "redacted",
    "Account": "redacted",
    "Arn": "redacted"
}

references

closes #380
resolves dupe #421

@gurchik gurchik requested a review from a team as a code owner August 15, 2025 21:35
Signed-off-by: Derek Gurchik <[email protected]>
@GMartinez-Sisti
Copy link
Member

Hi @gurchik, thank you for the PR. I'll try to take a look at it during the weekend.

@GMartinez-Sisti GMartinez-Sisti added the waiting-for-review Waiting for a review from a maintainer label Aug 21, 2025
@gurchik
Copy link
Author

gurchik commented Sep 17, 2025

@GMartinez-Sisti any update on this? :) I will bump the chart version once it's reviewed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-for-review Waiting for a review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws cli cache directory unwritable

2 participants