Create configmap first before running pre-install hook

This commit is contained in:
Waqar Ahmed
2021-05-08 09:07:46 +05:00
parent bd77438bf5
commit 607e55894e
4 changed files with 9 additions and 4 deletions

View File

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

View File

@@ -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 }}

View File

@@ -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

View File

@@ -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