Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions charts/celestia-node/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# celestia-node

![Version: 0.12.0](https://img.shields.io/badge/Version-0.12.0-informational?style=flat-square) ![AppVersion: v0.21.5](https://img.shields.io/badge/AppVersion-v0.21.5-informational?style=flat-square)
![Version: 0.12.1](https://img.shields.io/badge/Version-0.12.1-informational?style=flat-square) ![AppVersion: v0.21.5](https://img.shields.io/badge/AppVersion-v0.21.5-informational?style=flat-square)

Celestia Node

Expand Down Expand Up @@ -207,9 +207,10 @@ Celestia Node
| node.config.full.configtoml.Share.UseShareExchange | bool | `true` | |
| node.config.full.configtoml.State.DefaultBackendName | string | `"test"` | |
| node.config.full.configtoml.State.DefaultKeyName | string | `"my_celes_key"` | |
| node.config.light.configtoml.Core.GRPCPort | string | `"9090"` | |
| node.config.light.configtoml.Core.IP | string | `""` | |
| node.config.light.configtoml.Core.RPCPort | string | `"26657"` | |
| node.config.light.configtoml.Core.Port | string | `"9090"` | |
| node.config.light.configtoml.Core.TLSEnabled | bool | `false` | |
| node.config.light.configtoml.Core.XTokenPath | string | `""` | |
| node.config.light.configtoml.DASer.BackgroundStoreInterval | string | `"10m0s"` | |
| node.config.light.configtoml.DASer.ConcurrencyLimit | int | `16` | |
| node.config.light.configtoml.DASer.SampleFrom | int | `1` | |
Expand Down Expand Up @@ -393,7 +394,7 @@ Celestia Node
| node.tolerations | list | `[]` | |
| node.topologySpreadConstraints | list | `[]` | |
| node.updateStrategy.type | string | `"RollingUpdate"` | |
| persistence | object | `{"accessModes":["ReadWriteOnce"],"annotations":{},"dataBlocks":{"dataSource":{},"selector":{},"size":"250Gi","storageClass":""},"dataOthers":{"dataSource":{},"selector":{},"size":"250Gi","storageClass":""},"dataSource":{},"enabled":true,"enabledMultiVolume":false,"existingClaim":"","mountPath":"/bitnami/app/data","selector":{},"size":"250Gi","storageClass":"","subPath":""}` | persistence parameters |
| persistence | object | `{"accessModes":["ReadWriteOnce"],"annotations":{},"blockPvcCount":1,"dataBlocks":{"dataSource":{},"selector":{},"size":"250Gi","storageClass":""},"dataOthers":{"dataSource":{},"selector":{},"size":"250Gi","storageClass":""},"dataSource":{},"enabled":true,"enabledMultiVolume":false,"existingClaim":"","mountPath":"/bitnami/app/data","selector":{},"size":"250Gi","storageClass":"","subPath":""}` | persistence parameters |
| persistence.enabled | bool | `true` | enable persistence, true by default |
| persistence.size | string | `"250Gi"` | size of data volume, 250Gi by default |
| rbac.create | bool | `false` | |
Expand Down
100 changes: 74 additions & 26 deletions charts/celestia-node/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.enabledMultiVolume) }}
{{- if and .Values.persistence.enabled (not .Values.persistence.enabledMultiVolume) (eq (int .Values.persistence.blockPvcCount) 0) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand All @@ -17,6 +17,9 @@ spec:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
{{- end }}
{{- if .Values.persistence.storageClass }}
storageClassName: {{ .Values.persistence.storageClass | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
Expand All @@ -27,61 +30,106 @@ spec:
dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.dataSource "context" $) | nindent 4 }}
{{- end }}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) | nindent 2 }}
{{- else if and .Values.persistence.enabled .Values.persistence.enabledMultiVolume }}
{{- else if and .Values.persistence.enabled (or .Values.persistence.enabledMultiVolume (gt (int .Values.persistence.blockPvcCount) 0)) }}
{{- if or (eq (int .Values.persistence.blockPvcCount) 0) (eq (int .Values.persistence.blockPvcCount) 1) }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "common.names.fullname" . }}-data-blocks
{{- if or .Values.persistence.annotations .Values.commonAnnotations }}
{{- $claimAnnotations := include "common.tplvalues.merge" (dict "values" (list .Values.persistence.annotations .Values.commonAnnotations) "context" .) | fromYaml }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $claimAnnotations "context" $ ) | nindent 4 }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: node
{{- if .Values.persistence.dataBlocks.annotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.dataBlocks.annotations "context" $) | nindent 4 }}
{{- end }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
spec:
accessModes:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
accessModes: {{- toYaml .Values.persistence.dataBlocks.accessModes | nindent 4 }}
{{- if .Values.persistence.dataBlocks.storageClass }}
storageClassName: {{ .Values.persistence.dataBlocks.storageClass | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.dataBlocks.size | quote }}
{{- if .Values.persistence.dataBlocks.selector }}
selector: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.dataBlocks.selector "context" $) | nindent 4 }}
{{- end }}
storageClassName: {{ .Values.persistence.dataBlocks.storageClass }}
{{- if .Values.persistence.dataBlocks.dataSource }}
dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.dataBlocks.dataSource "context" $) | nindent 4 }}
{{- end }}
{{- else }}
{{- $blockPvcCount := int .Values.persistence.blockPvcCount }}
{{- $foldersPerPvc := div 256 $blockPvcCount }}
{{- $remainingFolders := mod 256 $blockPvcCount }}
{{- range $i := until $blockPvcCount }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "common.names.fullname" . }}-data-others
{{- if or .Values.persistence.annotations .Values.commonAnnotations }}
{{- $claimAnnotations := include "common.tplvalues.merge" (dict "values" (list .Values.persistence.annotations .Values.commonAnnotations) "context" .) | fromYaml }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $claimAnnotations "context" $ ) | nindent 4 }}
name: {{ template "common.names.fullname" $ }}-data-blocks-{{ $i }}
namespace: {{ include "common.names.namespace" $ | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: node
{{- if $.Values.persistence.dataBlocks.annotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" $.Values.persistence.dataBlocks.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
accessModes: {{- toYaml $.Values.persistence.dataBlocks.accessModes | nindent 4 }}
{{- if $.Values.persistence.dataBlocks.storageClass }}
storageClassName: {{ $.Values.persistence.dataBlocks.storageClass | quote }}
{{- end }}
resources:
requests:
storage: {{ $.Values.persistence.dataBlocks.size | quote }}
{{- if $.Values.persistence.dataBlocks.selector }}
selector: {{- include "common.tplvalues.render" (dict "value" $.Values.persistence.dataBlocks.selector "context" $) | nindent 4 }}
{{- end }}
{{- if $.Values.persistence.dataBlocks.dataSource }}
dataSource: {{- include "common.tplvalues.render" (dict "value" $.Values.persistence.dataBlocks.dataSource "context" $) | nindent 4 }}
{{- end }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "common.names.fullname" . }}-data-heights
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: node
{{- if .Values.persistence.dataHeights.annotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.dataHeights.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
accessModes:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
accessModes: {{- toYaml .Values.persistence.dataHeights.accessModes | nindent 4 }}
{{- if .Values.persistence.dataHeights.storageClass }}
storageClassName: {{ .Values.persistence.dataHeights.storageClass | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.dataHeights.size | quote }}
{{- end }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "common.names.fullname" . }}-data-others
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: node
{{- if .Values.persistence.dataOthers.annotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.dataOthers.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
accessModes: {{- toYaml .Values.persistence.dataOthers.accessModes | nindent 4 }}
{{- if .Values.persistence.dataOthers.storageClass }}
storageClassName: {{ .Values.persistence.dataOthers.storageClass | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.dataOthers.size | quote }}
{{- if .Values.persistence.dataOthers.selector }}
selector: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.dataOthers.selector "context" $) | nindent 4 }}
{{- end }}
storageClassName: {{ .Values.persistence.dataOthers.storageClass }}
{{- if .Values.persistence.dataOthers.dataSource }}
dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.dataOthers.dataSource "context" $) | nindent 4 }}
{{- end }}
Expand Down
73 changes: 67 additions & 6 deletions charts/celestia-node/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ spec:
resources: {{- include "common.resources.preset" (dict "type" .Values.volumePermissions.resourcesPreset) | nindent 12 }}
{{- end }}
volumeMounts:
{{- if and .Values.persistence.enabled (not .Values.persistence.enabledMultiVolume) }}
{{- if and .Values.persistence.enabled (not .Values.persistence.enabledMultiVolume) (eq (int .Values.persistence.blockPvcCount) 0) }}
- name: data
mountPath: {{ .Values.node.settings.home }}/data
subPath: data
Expand All @@ -99,15 +99,39 @@ spec:
mountPath: {{ .Values.node.settings.home }}/blocks
subPath: blocks
readOnly: false
{{- else if and .Values.persistence.enabled .Values.persistence.enabledMultiVolume }}
{{- else if and .Values.persistence.enabled (or .Values.persistence.enabledMultiVolume (gt (int .Values.persistence.blockPvcCount) 0)) }}
- name: data-others
mountPath: {{ .Values.node.settings.home }}/data
subPath: data
readOnly: false
{{- if or (eq (int .Values.persistence.blockPvcCount) 0) (eq (int .Values.persistence.blockPvcCount) 1) }}
- name: data-blocks
mountPath: {{ .Values.node.settings.home }}/blocks
subPath: blocks
readOnly: false
{{- else }}
{{- $blockPvcCount := int .Values.persistence.blockPvcCount }}
{{- $foldersPerPvc := div 256 $blockPvcCount }}
{{- $remainingFolders := mod 256 $blockPvcCount }}
{{- range $i := until $blockPvcCount }}
{{- $startFolder := int (mul $i $foldersPerPvc) }}
{{- $endFolder := int (add $startFolder $foldersPerPvc) }}
{{- if eq $i (sub $blockPvcCount 1) }}
{{- $endFolder = int (add $endFolder $remainingFolders) }}
{{- end }}
{{- range $j := untilStep $startFolder $endFolder 1 }}
{{- $folder := printf "%02x" $j }}
- name: data-blocks-{{ $i }}
mountPath: {{ $.Values.node.settings.home }}/blocks/{{ $folder }}
subPath: blocks/{{ $folder }}
readOnly: false
{{- end }}
{{- end }}
- name: data-heights
mountPath: {{ .Values.node.settings.home }}/blocks/heights
subPath: heights
readOnly: false
{{- end }}
{{- end }}
{{- end }}
- name: home-permission
Expand Down Expand Up @@ -267,7 +291,7 @@ spec:
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.node.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
{{- if and .Values.persistence.enabled (not .Values.persistence.enabledMultiVolume) }}
{{- if and .Values.persistence.enabled (not .Values.persistence.enabledMultiVolume) (eq (int .Values.persistence.blockPvcCount) 0) }}
- name: data
mountPath: {{ .Values.node.settings.home }}/data
subPath: data
Expand All @@ -276,15 +300,39 @@ spec:
mountPath: {{ .Values.node.settings.home }}/blocks
subPath: blocks
readOnly: false
{{- else if and .Values.persistence.enabled .Values.persistence.enabledMultiVolume }}
{{- else if and .Values.persistence.enabled (or .Values.persistence.enabledMultiVolume (gt (int .Values.persistence.blockPvcCount) 0)) }}
- name: data-others
mountPath: {{ .Values.node.settings.home }}/data
subPath: data
readOnly: false
{{- if or (eq (int .Values.persistence.blockPvcCount) 0) (eq (int .Values.persistence.blockPvcCount) 1) }}
- name: data-blocks
mountPath: {{ .Values.node.settings.home }}/blocks
subPath: blocks
readOnly: false
{{- else }}
{{- $blockPvcCount := int .Values.persistence.blockPvcCount }}
{{- $foldersPerPvc := div 256 $blockPvcCount }}
{{- $remainingFolders := mod 256 $blockPvcCount }}
{{- range $i := until $blockPvcCount }}
{{- $startFolder := int (mul $i $foldersPerPvc) }}
{{- $endFolder := int (add $startFolder $foldersPerPvc) }}
{{- if eq $i (sub $blockPvcCount 1) }}
{{- $endFolder = int (add $endFolder $remainingFolders) }}
{{- end }}
{{- range $j := untilStep $startFolder $endFolder 1 }}
{{- $folder := printf "%02X" $j }}
- name: data-blocks-{{ $i }}
mountPath: {{ $.Values.node.settings.home }}/blocks/{{ $folder }}
subPath: blocks/{{ $folder }}
readOnly: false
{{- end }}
{{- end }}
- name: data-heights
mountPath: {{ .Values.node.settings.home }}/blocks/heights
subPath: heights
readOnly: false
{{- end }}
{{- end }}
- name: keys-volume
mountPath: {{ .Values.node.settings.home }}/keys
Expand Down Expand Up @@ -390,17 +438,30 @@ spec:
items:
- key: config.yaml
path: config.yaml
{{- if and .Values.persistence.enabled (not .Values.persistence.enabledMultiVolume) }}
{{- if .Values.persistence.enabled }}
{{- if and (not .Values.persistence.enabledMultiVolume) (eq (int .Values.persistence.blockPvcCount) 0) }}
- name: data
persistentVolumeClaim:
claimName: {{ template "common.names.fullname" . }}-data
{{- else if and .Values.persistence.enabled .Values.persistence.enabledMultiVolume }}
{{- else if or .Values.persistence.enabledMultiVolume (gt (int .Values.persistence.blockPvcCount) 0) }}
{{- if or (eq (int .Values.persistence.blockPvcCount) 0) (eq (int .Values.persistence.blockPvcCount) 1) }}
- name: data-blocks
persistentVolumeClaim:
claimName: {{ template "common.names.fullname" . }}-data-blocks
{{- else }}
{{- range $i := until (int .Values.persistence.blockPvcCount) }}
- name: data-blocks-{{ $i }}
persistentVolumeClaim:
claimName: {{ template "common.names.fullname" $ }}-data-blocks-{{ $i }}
{{- end }}
- name: data-heights
persistentVolumeClaim:
claimName: {{ template "common.names.fullname" . }}-data-heights
{{- end }}
- name: data-others
persistentVolumeClaim:
claimName: {{ template "common.names.fullname" . }}-data-others
{{- end }}
{{- else }}
- name: data
emptyDir: {}
Expand Down
36 changes: 35 additions & 1 deletion charts/celestia-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1124,18 +1124,52 @@ persistence:
# -- enable persistence, true by default
enabled: true

