Skip to content

Commit

Permalink
chore(charts): rollupName templates (#1458)
Browse files Browse the repository at this point in the history
## Summary
Changes to the value used for naming in volumes and storage

## Background
The volume and storage class has a bug for production deployment where
rollup name is not being set properly

## Changes
- use templated global rollup name value instead of old one
- removes unused blockscout storage and volume

## Testing
run locally, against devdev

This unblocks an issue with preview environments
  • Loading branch information
quasystaty1 authored Sep 6, 2024
1 parent 82dec3a commit f46d7f5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 73 deletions.
2 changes: 1 addition & 1 deletion charts/evm-rollup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.26.1
version: 0.26.2

# 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
Expand Down
13 changes: 1 addition & 12 deletions charts/evm-rollup/templates/storageclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: {{ $.Values.config.rollup.name }}-{{ $value.persistentVolumeName }}-geth-local
name: {{ include "rollup.name" $ }}-{{ $value.persistentVolumeName }}-geth-local
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain
{{- if $.Values.config.blockscout.enabled }}
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: {{ $.Values.config.rollup.name }}-{{ $value.persistentVolumeName }}-blockscout-local
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain
---
{{- end }}
{{- end }}
{{- end }}
60 changes: 5 additions & 55 deletions charts/evm-rollup/templates/volumes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ $.Values.config.rollup.name }}-{{ $value.persistentVolumeName }}-geth-pv
name: {{ include "rollup.name" $ }}-{{ $value.persistentVolumeName }}-geth-pv
spec:
capacity:
storage: {{ $value.size }}
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: {{ $.Values.config.rollup.name }}-{{ $value.persistentVolumeName }}-geth-local
storageClassName: {{ include "rollup.name" $ }}-{{ $value.persistentVolumeName }}-geth-local
local:
path: {{ $value.path }}
nodeAffinity:
Expand All @@ -27,45 +27,19 @@ spec:
- astria-dev-cluster-control-plane
- astria-dev-cluster-worker
---
{{- if $.Values.config.blockscout.enabled }}
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ $.Values.config.rollup.name }}-{{ $value.persistentVolumeName }}-blockscout-pv
spec:
capacity:
storage: {{ $value.size }}
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: {{ $.Values.config.rollup.name }}-{{ $value.persistentVolumeName }}-blockscout-local
local:
path: {{ $value.path }}
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- astria-dev-cluster-control-plane
- astria-dev-cluster-worker
---
{{- end }}
{{- end }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ $.Values.config.rollup.name }}-{{ $value.persistentVolumeName }}-pvc-geth
name: {{ include "rollup.name" $ }}-{{ $value.persistentVolumeName }}-pvc-geth
namespace: {{ include "rollup.namespace" $ }}
labels:
"app.kubernetes.io/name": "{{ $.Values.config.rollup.name }}-{{ $.Chart.Name }}"
"app.kubernetes.io/name": "{{ include "rollup.name" $ }}-{{ $.Chart.Name }}"
"app.kubernetes.io/managed-by": {{ $.Release.Service | quote }}
"helm.sh/chart": {{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }}
spec:
{{- if $.Values.storage.local }}
storageClassName: {{ $.Values.config.rollup.name }}-{{ $value.persistentVolumeName }}-geth-local
storageClassName: {{ include "rollup.name" $ }}-{{ $value.persistentVolumeName }}-geth-local
{{- end }}
{{- if $value.storageClassName }}
storageClassName: {{ $value.storageClassName }}
Expand All @@ -76,29 +50,5 @@ spec:
requests:
storage: {{ $value.size }}
---
{{- if $.Values.config.blockscout.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ $.Values.config.rollup.name }}-{{ $value.persistentVolumeName }}-pvc-blockscout
namespace: {{ include "rollup.namespace" $ }}
labels:
"app.kubernetes.io/name": {{ $.Values.config.rollup.name }}-{{ $.Chart.Name }}
"app.kubernetes.io/managed-by": {{ $.Release.Service | quote }}
"helm.sh/chart": {{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }}
spec:
{{- if $.Values.storage.local }}
storageClassName: {{ $.Values.config.rollup.name }}-{{ $value.persistentVolumeName }}-blockscout-local
{{- end }}
{{- if $value.storageClassName }}
storageClassName: {{ $value.storageClassName }}
{{- end }}
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ $value.size }}
---
{{- end }}
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/evm-stack/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies:
version: 0.3.6
- name: evm-rollup
repository: file://../evm-rollup
version: 0.26.1
version: 0.26.2
- name: composer
repository: file://../composer
version: 0.1.2
Expand All @@ -20,5 +20,5 @@ dependencies:
- name: blockscout-stack
repository: https://blockscout.github.io/helm-charts
version: 1.6.2
digest: sha256:b964035934951500ea972b9f38aaeaac37180523acee810ad1b17ae8641d81f4
generated: "2024-08-29T20:24:02.892112-04:00"
digest: sha256:d9eba8331d5b2adadb63118a62342f469a30387a7edb290047ff1bcd35d5d4f8
generated: "2024-09-05T15:18:03.739771-04:00"
4 changes: 2 additions & 2 deletions charts/evm-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ 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.4.2
version: 0.4.3

dependencies:
- name: celestia-node
version: 0.3.6
repository: "file://../celestia-node"
condition: celestia-node.enabled
- name: evm-rollup
version: 0.26.1
version: 0.26.2
repository: "file://../evm-rollup"
- name: composer
version: 0.1.2
Expand Down

0 comments on commit f46d7f5

Please sign in to comment.