quintush / helm-unittest

BDD styled unit test framework for Kubernetes Helm charts as a Helm plugin.
MIT License
345 stars 69 forks source link

[Docker image] - Helm Unittest plugin is not available for non-root user #179

Closed miguelchicoespin closed 1 year ago

miguelchicoespin commented 1 year ago

Hi,

I'm trying to use the the docker image to execute the helm-unittest plugin but without the root user and the plugin is not installed.

Running docker run -ti --entrypoint=/bin/sh --volume $(pwd):/apps --rm --user=11001:11001 quintush/helm-unittest note the --user and then helm plugin list there is no pluggin installed

helm plugin list
NAME    VERSION DESCRIPTION

Running same command after creating a container without the --user flat, the expected response is received:

helm plugin list
NAME        VERSION DESCRIPTION
unittest    0.2.9   Unit test for helm chart in YAML with ease to keep your chart functional and robust.

Would it be possible to use the docker image with any non-root user?

quintush commented 1 year ago

Hello @miguelchicoespin,

Creating it a non-root user is a bit harder as the plugin and helm itself require sudo rights to install. However i have managed to setup the pluggin in the folder for all users, so you example docker image should work.

Greetings, @quintush