# -- EXPERIMENTAL -- enable bmulti-volume persistence, false by default
## @param persistence.blockPvcCount EXPERIMENTAL: Number of PVCs to use for blocks storage (0-256)
## When set to 0 and enableMultiVolume is false: single PVC for all data
## When set to 0 and enableMultiVolume is true: 2 PVCs (blocks and data)
## When set to 1: 2 PVCs (blocks and data)
## When set to >1: 1 PVC for data and N PVCs for blocks
##
blockPvcCount: 0

## @param persistence.enabledMultiVolume EXPERIMENTAL: Enable multi-volume persistence, false by default
## When blockPvcCount is >0, this value is ignored
##
enabledMultiVolume: false

## @param persistence.dataBlocks.storageClass Storage class for blocks PVC
## If blockPvcCount is >0, each data PVC created will have this storage settings
##
dataBlocks:
storageClass: ""
size: 250Gi
dataSource: {}
selector: {}
accessModes:
- ReadWriteOnce

## @param persistence.dataHeights.storageClass Storage class for heights PVC
## This is only used if blockPvcCount is >1
##
dataHeights:
storageClass: ""
size: 250Gi
dataSource: {}
selector: {}
accessModes:
- ReadWriteOnce

## @param persistence.dataOthers.storageClass Storage class for data PVC
## Only used if enableMultiVolume is true or blockPvcCount is >0
##
dataOthers:
storageClass: ""
size: 250Gi
dataSource: {}
selector: {}
accessModes:
- ReadWriteOnce

## @param persistence.mountPath Path to mount the volume at.
## Note: This value is overridden by 'Values.node.settings.home' in the stateful set.
##
Expand Down
Loading