From 4df667519592e3dbcb114a9acbe43d6029d00e99 Mon Sep 17 00:00:00 2001 From: Pierre Besson Date: Tue, 2 Jan 2024 16:25:30 +0100 Subject: [PATCH] add polkadot umbrella chart #314 --- charts/polkadot/.gitignore | 2 + charts/polkadot/Chart.yaml | 14 ++++ charts/polkadot/README.md | 103 +++++++++++++++++++++++++ charts/polkadot/README.md.gotmpl | 76 ++++++++++++++++++ charts/polkadot/templates/_helpers.tpl | 0 charts/polkadot/values.yaml | 38 +++++++++ 6 files changed, 233 insertions(+) create mode 100644 charts/polkadot/.gitignore create mode 100644 charts/polkadot/Chart.yaml create mode 100644 charts/polkadot/README.md create mode 100644 charts/polkadot/README.md.gotmpl create mode 100644 charts/polkadot/templates/_helpers.tpl create mode 100644 charts/polkadot/values.yaml diff --git a/charts/polkadot/.gitignore b/charts/polkadot/.gitignore new file mode 100644 index 00000000..3373bee1 --- /dev/null +++ b/charts/polkadot/.gitignore @@ -0,0 +1,2 @@ +ci/**/charts/ +Chart.lock \ No newline at end of file diff --git a/charts/polkadot/Chart.yaml b/charts/polkadot/Chart.yaml new file mode 100644 index 00000000..4faea407 --- /dev/null +++ b/charts/polkadot/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: node +description: A Helm chart to deploy Polkadot nodes +type: application +version: 1.0.0 +appVersion: 1.5.0 +maintainers: + - name: Parity + url: https://github.com/paritytech/helm-charts + email: devops+helm@parity.io +dependencies: + - name: node + version: 5.6.0 + repository: https://paritytech.github.io/helm-charts/ diff --git a/charts/polkadot/README.md b/charts/polkadot/README.md new file mode 100644 index 00000000..9e2dab66 --- /dev/null +++ b/charts/polkadot/README.md @@ -0,0 +1,103 @@ + + +# Polkadot node Helm chart + +![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.5.0](https://img.shields.io/badge/AppVersion-1.5.0-informational?style=flat-square) + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Parity | | | + +## Installing the chart + +```console +helm repo add parity https://paritytech.github.io/helm-charts/ +helm install polkadot parity/polkadot +``` + +This will deploy a single Polkadot node with the default configuration, using a pruned database snapshot for fast setup. + +### Public database snapshots + +You can use public database snapshots from [snapshots.polkadot.io](https://snapshots.polkadot.io/), eg: + +- https://snapshots.polkadot.io/polkadot-paritydb-prune +- https://snapshots.polkadot.io/polkadot-rocksdb-prune +- https://snapshots.polkadot.io/polkadot-rocksdb-archive +- https://snapshots.polkadot.io/kusama-paritydb-prune +- https://snapshots.polkadot.io/kusama-rocksdb-prune +- https://snapshots.polkadot.io/kusama-rocksdb-archive +- https://snapshots.polkadot.io/westend-paritydb-archive +- https://snapshots.polkadot.io/westend-paritydb-prune +- https://snapshots.polkadot.io/westend-rocksdb-prune +- https://snapshots.polkadot.io/westend-rocksdb-archive +- https://snapshots.polkadot.io/westend-collectives-rocksdb-archive + +For example, to restore a Kusama pruned node ParityDB database from a snapshot, use the following chart values: +```yaml +node: + node: + chain: kusama + chainData: + chainSnapshot: + enabled: true + url: https://snapshots.polkadot.io/kusama-paritydb-prune + pruning: 256 +``` + +Polkadot and Kusama backups are pruned at 256 blocks. Westend backups are pruned at 1000 blocks. + +### Resizing the node disk + +Refer to the ["Resizing the node disk section" of the node chart](https://github.com/paritytech/helm-charts/tree/main/charts/node#resizing-the-node-disk). + +### Optional Vault Integration + +Refer to the ["Optional Vault Integration section" of the node chart](https://github.com/paritytech/helm-charts/tree/main/charts/node#optional-vault-integration). + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://paritytech.github.io/helm-charts/ | node | 5.6.0 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| node.image.repository | string | `"parity/polkadot"` | Image repository | +| node.image.tag | string | `"1.5.0"` | Image tag | +| node.node.chain | string | `"polkadot"` | Embedded chain specification to use (eg: polkadot, kusama, paseo, rococo, westend) | +| node.node.chainData.chainSnapshot.enabled | bool | `true` | Enable restoring the chain datababase from a snapshot using [rclone](https://rclone.org/) | +| node.node.chainData.chainSnapshot.method | string | `"http-filelist"` | Restoration method. One of: gcs, s3, http-single-tar, http-single-tar-lz4, http-filelist | +| node.node.chainData.chainSnapshot.url | string | `"https://snapshots.polkadot.io/polkadot-paritydb-prune"` | The URL to download the chain database snapshot | +| node.node.chainData.database | string | `"paritydb"` | Database backend engine to use | +| node.node.chainData.pruning | int | `256` | State-pruning to set | +| node.node.chainData.volumeSize | string | `nil` | Size of the chain data volume | +| node.node.chainKeystore.mountInMemory.enabled | bool | `false` | Enable mounting keystore in memory keystore using an emptyDir volume | +| node.node.command | string | `"polkadot"` | Command to run within the container | +| node.node.existingSecrets | string | `nil` | Inject keys from already existing Kubernetes secrets | +| node.node.flags | string | `nil` | Flags to add to the Polkadot binary | +| node.node.keys | string | `nil` | Keys to set on the node. | +| node.node.vault | string | `nil` | Inject secrets via Hashicorp Vault annotations | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0) diff --git a/charts/polkadot/README.md.gotmpl b/charts/polkadot/README.md.gotmpl new file mode 100644 index 00000000..73a8975a --- /dev/null +++ b/charts/polkadot/README.md.gotmpl @@ -0,0 +1,76 @@ + + +# Polkadot node Helm chart + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} + +{{ template "chart.maintainersSection" . }} + +## Installing the chart + +```console +helm repo add parity https://paritytech.github.io/helm-charts/ +helm install polkadot parity/polkadot +``` + +This will deploy a single Polkadot node with the default configuration, using a pruned database snapshot for fast setup. + +### Public database snapshots + +You can use public database snapshots from [snapshots.polkadot.io](https://snapshots.polkadot.io/), eg: + +- https://snapshots.polkadot.io/polkadot-paritydb-prune +- https://snapshots.polkadot.io/polkadot-rocksdb-prune +- https://snapshots.polkadot.io/polkadot-rocksdb-archive +- https://snapshots.polkadot.io/kusama-paritydb-prune +- https://snapshots.polkadot.io/kusama-rocksdb-prune +- https://snapshots.polkadot.io/kusama-rocksdb-archive +- https://snapshots.polkadot.io/westend-paritydb-archive +- https://snapshots.polkadot.io/westend-paritydb-prune +- https://snapshots.polkadot.io/westend-rocksdb-prune +- https://snapshots.polkadot.io/westend-rocksdb-archive +- https://snapshots.polkadot.io/westend-collectives-rocksdb-archive + +For example, to restore a Kusama pruned node ParityDB database from a snapshot, use the following chart values: +```yaml +node: + node: + chain: kusama + chainData: + chainSnapshot: + enabled: true + url: https://snapshots.polkadot.io/kusama-paritydb-prune + pruning: 256 +``` + +Polkadot and Kusama backups are pruned at 256 blocks. Westend backups are pruned at 1000 blocks. + +### Resizing the node disk + +Refer to the ["Resizing the node disk section" of the node chart](https://github.com/paritytech/helm-charts/tree/main/charts/node#resizing-the-node-disk). + +### Optional Vault Integration + +Refer to the ["Optional Vault Integration section" of the node chart](https://github.com/paritytech/helm-charts/tree/main/charts/node#optional-vault-integration). + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/polkadot/templates/_helpers.tpl b/charts/polkadot/templates/_helpers.tpl new file mode 100644 index 00000000..e69de29b diff --git a/charts/polkadot/values.yaml b/charts/polkadot/values.yaml new file mode 100644 index 00000000..9b605cee --- /dev/null +++ b/charts/polkadot/values.yaml @@ -0,0 +1,38 @@ +node: + image: + # -- Image repository + repository: parity/polkadot + # -- Image tag + tag: 1.5.0 + node: + # -- Embedded chain specification to use (eg: polkadot, kusama, paseo, rococo, westend) + chain: polkadot + # -- Command to run within the container + command: "polkadot" + chainData: + chainSnapshot: + # -- Enable restoring the chain datababase from a snapshot using [rclone](https://rclone.org/) + enabled: true + # -- Restoration method. One of: gcs, s3, http-single-tar, http-single-tar-lz4, http-filelist + method: http-filelist + # -- The URL to download the chain database snapshot + url: https://snapshots.polkadot.io/polkadot-paritydb-prune + # -- Database backend engine to use + database: paritydb + # -- State-pruning to set + pruning: 256 # or archive + # -- Size of the chain data volume + volumeSize: + chainKeystore: + mountInMemory: + # -- Enable mounting keystore in memory keystore using an emptyDir volume + enabled: false + + # -- Flags to add to the Polkadot binary + flags: + # -- Keys to set on the node. + keys: + # -- Inject keys from already existing Kubernetes secrets + existingSecrets: + # -- Inject secrets via Hashicorp Vault annotations + vault: