Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit 74b7a9a

Browse files
6l20ggarri
andcommitted
Fix/migration hook (#18)
* Allow users to not define KEY MANAGER envs * Separate hook env and pre-install, pre-update Bump version to 1.0.8 Co-authored-by: gabriel.garrido <gabriel.garrido@consensys.net>
1 parent 5841fea commit 74b7a9a

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed

Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: v2
33
description: Helm chart for Orchestrate
44
name: orchestrate
55
type: application
6-
version: 1.0.7
6+
version: 1.0.8
77
home: https://docs.orchestrate.consensys.net/
88
icon: https://docs.orchestrate.consensys.net/en/stable/images/logo.svg
99
maintainers:

templates/api/hook-configmap.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{- if .Values.api.enabled }}
2+
---
3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: {{ include "orchestrate.api.fullname" . }}-hook-envmap
7+
labels:
8+
{{- include "orchestrate.api.labels" . | nindent 4 }}
9+
annotations:
10+
{{- include "orchestrate.annotations" . | nindent 4 }}
11+
data:
12+
{{- range $key,$value := .Values.global.environment }}
13+
{{ $key }}: {{ $value | quote }}
14+
{{- end }}
15+
{{- range $key,$value := .Values.api.environment }}
16+
{{ $key }}: {{ $value | quote }}
17+
{{- end }}
18+
{{- end }}

templates/api/hook-secret.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{- if and (.Values.api.enabled) (or .Values.api.environmentSecrets .Values.global.environmentSecrets) }}
2+
---
3+
apiVersion: v1
4+
kind: Secret
5+
metadata:
6+
name: {{ template "orchestrate.api.fullname" . }}-hook-secretmap
7+
labels:
8+
{{- include "orchestrate.api.labels" . | nindent 4 }}
9+
annotations:
10+
{{- include "orchestrate.annotations" . | nindent 4 }}
11+
type: Opaque
12+
data:
13+
{{- range $key,$value := .Values.global.environmentSecrets }}
14+
{{ $key }}: {{ $value | b64enc | quote }}
15+
{{- end }}
16+
{{- range $key,$value := .Values.api.environmentSecrets }}
17+
{{ $key }}: {{ $value | b64enc | quote }}
18+
{{- end }}
19+
{{- end }}
20+

templates/api/init-migrate-hook.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ metadata:
4343
{{- include "orchestrate.api.labels" . | nindent 4 }}
4444
annotations:
4545
{{- include "orchestrate.annotations" . | nindent 4 }}
46-
"helm.sh/hook": pre-install
46+
"helm.sh/hook": pre-install, pre-update
4747
"helm.sh/hook-weight": "10"
4848
"helm.sh/hook-delete-policy": hook-succeeded
4949
spec:

0 commit comments

Comments
 (0)