Skip to content

Commit

Permalink
image: use /tmp/helm-cache for helm's cache so that it does not
Browse files Browse the repository at this point in the history
try to create /.cache folder which is not allowed in distroless.

Signed-off-by: Muvaffak Onus <me@muvaf.com>
(cherry picked from commit 61456ad)
  • Loading branch information
muvaf authored and github-actions[bot] committed Sep 27, 2022
1 parent 6cf57c9 commit 3c49736
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
PROJECT_NAME := provider-helm
PROJECT_REPO := github.com/crossplane-contrib/$(PROJECT_NAME)

PLATFORMS ?= linux_amd64 linux_arm64
include build/makelib/common.mk

# ====================================================================================
Expand Down
5 changes: 5 additions & 0 deletions cluster/images/provider-helm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ FROM gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d
ARG TARGETOS
ARG TARGETARCH

# distroless does not allow root level folder creations, which helm tries to do.
ENV HELM_CACHE_HOME /tmp/helm-cache
ENV HELM_CONFIG_HOME /tmp/helm-config
ENV HELM_DATA_HOME /tmp/helm-data

ADD bin/$TARGETOS\_$TARGETARCH/provider /usr/local/bin/provider-helm

USER 65532
Expand Down
2 changes: 2 additions & 0 deletions cluster/integration/integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ SA=$("${KUBECTL}" -n crossplane-system get sa -o name | grep provider-helm | sed
echo_step "install example chart"
"${KUBECTL}" apply -f examples/sample/release.yaml
"${KUBECTL}" wait --for=condition=Ready release --all --timeout=1m

echo_step "waiting for wordpress pods to be ready"
"${KUBECTL}" -n wordpress wait --for=condition=Ready pods --all --timeout=3m

echo_sub_step "check namespace label"
Expand Down
2 changes: 1 addition & 1 deletion examples/sample/release-oci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
chart:
name: wordpress
repository: "oci://localhost:5000/helm-charts"
version: 9.3.19
version: 15.2.5
# pullSecretRef:
# name: oci-creds
# namespace: default
Expand Down
2 changes: 1 addition & 1 deletion examples/sample/release-with-patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
chart:
name: wordpress
repository: https://charts.bitnami.com/bitnami
version: 9.3.19
version: 15.2.5
namespace: wordpress
values:
param1: value1
Expand Down
2 changes: 1 addition & 1 deletion examples/sample/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
chart:
name: wordpress
repository: https://charts.bitnami.com/bitnami
version: 15.0.18 ## To use devlopment versions, set ">0.0.0-0"
version: 15.2.5 ## To use devlopment versions, set ">0.0.0-0"
# pullSecretRef:
# name: museum-creds
# namespace: default
Expand Down

0 comments on commit 3c49736

Please sign in to comment.