Skip to content

fix: propagate env var to nginx.conf in order to use IAM for Service Account properly #415

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

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

Conversation

cHiv0rz
Copy link

@cHiv0rz cHiv0rz commented Jun 17, 2025

Proposed changes

Contribute to issue #414.

IAM credentials are not working, when the awscredentials.js script is trying to read the environmental variables, and those are not present. By this change, we propagate the environmental variables to nginx, and it will be possible to use the credentials provided by the SA account

Checklist

Before creating a pull request (PR), run through this checklist and mark each as complete:

@cHiv0rz cHiv0rz requested a review from a team as a code owner June 17, 2025 16:56
Copy link

github-actions bot commented Jun 17, 2025

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@cHiv0rz
Copy link
Author

cHiv0rz commented Jun 17, 2025

I have hereby read the F5 CLA and agree to its terms

@jarojasm95
Copy link

jarojasm95 commented Jun 23, 2025

until this is merged I am using this script to workaround the issue during container startup

contents="env AWS_ROLE_ARN;env AWS_ROLE_SESSION_NAME;env AWS_STS_REGIONAL_ENDPOINTS;env AWS_REGION;env AWS_WEB_IDENTITY_TOKEN_FILE;";
sed -i "16i${contents}" /etc/nginx/nginx.conf;

in case it's helpful for anyone running into this

@cHiv0rz
Copy link
Author

cHiv0rz commented Jun 23, 2025

thanks @jarojasm95 ! I've made another workaround, creating a configmap for nginx.conf file, and mounting into /etc/nginx folder. It works as well

@erdi
Copy link

erdi commented Jun 24, 2025

Any chance you could please have a look if this PR could be accepted, @dekobon?

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