-
-
Notifications
You must be signed in to change notification settings - Fork 93
Make Helm Plugins available to all users #62
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
base: master
Are you sure you want to change the base?
Conversation
@ozbillwang Sorry, I noticed you gave it a 👍 but I don't know if you need anything else to merge this. If you do, feel free to share here and I'll get on it right away. |
Thank you for the PR; it shows promise. I'll need some time to verify the changes, so please be patient. |
So the default path is second, I didn't see the different with the Dockerfile you changed
|
That is strange. Did you build the image with a newer version of Helm? I've noticed that the default version on the Dockerfile is too old and does not support the environment variable:
Maybe we should consider updating the default versions on the ARGs? |
Also, as a separate suggestion, maybe we can introduce some smoke tests during image build to help with these base verifications. Something like this: RUN helm plugin install https://github.com/helm-unittest/helm-unittest && \
rm -rf /tmp/helm-* && \
helm unittest --help # This command will fail if the plugin is not installed properly and break the docker build. I can probably whip this up in another PR. |
let me check, seems I build with old version of helm. The latest is:
The Dockerfile need be reviewed, because several part has hardcoding the path of helm plugin and try to clean it. We need adjust them as well. https://github.com/alpine-docker/k8s/blob/master/Dockerfile#L40-L42 |
I've adjusted the removal of /apps $ helm env
HELM_BIN="helm"
HELM_BURST_LIMIT="100"
HELM_CACHE_HOME="/.cache/helm"
HELM_CONFIG_HOME="/.config/helm"
HELM_DATA_HOME="/.local/share/helm"
HELM_DEBUG="false"
HELM_KUBEAPISERVER=""
HELM_KUBEASGROUPS=""
HELM_KUBEASUSER=""
HELM_KUBECAFILE=""
HELM_KUBECONTEXT=""
HELM_KUBEINSECURE_SKIP_TLS_VERIFY="false"
HELM_KUBETLS_SERVER_NAME=""
HELM_KUBETOKEN=""
HELM_MAX_HISTORY="10"
HELM_NAMESPACE="default"
HELM_PLUGINS="/helm-plugins"
HELM_REGISTRY_CONFIG="/.config/helm/registry/config.json"
HELM_REPOSITORY_CACHE="/.cache/helm/repository"
HELM_REPOSITORY_CONFIG="/.config/helm/repositories.yaml" and as the root user: /apps # helm env
HELM_BIN="helm"
HELM_BURST_LIMIT="100"
HELM_CACHE_HOME="/root/.cache/helm"
HELM_CONFIG_HOME="/root/.config/helm"
HELM_DATA_HOME="/root/.local/share/helm"
HELM_DEBUG="false"
HELM_KUBEAPISERVER=""
HELM_KUBEASGROUPS=""
HELM_KUBEASUSER=""
HELM_KUBECAFILE=""
HELM_KUBECONTEXT=""
HELM_KUBEINSECURE_SKIP_TLS_VERIFY="false"
HELM_KUBETLS_SERVER_NAME=""
HELM_KUBETOKEN=""
HELM_MAX_HISTORY="10"
HELM_NAMESPACE="default"
HELM_PLUGINS="/helm-plugins"
HELM_REGISTRY_CONFIG="/root/.config/helm/registry/config.json"
HELM_REPOSITORY_CACHE="/root/.cache/helm/repository"
HELM_REPOSITORY_CONFIG="/root/.config/helm/repositories.yaml" |
Hi, it's been a few days, I believe I've adjusted what needs adjusting, unless you want me to update the default versions for the |
When running the image as a non-root user, the helm plugins can't be found because they are normally located at the user's home folder. During installation, they are installed to
/root
, which is not globally readable:But if we configure the
HELM_PLUGINS
environment variable, Helm will install AND look for the plugins at that folder. By making the folder globally readable, we allow any user to use the plugins (without being able to modify them):This is a much simpler change than #55 but should already help with people using the image in CI/CD environments where one can't use the root user.