From c963649cd5ecea9c6e5ed0b73897765dd87bb599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Lehmann?= Date: Mon, 13 Feb 2023 11:14:49 +0100 Subject: [PATCH] actually pass the init args to the init command --- helm/ipfs/templates/configmap.yaml | 4 ---- helm/ipfs/templates/statefulset.yaml | 14 ++------------ 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/helm/ipfs/templates/configmap.yaml b/helm/ipfs/templates/configmap.yaml index 4275c19..76bcc38 100644 --- a/helm/ipfs/templates/configmap.yaml +++ b/helm/ipfs/templates/configmap.yaml @@ -27,10 +27,6 @@ data: if [ -e "$repo/config" ]; then echo "Found IPFS fs-repo at $repo" else - case "$IPFS_PROFILE" in - "") INIT_ARGS="" ;; - *) INIT_ARGS="--profile=$IPFS_PROFILE" ;; - esac ipfs init $INIT_ARGS ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080 diff --git a/helm/ipfs/templates/statefulset.yaml b/helm/ipfs/templates/statefulset.yaml index bf333a9..eb42208 100644 --- a/helm/ipfs/templates/statefulset.yaml +++ b/helm/ipfs/templates/statefulset.yaml @@ -33,18 +33,6 @@ spec: args: - daemon - --migrate=true - {{- if .Values.init.profiles }} - - --profile={{ .Values.init.profiles | join "," }} - {{- end }} - {{- if .Values.init.algorithm }} - - --algorithm={{ .Values.init.argorithm }} - {{- end }} - {{- if .Values.init.bits }} - - --bits={{ .Values.init.bits }} - {{- end }} - {{- if not (kindIs "invalid" .Values.init.emptyRepo) }} - - --empty-repo={{ .Values.init.emptyRepo }} - {{- end }} ports: - name: swarm containerPort: 4001 @@ -56,6 +44,8 @@ spec: containerPort: 8080 protocol: TCP env: + - name: INIT_ARGS + value: "{{- if .Values.init.profiles }}--profile={{ .Values.init.profiles | join "," }}{{- end }}{{- if .Values.init.algorithm }} --algorithm={{ .Values.init.argorithm }}{{- end }}{{- if .Values.init.bits }} --bits={{ .Values.init.bits }}{{- end }}{{- if not (kindIs "invalid" .Values.init.emptyRepo) }} --empty-repo={{ .Values.init.emptyRepo }}{{- end }}" - name: IPFS_LOGGING value: {{ .Values.log.level }} {{- if .Values.privateNetwork.enabled }}