diff --git a/charts/rpc-node/Chart.yaml b/charts/rpc-node/Chart.yaml index cd51ff8..9abea34 100644 --- a/charts/rpc-node/Chart.yaml +++ b/charts/rpc-node/Chart.yaml @@ -15,7 +15,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. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.3 +version: 0.4.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/rpc-node/templates/consensus-configmap.yaml b/charts/rpc-node/templates/consensus-configmap.yaml new file mode 100644 index 0000000..850b79c --- /dev/null +++ b/charts/rpc-node/templates/consensus-configmap.yaml @@ -0,0 +1,11 @@ +{{- if .Values.consensus.configFiles.enabled }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "rpc-node.fullname" . }}-consensus-files +data: + {{- range $key, $value := .Values.consensus.configFiles.content }} + {{ $key }}: {{ toYaml $value | indent 2 }} + {{- end }} +{{- end }} diff --git a/charts/rpc-node/templates/consensus-stateful-set.yaml b/charts/rpc-node/templates/consensus-stateful-set.yaml index 23e32d3..9c55132 100644 --- a/charts/rpc-node/templates/consensus-stateful-set.yaml +++ b/charts/rpc-node/templates/consensus-stateful-set.yaml @@ -99,7 +99,7 @@ spec: {{- toYaml .Values.consensus.readinessProbe | nindent 12 }} resources: {{- toYaml .Values.consensus.resources | nindent 12 }} - {{- if or .Values.consensus.persistence.enabled .Values.consensus.volumeMounts .Values.config.jwtsecret.enabled }} + {{- if or .Values.consensus.persistence.enabled .Values.consensus.volumeMounts .Values.config.jwtsecret.enabled .Values.consensus.configFiles.enabled }} volumeMounts: {{- if .Values.consensus.persistence.enabled }} - name: consensus-data @@ -110,17 +110,26 @@ spec: mountPath: /app/config/jwtsecret subPath: jwtsecret {{- end }} + {{- if .Values.consensus.configFiles.enabled }} + - name: configfiles + mountPath: {{ .Values.consensus.configFiles.mountPath }} + {{- end }} {{- with .Values.consensus.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} {{- end }} - {{- if or .Values.consensus.volumes .Values.config.jwtsecret.enabled }} + {{- if or .Values.consensus.volumes .Values.config.jwtsecret.enabled .Values.consensus.configFiles.enabled }} volumes: {{- if .Values.config.jwtsecret.enabled }} - name: jwtsecret secret: secretName: {{ include "rpc-node.fullname" . }}-jwtsecret {{- end }} + {{- if .Values.consensus.configFiles.enabled }} + - name: configfiles + configMap: + name: {{ include "rpc-node.fullname" . }}-consensus-files + {{- end }} {{- with .Values.consensus.volumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/rpc-node/templates/execution-configmap.yaml b/charts/rpc-node/templates/execution-configmap.yaml new file mode 100644 index 0000000..9b7d0a9 --- /dev/null +++ b/charts/rpc-node/templates/execution-configmap.yaml @@ -0,0 +1,11 @@ +{{- if .Values.execution.configFiles.enabled }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "rpc-node.fullname" . }}-execution-files +data: + {{- range $key, $value := .Values.execution.configFiles.content }} + {{ $key }}: {{ toYaml $value | indent 2 }} + {{- end }} +{{- end }} diff --git a/charts/rpc-node/templates/execution-stateful-set.yaml b/charts/rpc-node/templates/execution-stateful-set.yaml index 0903346..6bddeb8 100644 --- a/charts/rpc-node/templates/execution-stateful-set.yaml +++ b/charts/rpc-node/templates/execution-stateful-set.yaml @@ -98,7 +98,7 @@ spec: {{- toYaml .Values.execution.readinessProbe | nindent 12 }} resources: {{- toYaml .Values.execution.resources | nindent 12 }} - {{- if or .Values.execution.persistence.enabled .Values.execution.volumeMounts .Values.config.jwtsecret.enabled }} + {{- if or .Values.execution.persistence.enabled .Values.execution.volumeMounts .Values.config.jwtsecret.enabled .Values.execution.configFiles.enabled }} volumeMounts: {{- if .Values.execution.persistence.enabled }} - name: execution-data @@ -109,17 +109,26 @@ spec: mountPath: /app/config/jwtsecret subPath: jwtsecret {{- end }} + {{- if .Values.execution.configFiles.enabled }} + - name: configfiles + mountPath: {{ .Values.execution.configFiles.mountPath }} + {{- end }} {{- with .Values.execution.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} {{- end }} - {{- if or .Values.execution.volumes .Values.config.jwtsecret.enabled }} + {{- if or .Values.execution.volumes .Values.config.jwtsecret.enabled .Values.execution.configFiles.enabled }} volumes: {{- if .Values.config.jwtsecret.enabled }} - name: jwtsecret secret: secretName: {{ include "rpc-node.fullname" . }}-jwtsecret {{- end }} + {{- if .Values.execution.configFiles.enabled }} + - name: configfiles + configMap: + name: {{ include "rpc-node.fullname" . }}-execution-files + {{- end }} {{- with .Values.execution.volumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/rpc-node/values.yaml b/charts/rpc-node/values.yaml index d109e4e..3f2f5e8 100644 --- a/charts/rpc-node/values.yaml +++ b/charts/rpc-node/values.yaml @@ -147,6 +147,12 @@ execution: port: metrics path: /debug/metrics/prometheus + configFiles: + enabled: false + #content: + # genesis.json: |- + # ... + #mountPath: /app/config # Additional volumes on the output Deployment definition. volumes: [] # - name: foo @@ -273,6 +279,12 @@ consensus: periodSeconds: 30 timeoutSeconds: 15 + configFiles: + enabled: false + #content: + # genesis.json: |- + # ... + #mountPath: /app/config # Additional volumes on the output Deployment definition. volumes: [] # - name: foo