From 607e55894edf563f9e0da3c833f278d22adc9969 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Sat, 8 May 2021 09:07:46 +0500 Subject: [PATCH] Create configmap first before running pre-install hook --- charts/chia/1.0.0/templates/NOTES.txt | 2 -- charts/chia/1.0.0/templates/deployment.yaml | 2 ++ charts/chia/1.0.0/templates/generate-mnemonic.yaml | 5 +++-- charts/chia/1.0.0/templates/mnemonic-configmap.yaml | 4 ++++ 4 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 charts/chia/1.0.0/templates/NOTES.txt diff --git a/charts/chia/1.0.0/templates/NOTES.txt b/charts/chia/1.0.0/templates/NOTES.txt deleted file mode 100644 index cb1d892a3b..0000000000 --- a/charts/chia/1.0.0/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -IPFS can be accessed from the following URL: -http://$node_ip:{{ .Values.service.apiPort }}/webui diff --git a/charts/chia/1.0.0/templates/deployment.yaml b/charts/chia/1.0.0/templates/deployment.yaml index 230c4d8ec0..abd836d571 100644 --- a/charts/chia/1.0.0/templates/deployment.yaml +++ b/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 }} diff --git a/charts/chia/1.0.0/templates/generate-mnemonic.yaml b/charts/chia/1.0.0/templates/generate-mnemonic.yaml index 9c766eb585..1f3575ec84 100644 --- a/charts/chia/1.0.0/templates/generate-mnemonic.yaml +++ b/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 diff --git a/charts/chia/1.0.0/templates/mnemonic-configmap.yaml b/charts/chia/1.0.0/templates/mnemonic-configmap.yaml index 72406aa691..1f706015fc 100644 --- a/charts/chia/1.0.0/templates/mnemonic-configmap.yaml +++ b/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