Skip to content

Commit 91ec3d3

Browse files
authored
Fix helm (#703)
* Allow non-root users to read helm repo cache * Fix helm config-user deployment
1 parent 7ed5972 commit 91ec3d3

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@ RUN apk add --no-cache \
2323
python3-dev=3.6.8-r0 \
2424
libressl-dev=2.7.5-r0 \
2525
libstdc++=6.4.0-r9 \
26-
postgresql-dev=10.8-r0 \
27-
postgresql-client=10.8-r0
26+
postgresql-dev \
27+
postgresql-client
2828

2929
# download and install helm
3030
COPY docker/helm-repositories.yaml /tmp/helm/repository/repositories.yaml
3131
RUN wget ${HELM_BASEURL}/${HELM_TARBALL} -nv -O - | \
3232
tar xz -C /usr/local/bin --strip 1 linux-amd64/helm && \
3333
helm init --client-only && \
34-
helm repo update
34+
helm repo update && \
35+
chown -R root:controlpanel ${HELM_HOME} && \
36+
chmod -R g+rwX ${HELM_HOME}
3537

3638
# install python dependencies (and then remove build dependencies)
3739
COPY requirements.lock manage.py ./

controlpanel/api/cluster.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ def initialize_user(user):
101101
helm.upgrade_release(
102102
f"config-user-{user.slug}",
103103
"mojanalytics/config-user",
104-
"--namespace=user-{user.slug}",
105-
"--set=Username={user.slug}",
104+
f"--namespace=user-{user.slug}",
105+
f"--set=Username={user.slug}",
106106
)
107107

108108

0 commit comments

Comments
 (0)