diff --git a/charts/node/Chart.yaml b/charts/node/Chart.yaml index e5bbf7bc..0e799cb4 100644 --- a/charts/node/Chart.yaml +++ b/charts/node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: node description: A Helm chart to deploy Substrate/Polkadot nodes type: application -version: 5.4.3 +version: 5.5.0 maintainers: - name: Parity url: https://github.com/paritytech/helm-charts diff --git a/charts/node/README.md b/charts/node/README.md index 09d14f42..efb9f27d 100644 --- a/charts/node/README.md +++ b/charts/node/README.md @@ -18,7 +18,7 @@ This is intended behaviour. Make sure to run `git add -A` once again to stage ch # Substrate/Polkadot node Helm chart -![Version: 5.4.3](https://img.shields.io/badge/Version-5.4.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 5.5.0](https://img.shields.io/badge/Version-5.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ## Maintainers @@ -111,6 +111,9 @@ node: ``` ## Upgrade +### From v5.x.x to v5.5.0 (⚠️ breaking changes) +- The pruning flag is now using `--blocks-pruning` which starts from polkadot version v0.9.28 +- The flag `--pruning` is now allowed in both .Values.node.flags and .Values.node.collatorRelayChain.flags. When using `--pruning`, ensure that the values of .Values.node.chainData.pruning and .Values.node.collatorRelayChain.chainData.pruning are explicitly set to `false` to maintain previous behavior. ### From v5.x.x to v5.3.0 (⚠️ breaking changes) - The following flags have changed: @@ -304,7 +307,7 @@ If you're running a collator node: | node.chainData.database | string | `"rocksdb"` | Database backend engine to use | | node.chainData.kubernetesVolumeSnapshot | string | `nil` | If set, create a clone of the volume (using volumeClaimTemplates.dataSource.VolumeSnapshot) and use it to store chain data | | node.chainData.kubernetesVolumeToClone | string | `nil` | If set, create a clone of the volume (using volumeClaimTemplates.dataSource.PersistentVolumeClaim) and use it to store chain data | -| node.chainData.pruning | int | `1000` | Set the amount of blocks to retain. If set to 0 archive node will be run | +| node.chainData.pruning | int | `1000` | Set the amount of blocks to retain. If set to 0 archive node will be run. If deprecated `--pruning` flags is used in `node.flags`, set this to `false`. | | node.chainData.storageClass | string | `""` | Storage class to use for persistent volume | | node.chainData.volumeSize | string | `"100Gi"` | Size of the volume for chain data | | node.chainKeystore | object | `{"accessModes":["ReadWriteOnce"],"annotations":{},"kubernetesVolumeSnapshot":null,"kubernetesVolumeToClone":null,"mountInMemory":{"enabled":false,"sizeLimit":null},"storageClass":"","volumeSize":"10Mi"}` | Configure chain keystore parameters | @@ -336,7 +339,7 @@ If you're running a collator node: | node.collatorRelayChain.chainData.database | string | `"rocksdb"` | Database backend engine to use for the collator relay-chain database | | node.collatorRelayChain.chainData.kubernetesVolumeSnapshot | string | `nil` | If set, create a clone of the volume (using volumeClaimTemplates.dataSource.VolumeSnapshot) and use it to store relay-chain data | | node.collatorRelayChain.chainData.kubernetesVolumeToClone | string | `nil` | If set, create a clone of the volume (using volumeClaimTemplates.dataSource.PersistentVolumeClaim) and use it to store relay-chain data | -| node.collatorRelayChain.chainData.pruning | int | `1000` | Set the amount of blocks to retain for the collator relay-chain database. If set to 0 archive node will be run | +| node.collatorRelayChain.chainData.pruning | int | `1000` | Set the amount of blocks to retain for the collator relay-chain database. If set to 0 archive node will be run. If deprecated `--pruning` flags is used in `node.collatorRelayChain.flags`, set this to `false`. | | node.collatorRelayChain.chainData.storageClass | string | `""` | Storage class to use for persistent volume | | node.collatorRelayChain.chainData.volumeSize | string | `"100Gi"` | Size of the volume | | node.collatorRelayChain.chainKeystore.accessModes | list | `["ReadWriteOnce"]` | Access mode of the volume | diff --git a/charts/node/README.md.gotmpl b/charts/node/README.md.gotmpl index 4a94f328..0f6b565b 100644 --- a/charts/node/README.md.gotmpl +++ b/charts/node/README.md.gotmpl @@ -107,6 +107,9 @@ node: ``` ## Upgrade +### From v5.x.x to v5.5.0 (⚠️ breaking changes) +- The pruning flag is now using `--blocks-pruning` which starts from polkadot version v0.9.28 +- The flag `--pruning` is now allowed in both .Values.node.flags and .Values.node.collatorRelayChain.flags. When using `--pruning`, ensure that the values of .Values.node.chainData.pruning and .Values.node.collatorRelayChain.chainData.pruning are explicitly set to `false` to maintain previous behavior. ### From v5.x.x to v5.3.0 (⚠️ breaking changes) - The following flags have changed: diff --git a/charts/node/templates/_helpers.tpl b/charts/node/templates/_helpers.tpl index 455d790d..9cb80055 100644 --- a/charts/node/templates/_helpers.tpl +++ b/charts/node/templates/_helpers.tpl @@ -98,5 +98,5 @@ Create the database path depending on the database backend in use (rocksdb or pa Define a regex matcher to check if the passed node flags are managed by the chart already */}} {{- define "node.chartManagedFlagsRegex" -}} -{{- "(\\W|^)(--name|--base-path|--chain|--validator|--collator|--light|--database|--pruning|--prometheus-external|--prometheus-port|--node-key|--wasm-runtime-overrides|--jaeger-agent|--rpc-external|--unsafe-rpc-external|--ws-external|--unsafe-ws-external|--rpc-methods|--rpc-cors|--rpc-port|--ws-port|--enable-offchain-indexing)(\\W|$)" }} +{{- "(\\W|^)(--name|--base-path|--chain|--blocks-pruning|--validator|--collator|--light|--database|--prometheus-external|--prometheus-port|--node-key|--wasm-runtime-overrides|--jaeger-agent|--rpc-external|--unsafe-rpc-external|--ws-external|--unsafe-ws-external|--rpc-methods|--rpc-cors|--rpc-port|--ws-port|--enable-offchain-indexing)(\\W|$)" }} {{- end }} diff --git a/charts/node/templates/statefulset.yaml b/charts/node/templates/statefulset.yaml index 0c3e7586..10fc77a5 100644 --- a/charts/node/templates/statefulset.yaml +++ b/charts/node/templates/statefulset.yaml @@ -530,10 +530,10 @@ spec: {{- if .Values.node.chainData.database }} --database={{ .Values.node.chainData.database }} \ {{- end }} - {{- if ge ( int .Values.node.chainData.pruning ) 1 }} - --pruning={{ .Values.node.chainData.pruning }} \ - {{- else if and ( not ( kindIs "invalid" .Values.node.chainData.pruning ) ) ( eq 0 ( int .Values.node.chainData.pruning ) ) }} - --pruning=archive \ + {{- if and ( not (kindIs "bool" .Values.node.chainData.pruning ) ) (ge ( int .Values.node.chainData.pruning ) 1) }} + --blocks-pruning={{ .Values.node.chainData.pruning }} \ + {{- else if and ( not (kindIs "bool" .Values.node.chainData.pruning ) ) ( not ( kindIs "invalid" .Values.node.chainData.pruning ) ) ( eq 0 ( int .Values.node.chainData.pruning ) ) }} + --blocks-pruning=archive \ {{- end }} {{- if eq .Values.node.role "collator" }} --collator \ @@ -629,10 +629,10 @@ spec: {{- if .Values.node.collatorRelayChain.chainData.database}} --database={{ .Values.node.collatorRelayChain.chainData.database }} \ {{- end }} - {{- if ge ( int .Values.node.collatorRelayChain.chainData.pruning ) 1 }} - --pruning={{ .Values.node.collatorRelayChain.chainData.pruning }} \ - {{- else if and ( not ( kindIs "invalid" .Values.node.collatorRelayChain.chainData.pruning ) ) ( eq 0 ( int .Values.node.collatorRelayChain.chainData.pruning ) ) }} - --pruning=archive \ + {{- if and ( not (kindIs "bool" .Values.node.collatorRelayChain.chainData.pruning )) (ge ( int .Values.node.collatorRelayChain.chainData.pruning ) 1) }} + --blocks-pruning={{ .Values.node.collatorRelayChain.chainData.pruning }} \ + {{- else if and ( not (kindIs "bool" .Values.node.collatorRelayChain.chainData.pruning )) ( not ( kindIs "invalid" .Values.node.collatorRelayChain.chainData.pruning ) ) ( eq 0 ( int .Values.node.collatorRelayChain.chainData.pruning ) ) }} + --blocks-pruning=archive \ {{- end }} {{- if .Values.node.collatorRelayChain.prometheus.enabled }} --prometheus-external \ diff --git a/charts/node/values.yaml b/charts/node/values.yaml index 814cacd5..a3212ac4 100644 --- a/charts/node/values.yaml +++ b/charts/node/values.yaml @@ -181,7 +181,8 @@ node: chainData: # -- Database backend engine to use database: rocksdb - # -- Set the amount of blocks to retain. If set to 0 archive node will be run + # -- Set the amount of blocks to retain. + # If set to 0 archive node will be run. If deprecated `--pruning` flags is used in `node.flags`, set this to `false`. pruning: 1000 # -- (string) If set, create a clone of the volume (using volumeClaimTemplates.dataSource.VolumeSnapshot) and use it to store chain data kubernetesVolumeSnapshot: @@ -274,7 +275,8 @@ node: chainData: # -- Database backend engine to use for the collator relay-chain database database: rocksdb - # -- Set the amount of blocks to retain for the collator relay-chain database. If set to 0 archive node will be run + # -- Set the amount of blocks to retain for the collator relay-chain database. + # If set to 0 archive node will be run. If deprecated `--pruning` flags is used in `node.collatorRelayChain.flags`, set this to `false`. pruning: 1000 # -- (string) If set, create a clone of the volume (using volumeClaimTemplates.dataSource.VolumeSnapshot) and use it to store relay-chain data kubernetesVolumeSnapshot: