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

Add helm env variables explicitly to pulumi Dockerfile #4474

Merged
merged 3 commits into from
Apr 27, 2020
Merged

Add helm env variables explicitly to pulumi Dockerfile #4474

merged 3 commits into from
Apr 27, 2020

Conversation

kahkeng
Copy link
Contributor

@kahkeng kahkeng commented Apr 22, 2020

If the HOME environment variable is changed (say when the image is used in Github Actions), helm fails to find the stable repo, which can cause Pulumi to be unable to install helm charts.

Addresses #4397.

Here's an example of the problem before the fix.

Running helm in the original image shows the stable repo that has been added:

$ docker run -it --rm --entrypoint=bash pulumi/pulumi
root@e838f313ee27:/# helm repo list
NAME    URL
stable  https://kubernetes-charts.storage.googleapis.com

But overriding the HOME environment variable (to /home/username instead of `/root) causes an issue:

$ docker run -it --rm --entrypoint=bash -e HOME pulumi/pulumi
root@a822180926ba:/# helm repo list
Error: no repositories to show

After rebuilding the docker image with the fix, we get the desired behavior:

$ docker run -it --rm --entrypoint=bash -e HOME kahkeng/pulumi
root@b6896de32972:/# helm repo list
NAME    URL
stable  https://kubernetes-charts.storage.googleapis.com

Copy link
Member

@lblackstone lblackstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lblackstone lblackstone merged commit 2fbd4c0 into pulumi:master Apr 27, 2020
@lblackstone
Copy link
Member

Thanks for the fix, @kahkeng!

@kahkeng kahkeng deleted the docker_helm_env branch April 29, 2020 17:50
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.

None yet

3 participants