From fcf6919479fb33a2f96a6dc3a5eb364fa3c3a895 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Sun, 24 Oct 2021 20:20:06 +0500 Subject: [PATCH] Setup correct permissions for lotus paths --- test/filecoin/1.0.0/questions.yaml | 2 +- test/filecoin/1.0.0/templates/deployment.yaml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/test/filecoin/1.0.0/questions.yaml b/test/filecoin/1.0.0/questions.yaml index 94e086e13d..1a89529dad 100644 --- a/test/filecoin/1.0.0/questions.yaml +++ b/test/filecoin/1.0.0/questions.yaml @@ -58,7 +58,7 @@ questions: schema: type: hostpath required: true - - variable: parameterCache + - variable: parametercache label: "Filecoin Parameter Cache Volume" schema: type: dict diff --git a/test/filecoin/1.0.0/templates/deployment.yaml b/test/filecoin/1.0.0/templates/deployment.yaml index 69a2fb6cf5..e5b1e7e103 100644 --- a/test/filecoin/1.0.0/templates/deployment.yaml +++ b/test/filecoin/1.0.0/templates/deployment.yaml @@ -17,9 +17,19 @@ spec: spec: # FIXME: Let's please remove hostnetwork when upstream hostport issue is sorted out with kube-router hostNetwork: {{ include "hostNetworkingEnabled" . }} + initContainers: + - name: fil-init + image: "debian:bullseye-slim" + imagePullPolicy: "IfNotPresent" + command: ['sh', '-c', "chown -R 532:532 {{ .Values.appVolumeMounts.data.mountPath }} {{ .Values.appVolumeMounts.parametercache.mountPath }}"] + {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} containers: - name: {{ .Chart.Name }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + command: + - "sh" + - "-c" + - "/docker-lotus-entrypoint.sh -help && sleep infinity" volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} - name: extrappvolume-{{ $index }}