From 3c4e56162ae78da7cb3566ca6c6e7513fd016fee Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 14 Feb 2024 16:03:35 +0900 Subject: [PATCH] introduce storage/storageclassname values --- templates/helm/templates/blockscout.yaml | 6 +++++- templates/helm/templates/env.yaml | 8 ++++---- templates/helm/templates/genesis-pvc.yaml | 6 +++++- templates/helm/templates/node.yaml | 12 ++++++++++-- templates/helm/templates/sequencer.yaml | 12 ++++++++++-- templates/helm/values.yaml | 24 +++++++++++++++++++---- 6 files changed, 54 insertions(+), 14 deletions(-) diff --git a/templates/helm/templates/blockscout.yaml b/templates/helm/templates/blockscout.yaml index 8835cd4..1af57d4 100644 --- a/templates/helm/templates/blockscout.yaml +++ b/templates/helm/templates/blockscout.yaml @@ -213,7 +213,11 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi + storage: {{ .Values.blockscout.db.storage }} + {{- if .Values.blockscout.db.storageClassName }} + storageClassName: {{ .Values.blockscout.db.storageClassName }} + {{ end }} + volumeMode: Filesystem --- diff --git a/templates/helm/templates/env.yaml b/templates/helm/templates/env.yaml index 347ff7b..acb9d4f 100644 --- a/templates/helm/templates/env.yaml +++ b/templates/helm/templates/env.yaml @@ -9,7 +9,7 @@ data: --- -{{ if .Values.externalSecret.enabled }} +{{- if .Values.externalSecret.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: ExternalSecret metadata: @@ -27,9 +27,9 @@ spec: - extract: {{- if .Values.externalSecret.prefix }} key: {{ .Values.externalSecret.prefix }}/private-keys - {{- else }} + {{ else }} key: {{ $.Release.Namespace }}/{{ $.Release.Name }}/private-keys - {{- end }} + {{ end }} {{ else }} apiVersion: v1 kind: Secret @@ -46,7 +46,7 @@ type: Opaque --- -{{ if .Values.externalSecret.enabled }} +{{- if .Values.externalSecret.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: SecretStore metadata: diff --git a/templates/helm/templates/genesis-pvc.yaml b/templates/helm/templates/genesis-pvc.yaml index 30d352a..99f726b 100644 --- a/templates/helm/templates/genesis-pvc.yaml +++ b/templates/helm/templates/genesis-pvc.yaml @@ -8,4 +8,8 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi + storage: {{ .Values.genesis.volume.storage }} + {{- if .Values.global.storageClassName }} + storageClassName: {{ .Values.global.storageClassName }} + {{ end }} + volumeMode: Filesystem diff --git a/templates/helm/templates/node.yaml b/templates/helm/templates/node.yaml index b941f87..db94fbb 100644 --- a/templates/helm/templates/node.yaml +++ b/templates/helm/templates/node.yaml @@ -137,7 +137,11 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi + storage: {{ .Values.nodes.opGeth.volume.storage }} + {{- if .Values.global.storageClassName }} + storageClassName: {{ .Values.global.storageClassName }} + {{ end }} + volumeMode: Filesystem - metadata: name: op-node-volume spec: @@ -145,7 +149,11 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi + storage: {{ .Values.nodes.opNode.volume.storage }} + {{- if .Values.global.storageClassName }} + storageClassName: {{ .Values.global.storageClassName }} + {{ end }} + volumeMode: Filesystem --- diff --git a/templates/helm/templates/sequencer.yaml b/templates/helm/templates/sequencer.yaml index b5a938b..255f9cd 100644 --- a/templates/helm/templates/sequencer.yaml +++ b/templates/helm/templates/sequencer.yaml @@ -200,7 +200,11 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi + storage: {{ .Values.sequencer.opGeth.volume.storage }} + {{ if .Values.global.storageClassName }} + storageClassName: {{ .Values.global.storageClassName }} + {{ end }} + volumeMode: Filesystem - metadata: name: op-node-volume spec: @@ -208,7 +212,11 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi + storage: {{ .Values.sequencer.opNode.volume.storage }} + {{- if .Values.global.storageClassName }} + storageClassName: {{ .Values.global.storageClassName }} + {{ end }} + volumeMode: Filesystem --- diff --git a/templates/helm/values.yaml b/templates/helm/values.yaml index 629b94e..c53c342 100644 --- a/templates/helm/values.yaml +++ b/templates/helm/values.yaml @@ -1,6 +1,16 @@ +global: {} + externalSecret: enabled: false +genesis: + volume: + storage: 100Mi + genesisDeployer: + image: &genesis-deployer-image ghcr.io/planetarium/mothership-l2launcher-genesis-deployer:latest + genesisInitPredeploy: + image: &genesis-init-predeploy-image ghcr.io/planetarium/mothership-l2launcher-genesis-init-predeploy:latest + nodes: replicas: 1 opGeth: @@ -9,25 +19,29 @@ nodes: rpc: 8545 wsrpc: 8546 authrpc: 8551 + volume: &op-geth-volume + storage: 100Gi opNode: image: &op-node-image us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.4.2 port: &op-node-port rpc: 8547 p2p: 9222 - genesisDeployer: - image: &genesis-deployer-image ghcr.io/planetarium/mothership-l2launcher-genesis-deployer:latest - genesisInitPredeploy: - image: &genesis-init-predeploy-image ghcr.io/planetarium/mothership-l2launcher-genesis-init-predeploy:latest + volume: &op-node-volume + storage: 100Mi sequencer: opGeth: image: *op-geth-image port: <<: *op-geth-port + volume: + <<: *op-geth-volume opNode: image: *op-node-image port: <<: *op-node-port + volume: + <<: *op-node-volume genesisDeployer: image: *genesis-deployer-image genesisInitPredeploy: @@ -45,3 +59,5 @@ opProposer: blockscout: port: 5000 + db: + storage: 10Gi