diff --git a/charts/node/Chart.yaml b/charts/node/Chart.yaml index 06bd31c0..09b69821 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.1.7 +version: 5.2.1 maintainers: - name: Parity url: https://github.com/paritytech/helm-charts diff --git a/charts/node/README.md b/charts/node/README.md index 9854e72f..6cce7858 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.1.7](https://img.shields.io/badge/Version-5.1.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 5.2.1](https://img.shields.io/badge/Version-5.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ## Maintainers @@ -465,7 +465,8 @@ If you're running a collator node: | serviceAccount.create | bool | `true` | Enable creation of a Service Account for the main container | | serviceAccount.createRoleBinding | bool | `true` | Creates RoleBinding | | serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | -| substrateApiSidecar | object | `{"env":{},"image":{"repository":"parity/substrate-api-sidecar","tag":"latest"},"resources":{}}` | Configuration of Substrate API ref: https://github.com/paritytech/substrate-api-sidecar | +| substrateApiSidecar | object | `{"args":["node","build/src/main.js"],"env":{},"image":{"repository":"parity/substrate-api-sidecar","tag":"latest"},"metrics":{"enabled":false,"port":9100},"resources":{}}` | Configuration of Substrate API ref: https://github.com/paritytech/substrate-api-sidecar | +| substrateApiSidecar.args | list | `["node","build/src/main.js"]` | Arguments to set on the API sidecar | | substrateApiSidecar.env | object | `{}` | Environment variables to set on the API sidecar | | substrateApiSidecar.image.repository | string | `"parity/substrate-api-sidecar"` | Image repository | | substrateApiSidecar.image.tag | string | `"latest"` | Image tag | diff --git a/charts/node/ci/kind-values.yaml b/charts/node/ci/kind-values.yaml index 2e4cb49b..4b4c5abe 100644 --- a/charts/node/ci/kind-values.yaml +++ b/charts/node/ci/kind-values.yaml @@ -1,18 +1,20 @@ node: chain: dev role: invalid - dataVolumeSize: 1G flags: - "--force-authoring" - "--alice" chainData: storageClass: standard + volumeSize: 1Gi chainKeystore: storageClass: standard podManagementPolicy: Parallel persistentVolumeClaimRetentionPolicy: whenDeleted: Delete whenScaled: Delete + substrateApiSidecar: + enabled: true image: tag: v0.9.43 autoscaling: @@ -20,3 +22,7 @@ autoscaling: targetCPU: 80 targetMemory: 80 maxReplicas: 2 + +substrateApiSidecar: + metrics: + enabled: true diff --git a/charts/node/templates/serviceMonitor.yaml b/charts/node/templates/serviceMonitor.yaml index 9c6c12bf..0715ff8b 100644 --- a/charts/node/templates/serviceMonitor.yaml +++ b/charts/node/templates/serviceMonitor.yaml @@ -53,6 +53,25 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} {{- end }} + {{- if .Values.substrateApiSidecar.metrics.enabled }} + - port: prom-sidecar + path: /metrics + {{- if $.Values.node.serviceMonitor.interval }} + interval: {{ $.Values.node.serviceMonitor.interval }} + {{- end }} + {{- if $.Values.node.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ $.Values.node.serviceMonitor.scrapeTimeout }} + honorLabels: true + {{- end }} + {{- with .Values.node.serviceMonitor.relabelings }} + relabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.node.serviceMonitor.metricRelabelings }} + metricRelabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} namespaceSelector: matchNames: - {{ $.Release.Namespace }} diff --git a/charts/node/templates/statefulset.yaml b/charts/node/templates/statefulset.yaml index 29ce603a..0407870d 100644 --- a/charts/node/templates/statefulset.yaml +++ b/charts/node/templates/statefulset.yaml @@ -733,12 +733,25 @@ spec: - name: {{ $key }} value: {{ $val | squote }} {{- end }} + args: + {{- range .Values.substrateApiSidecar.args }} + - "{{ . }}" + {{- end }} + {{- if .Values.substrateApiSidecar.metrics.enabled }} + - "--prometheus" + - "--prometheus-port={{ .Values.substrateApiSidecar.metrics.port }}" + {{- end }} resources: {{- toYaml .Values.substrateApiSidecar.resources | nindent 12 }} ports: - containerPort: 8080 name: api-sidecar protocol: TCP + {{- if .Values.substrateApiSidecar.metrics.enabled }} + - containerPort: {{ .Values.substrateApiSidecar.metrics.port }} + name: prom-sidecar + protocol: TCP + {{- end }} {{- end }} {{- if .Values.node.tracing.enabled }} - name: jaeger-agent-sidecar diff --git a/charts/node/values.yaml b/charts/node/values.yaml index 8860d2dc..5d2c57b5 100644 --- a/charts/node/values.yaml +++ b/charts/node/values.yaml @@ -598,6 +598,13 @@ substrateApiSidecar: repository: parity/substrate-api-sidecar # -- Image tag tag: latest + metrics: + enabled: false + port: 9100 + # -- Arguments to set on the API sidecar + args: + - "node" + - "build/src/main.js" # -- Environment variables to set on the API sidecar env: {} # -- Resource limits & requests