From 1918b7975f1ed37bdaa441783ec2159e93832175 Mon Sep 17 00:00:00 2001 From: Ivan Vandot Date: Thu, 26 May 2022 12:23:54 +0200 Subject: [PATCH 1/2] feat: add extraInitContainer to geth-swap --- charts/geth-swap/Chart.yaml | 2 +- charts/geth-swap/templates/statefulset.yaml | 7 +++++++ charts/geth-swap/values.yaml | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/charts/geth-swap/Chart.yaml b/charts/geth-swap/Chart.yaml index c73265c..630b356 100644 --- a/charts/geth-swap/Chart.yaml +++ b/charts/geth-swap/Chart.yaml @@ -20,7 +20,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.3.3 +version: 0.3.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/charts/geth-swap/templates/statefulset.yaml b/charts/geth-swap/templates/statefulset.yaml index 2c2c048..32b5345 100644 --- a/charts/geth-swap/templates/statefulset.yaml +++ b/charts/geth-swap/templates/statefulset.yaml @@ -39,7 +39,9 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if or .Values.geth-setup .Values.extraInitContainers }} initContainers: + {{- if .Values.geth-setup }} - name: geth-setup image: "{{ include "geth-swap.image" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} @@ -55,6 +57,11 @@ spec: mountPath: /etc/config - name: data mountPath: /root/.ethereum + {{- end }} + {{- if .Values.extraInitContainers }} + {{- toYaml .Values.extraInitContainers | nindent 8 }} + {{- end }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ include "geth-swap.image" . }}" diff --git a/charts/geth-swap/values.yaml b/charts/geth-swap/values.yaml index 5fa0ab8..d36fa97 100644 --- a/charts/geth-swap/values.yaml +++ b/charts/geth-swap/values.yaml @@ -18,6 +18,8 @@ imageSetupContract: tag: latest pullPolicy: Always +geth-setup: true + geth: cache: 512 genesis: @@ -59,6 +61,12 @@ service: port: 8545 wsport: 8546 +extraInitContainers: [] +## Extra init containers to be added to the bee pod. +# - name: extra-init-container +# image: busybox:latest +# command: ['sh', '-c', 'echo hello'] + ingress: enabled: false annotations: {} From 11b7d9ffa72b6a38492b1a1075b5eef97a9d2091 Mon Sep 17 00:00:00 2001 From: Ivan Vandot Date: Thu, 26 May 2022 12:29:54 +0200 Subject: [PATCH 2/2] fix: fix typo --- charts/geth-swap/templates/statefulset.yaml | 4 ++-- charts/geth-swap/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/geth-swap/templates/statefulset.yaml b/charts/geth-swap/templates/statefulset.yaml index 32b5345..175c742 100644 --- a/charts/geth-swap/templates/statefulset.yaml +++ b/charts/geth-swap/templates/statefulset.yaml @@ -39,9 +39,9 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- if or .Values.geth-setup .Values.extraInitContainers }} + {{- if or .Values.gethSetup .Values.extraInitContainers }} initContainers: - {{- if .Values.geth-setup }} + {{- if .Values.gethSetup }} - name: geth-setup image: "{{ include "geth-swap.image" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} diff --git a/charts/geth-swap/values.yaml b/charts/geth-swap/values.yaml index d36fa97..f3d1eb1 100644 --- a/charts/geth-swap/values.yaml +++ b/charts/geth-swap/values.yaml @@ -18,7 +18,7 @@ imageSetupContract: tag: latest pullPolicy: Always -geth-setup: true +gethSetup: true geth: cache: 512