Browse Source

storj - do not rerun setup if the file exists (#2241)

Stavros Kois 1 năm trước cách đây
mục cha
commit
d07689902b

+ 2 - 2
library/ix-dev/charts/storj/Chart.yaml

@@ -3,10 +3,10 @@ description: Share your storage on the internet and earn.
 annotations:
   title: Storj
 type: application
-version: 2.0.0
+version: 2.0.1
 apiVersion: v2
 appVersion: v1.68.2
-kubeVersion: '>=1.16.0-0'
+kubeVersion: ">=1.16.0-0"
 maintainers:
   - name: truenas
     url: https://www.truenas.com/

+ 7 - 9
library/ix-dev/charts/storj/templates/_storj.tpl

@@ -16,14 +16,6 @@ workload:
             runAsUser: {{ .Values.storjRunAs.user }}
             runAsGroup: {{ .Values.storjRunAs.group }}
             readOnlyRootFilesystem: false
-            # capabilities:
-            #   add:
-            #     - CHOWN
-            #     - DAC_OVERRIDE
-            #     - FOWNER
-            #     - SETGID
-            #     - SETUID
-            #     - KILL
           {{- include "storj.args" $ | nindent 10 }}
           envFrom:
             - secretRef:
@@ -89,5 +81,11 @@ workload:
             - /bin/sh
             - -c
             - |
-              test ! -f /app/config/config.yaml && export SETUP="true"; /entrypoint
+              if test ! -f /app/config/config.yaml; then
+                echo "Setting up Storj"
+                export SETUP="true"
+                /entrypoint
+              else
+                echo "Storj already setup"
+              fi
 {{- end -}}