瀏覽代碼

Create configmap first before running pre-install hook

Waqar Ahmed 4 年之前
父節點
當前提交
607e55894e

+ 0 - 2
charts/chia/1.0.0/templates/NOTES.txt

@@ -1,2 +0,0 @@
-IPFS can be accessed from the following URL:
-http://$node_ip:{{ .Values.service.apiPort }}/webui

+ 2 - 0
charts/chia/1.0.0/templates/deployment.yaml

@@ -13,6 +13,8 @@ spec:
       name: {{ template "common.names.fullname" . }}
       labels: {{ include "common.labels.selectorLabels" . | nindent 8 }}
     spec:
+      # FIXME: Let's please remove hostnetwork when upstream hostport issue is sorted out with kube-router
+      hostNetwork: true
       containers:
         - name: {{ .Chart.Name }}
           {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}

+ 3 - 2
charts/chia/1.0.0/templates/generate-mnemonic.yaml

@@ -15,14 +15,15 @@ spec:
       containers:
       - name: {{ .Chart.Name }}-generate-mnemonic
         {{ include "common.containers.imageConfig" .Values.image | nindent 8 }}
-        volumeMounts: {{- include "common.storage.configureAppVolumeMountsInContainer" . | nindent 10 -}}
+        volumeMounts:{{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 10 }}
+
           - name: generate-mnemonic-configmap
             mountPath: /generate_entrypoint.sh
             readOnly: true
             subPath: entrypoint.sh
         command:
           - "/generate_entrypoint.sh"
-      volumes:  {{- include "common.storage.configureAppVolumes" . | nindent 8 -}}
+      volumes:  {{- include "common.storage.configureAppVolumes" .Values | nindent 8 -}}
         - name: generate-mnemonic-configmap
           configMap:
             defaultMode: 0700

+ 4 - 0
charts/chia/1.0.0/templates/mnemonic-configmap.yaml

@@ -2,6 +2,10 @@ apiVersion: v1
 kind: ConfigMap
 metadata:
   name: "generate-mnemonic-config-map"
+  annotations:
+    "helm.sh/hook": pre-install
+    "helm.sh/hook-weight": "-1"
+    "helm.sh/hook-delete-policy": hook-succeeded
 data:
   entrypoint.sh: |-
     #!/bin/sh