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 dependencies to Dockerfile #1457

Merged
merged 3 commits into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion dp-terraform/helm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8 as build
ENV HOME=/opt/helm
COPY rhacs-terraform ${HOME}/rhacs-terraform
WORKDIR ${HOME}

RUN curl -L --retry 10 --silent --show-error --fail -o /usr/local/bin/helm \
"https://mirror.openshift.com/pub/openshift-v4/clients/helm/latest/helm-linux-amd64" && \
chmod +x /usr/local/bin/helm && \
helm version

RUN helm repo add external-secrets "https://charts.external-secrets.io/" && \
helm dependencies build ${HOME}/rhacs-terraform

# Workaround for deleting securityContext.runAsUser from the dependent chart
# see: https://github.com/operator-framework/operator-sdk/issues/6635
RUN microdnf install gzip tar && \
curl -L --retry 10 --silent --show-error --fail -o /tmp/yq_linux_amd64.tar.gz \
"https://github.com/mikefarah/yq/releases/download/v4.35.2/yq_linux_amd64.tar.gz" && \
tar -xzf /tmp/yq_linux_amd64.tar.gz ./yq_linux_amd64 && \
mv yq_linux_amd64 /usr/local/bin/yq && \
chmod +x /usr/local/bin/yq && \
rm /tmp/yq_linux_amd64.tar.gz && \
cd rhacs-terraform/charts && for filename in *.tgz; do tar -xf "$filename" && rm -f "$filename"; done && \
yq -i 'del(.securityContext.runAsUser) | del(.webhook.securityContext.runAsUser) | del(.certController.securityContext.runAsUser)' external-secrets/values.yaml


FROM quay.io/operator-framework/helm-operator:v1.32.0

ENV HOME=/opt/helm
COPY watches.yaml ${HOME}/watches.yaml
COPY rhacs-terraform ${HOME}/rhacs-terraform
COPY --from=build ${HOME}/rhacs-terraform ${HOME}/rhacs-terraform
WORKDIR ${HOME}
Loading