From 4c263c8b8cfe80f0e2210c045220a1f21962d0e7 Mon Sep 17 00:00:00 2001 From: bakhtin Date: Wed, 15 Jun 2022 15:51:55 +0400 Subject: [PATCH] Add Helm chart testing Workflow --- .github/workflows/pr.yaml | 76 ++++++ chart-testing/lintconf.yaml | 40 +++ charts/node/Chart.yaml | 5 +- charts/node/README.md | 4 + charts/node/ci/kind-values.yaml | 14 ++ charts/node/templates/service.yaml | 8 + charts/node/templates/serviceMonitor.yaml | 45 ++++ charts/node/templates/statefulset.yaml | 15 +- charts/node/values.yaml | 235 ++++++++++++++---- charts/polkadot-introspector/Chart.yaml | 5 +- charts/substrate-faucet/Chart.yaml | 5 +- charts/substrate-faucet/ci/kind-values.yaml | 15 ++ .../templates/servicemonitor.yaml | 2 + charts/substrate-faucet/values.yaml | 3 + charts/substrate-telemetry/Chart.yaml | 5 +- charts/substrate-telemetry/values.yaml | 6 +- 16 files changed, 431 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/pr.yaml create mode 100644 chart-testing/lintconf.yaml create mode 100644 charts/node/ci/kind-values.yaml create mode 100644 charts/substrate-faucet/ci/kind-values.yaml diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 00000000..89ae533f --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,76 @@ +name: Linting & Integration tests + +on: + pull_request: + types: + - opened + - synchronize + - reopened + +defaults: + run: + shell: bash + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v1 + with: + version: v3.8.1 + + - uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.2.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + run: | + ct lint \ + --target-branch ${{ github.event.repository.default_branch }} \ + --lint-conf chart-testing/lintconf.yaml \ + --excluded-charts charts/common + if: steps.list-changed.outputs.changed == 'true' + + - name: Create kind cluster + uses: helm/kind-action@v1.2.0 + with: + node_image: kindest/node:v1.21.10 + if: steps.list-changed.outputs.changed == 'true' + + - name: Replace secrets in Helm charts + env: + SMF_BOT_MATRIX_ACCESS_TOKEN: ${{ secrets.SMF_BOT_MATRIX_ACCESS_TOKEN }} + run: | + shopt -s globstar + for f in $(find **/ci/*-values.yaml); do + sed -i "s/__GITHUB_SECRET_SMF_BOT_MATRIX_ACCESS_TOKEN/$SMF_BOT_MATRIX_ACCESS_TOKEN/g" $f + done + if: steps.list-changed.outputs.changed == 'true' + + - name: Run chart-testing (install) + run: | + ct install \ + --target-branch ${{ github.event.repository.default_branch }} \ + --excluded-charts charts/common + if: steps.list-changed.outputs.changed == 'true' diff --git a/chart-testing/lintconf.yaml b/chart-testing/lintconf.yaml new file mode 100644 index 00000000..bbcb7e6c --- /dev/null +++ b/chart-testing/lintconf.yaml @@ -0,0 +1,40 @@ +--- +rules: + braces: + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + brackets: + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + colons: + max-spaces-before: 0 + max-spaces-after: 1 + commas: + max-spaces-before: 0 + min-spaces-after: 1 + max-spaces-after: 1 + comments: disable + document-end: disable + document-start: disable # No --- to start a file + empty-lines: + max: 2 + max-start: 0 + max-end: 0 + hyphens: + max-spaces-after: 1 + indentation: + spaces: consistent + indent-sequences: whatever # - list indentation will handle both indentation and without + check-multi-line-strings: false + key-duplicates: enable + line-length: disable # Lines can be any length + new-line-at-end-of-file: enable + new-lines: + type: unix + trailing-spaces: enable + truthy: + level: warning diff --git a/charts/node/Chart.yaml b/charts/node/Chart.yaml index 78958819..42226e67 100644 --- a/charts/node/Chart.yaml +++ b/charts/node/Chart.yaml @@ -2,4 +2,7 @@ apiVersion: v2 name: node description: A Helm chart to deploy Substrate/Polkadot nodes type: application -version: 2.3.1 +version: 2.4.1 +maintainers: + - name: Parity + url: https://github.com/paritytech/helm-charts diff --git a/charts/node/README.md b/charts/node/README.md index fe5a29e8..00e6ac23 100644 --- a/charts/node/README.md +++ b/charts/node/README.md @@ -106,6 +106,8 @@ node: | `node.dataVolumeSize` | The size of the chain data PersistentVolume | `100Gi` | | `node.replica` | Number of replica in the node StatefulSet | `1` | | `node.role` | Set the role of the node: `full`, `authority`/`validator`, `collator` or `light` | `full` | +| `node.prometheus.enabled` | If true, enables Prometheus endpoint | `true` | +| `node.prometheus.port` | Port to use for the Prometheus endpoint | `9615` | | `node.chainDataSnapshotUrl` | Download and load chain data from a snapshot archive http URL | `` | | `node.chainDataSnapshotFormat` | The snapshot archive format (`tar` or `lz4`) | `tar` | | `node.chainDataGcsBucketUrl` | Sync chain data files from a GCS bucket (eg. `gs://bucket-name/folder-name`) | `` | @@ -122,6 +124,8 @@ node: | `node.collator.relayChainDataKubernetesVolumeSnapshot` | Initialize the relay-chain data volume from a Kubernetes VolumeSnapshot | `nil` | | `node.collator.relayChainDataGcsBucketUrl` | Sync relay-chain data files from a GCS bucket (eg. `gs://bucket-name/folder-name`) | `nil` | | `node.collator.relayChainFlags` | Relay-chain node flags other than `--name` (set from the helm release name), `--base-path` and `--chain` | `nil` | +| `node.collator.relayChainPrometheus.enabled` | If true, enables Prometheus endpoint for relaychain | `false` | +| `node.collator.relayChainPrometheus.port` | Port to use for the Relaychain Service Prometheus endpoint | `9625` | | `node.resources.limits` | The resources limits (cpu/memory) for nodes | `{}` | | `node.podManagementPolicy` | The pod management policy to apply to the StatefulSet, set it to `Parallel` to launch or terminate all Pods in parallel, and not to wait for pods to become Running and Ready or completely terminated prior to launching or terminating another pod | `{}` | | `node.pruning` | The amount of blocks to retain. Set to a number or set to 0 for `--pruning=archive` . | `nil` | diff --git a/charts/node/ci/kind-values.yaml b/charts/node/ci/kind-values.yaml new file mode 100644 index 00000000..0c7b5464 --- /dev/null +++ b/charts/node/ci/kind-values.yaml @@ -0,0 +1,14 @@ +node: + chain: dev + role: invalid + dataVolumeSize: 1G + flags: + - "--force-authoring" + - "--alice" + - "--rpc-external" + - "--ws-external" + - "--rpc-methods=safe" + - "--rpc-cors=all" +storageClass: standard +image: + tag: v0.9.19 diff --git a/charts/node/templates/service.yaml b/charts/node/templates/service.yaml index 669a74ba..1cb546e0 100644 --- a/charts/node/templates/service.yaml +++ b/charts/node/templates/service.yaml @@ -60,6 +60,10 @@ spec: name: websocket-rpc - port: {{ $.Values.node.perNodeServices.apiService.prometheusPort }} name: prometheus + {{- if $.Values.node.collator.relayChainPrometheus.enabled }} + - port: {{ $.Values.node.perNodeServices.apiService.relayChainPrometheusPort}} + name: prom-relaychain + {{- end }} {{- end }} --- {{- if $.Values.node.perNodeServices.relayP2pService.enabled }} @@ -67,6 +71,8 @@ apiVersion: v1 kind: Service metadata: name: {{ $fullname }}-{{ $i }}-relay-chain-p2p + labels: + {{- include "node.labels" . | nindent 4 }} annotations: {{- if $.Values.node.perNodeServices.relayP2pService.externalDns.enabled }} external-dns.alpha.kubernetes.io/hostname: {{ $fullname }}-{{ $i }}.{{ $.Values.node.perNodeServices.relayP2pService.externalDns.hostname }} @@ -98,6 +104,8 @@ apiVersion: v1 kind: Service metadata: name: {{ $fullname }}-{{ $i }}-para-chain-p2p + labels: + {{- include "node.labels" . | nindent 4 }} annotations: {{- if $.Values.node.perNodeServices.paraP2pService.externalDns.enabled }} external-dns.alpha.kubernetes.io/hostname: {{ $fullname }}-{{ $i }}.{{ $.Values.node.perNodeServices.paraP2pService.externalDns.hostname }} diff --git a/charts/node/templates/serviceMonitor.yaml b/charts/node/templates/serviceMonitor.yaml index 127d0bd2..4cb8c2ca 100644 --- a/charts/node/templates/serviceMonitor.yaml +++ b/charts/node/templates/serviceMonitor.yaml @@ -42,3 +42,48 @@ spec: {{- toYaml .| nindent 4 }} {{- end}} {{- end }} +--- +{{- if and .Values.node.serviceMonitor.enabled .Values.node.collator.relayChainPrometheus.enabled }} +{{ $fullname := include "node.fullname" . }} +{{ $serviceLabels := include "node.serviceLabels" . }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ $fullname }}-relaychain + {{- if $.Values.node.serviceMonitor.namespace }} + namespace: {{ $.Values.node.serviceMonitor.namespace }} + {{- else }} + namespace: {{ $.Release.Namespace }} + {{- end }} + labels: + {{- include "node.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + {{- $serviceLabels | nindent 6 }} + endpoints: + - port: prom-relaychain + 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 }} + namespaceSelector: + matchNames: + - {{ $.Release.Namespace }} + {{- with $.Values.node.serviceMonitor.targetLabels }} + targetLabels: + {{- toYaml .| nindent 4 }} + {{- end}} +{{- end }} \ No newline at end of file diff --git a/charts/node/templates/statefulset.yaml b/charts/node/templates/statefulset.yaml index 64123070..cda875ef 100644 --- a/charts/node/templates/statefulset.yaml +++ b/charts/node/templates/statefulset.yaml @@ -351,6 +351,10 @@ spec: {{- if eq .Values.node.role "light" }} --light \ {{- end }} + {{- if .Values.node.prometheus.enabled }} + --prometheus-external \ + --prometheus-port {{ .Values.node.prometheus.port }} \ + {{- end }} {{- if .Values.node.collator.isParachain }} {{- if (or $.Values.node.perNodeServices.paraP2pService.enabled) }} {{- if .Values.node.perNodeServices.setPublicAddressToExternalIp.enabled }} @@ -374,6 +378,10 @@ spec: {{- if .Values.node.collator.isParachain }} -- \ --base-path=/data/relay/ \ + {{- if .Values.node.collator.relayChainPrometheus.enabled }} + --prometheus-external \ + --prometheus-port {{ .Values.node.collator.relayChainPrometheus.port }} \ + {{- end }} {{- end }} {{- if .Values.node.collator.relayChainCustomChainspecUrl }} --chain={{ .Values.node.relayChainCustomChainspecPath }} \ @@ -385,6 +393,7 @@ spec: --listen-addr=/ip4/0.0.0.0/tcp/${RELAY_CHAIN_P2P_PORT} \ {{- end }} --listen-addr=/ip4/0.0.0.0/tcp/30333 \ + {{- join " " .Values.node.collator.relayChainFlags | nindent 16 }} env: - name: CHAIN @@ -403,9 +412,13 @@ spec: - containerPort: 9944 name: websocket-rpc protocol: TCP - - containerPort: 9615 + - containerPort: {{ .Values.node.prometheus.port }} name: prometheus protocol: TCP + {{- if and .Values.node.collator.isParachain .Values.node.collator.relayChainPrometheus.enabled }} + - containerPort: {{ .Values.node.collator.relayChainPrometheus.port }} + name: prom-relaychain + {{- end }} - containerPort: 30333 name: p2p protocol: TCP diff --git a/charts/node/values.yaml b/charts/node/values.yaml index 04d0d9a8..5b1873a3 100644 --- a/charts/node/values.yaml +++ b/charts/node/values.yaml @@ -1,44 +1,79 @@ +# Default values for node. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +## Provide a name in place of node for `app:` labels +## +nameOverride: "" + +## Provide a name to substitute for the full names of resources +## +fullnameOverride: "" + +## Additional common labels on pods and services +## +# extraLabels: +# type: rpc + + +## Image of Polkadot Node. +## image: repository: parity/polkadot tag: latest pullPolicy: Always +## Image of Init containers to download chain +## initContainer: image: repository: paritytech/lz4 tag: latest +## Image of kubectl to use for relay P2p service +## kubectl: image: repository: bitnami/kubectl tag: latest +## Image use to sync chain from GCS bucket +## googleCloudSdk: image: repository: google/cloud-sdk tag: slim # more lightweight than the full image and still contains gsutil - #serviceAccountKey: "" + # serviceAccountKey: "" +## Reference to one or more secrets to be used when pulling images +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +## imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" +## Service account for the node to use +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +## serviceAccount: - # Specifies whether a service account should be created create: true - # Specifies whether a RoleBinding should be created for service account createRoleBinding: true - # Annotations to add to the service account annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template + + ## The name of the service account to use. + ## If not set and create is true, a name is generated using the fullname template + ## name: "" +## SecurityContext holds pod-level security attributes and common container settings. +## This defaults to non root user with uid 1000 and gid 1000. +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## podSecurityContext: runAsUser: 1000 runAsGroup: 1000 fsGroup: 1000 +## Creates an ingress resource +## ingress: enabled: false annotations: {} @@ -54,59 +89,106 @@ ingress: # hosts: # - chart-example.local -# Add extra labels on pods and services -#extraLabels: -# type: rpc +## Deploy a substrate node +## ref: https://docs.substrate.io/tutorials/v3/private-network/ node: chain: "polkadot" command: "polkadot" dataVolumeSize: 100Gi replicas: 1 role: full - #customChainspecUrl: - ## Node may require custom name for chainspec file. Example: moonbeam https://github.com/PureStake/moonbeam/issues/1104#issuecomment-996787548 + + ## Database backend engine to use + ## + database: rocksdb + + ## Node may require custom name for chainspec file. + ## ref: moonbeam https://github.com/PureStake/moonbeam/issues/1104#issuecomment-996787548 ## Note: path should start with /data/ since this folder mount in init container download-chainspec. + ## customChainspecPath: "/data/chainspec.json" + # customChainspecUrl: forceDownloadChainspec: false - #chainDataSnapshotUrl: "https://dot-rocksdb.polkashots.io/snapshot" - #chainDataSnapshotFormat: lz4 - #chainPath: "" - #chainDataKubernetesVolumeSnapshot: "" - #chainDataGcsBucketUrl: "" + + ## Configuration to download chain snapshot from remote URL + ## + # chainDataSnapshotUrl: "https://dot-rocksdb.polkashots.io/snapshot" + # chainDataSnapshotFormat: lz4 + # chainDataKubernetesVolumeSnapshot: "" + # chainDataGcsBucketUrl: "" + # chainPath: "" + + ## Deploy a collator node + ## ref: https://wiki.polkadot.network/docs/learn-collator + ## If Collator is enabled, collator image must be used + ## collator: isParachain: false + + ## Name of the Relay Chain to connect + ## relayChain: polkadot - #database: rocksdb - # relayChainCustomChainspecUrl: "" - relayChainCustomChainspecPath: "/data/relay_chain_chainspec.json" - # relayChainDataSnapshotUrl: "https://dot-rocksdb.polkashots.io/snapshot" - # relayChainDataSnapshotFormat: lz4 - # relayChainPath: "" - # relayChainDataKubernetesVolumeSnapshot: "" - # relayChainDataGcsBucketUrl: "" - # relayChainFlags: - enableStartupProbe: true - enableReadinessProbe: true + ## File containing chainspec of relaychain for + ## + relayChainCustomChainspecPath: "/data/relay_chain_chainspec.json" + # relayChainCustomChainspecUrl: "" + + ## Configuration to download relaychain snapshot from remote URL + ## + # relayChainDataSnapshotUrl: "https://dot-rocksdb.polkashots.io/snapshot" + # relayChainDataSnapshotFormat: lz4 + # relayChainDataKubernetesVolumeSnapshot: "" + # relayChainDataGcsBucketUrl: "" + # relayChainPath: "" + + + ## Expose relay chain metrics via Prometheus format in /metrics endpoint + ## Pass the following args: + ## - "--prometheus-external" \ + ## - "--prometheus-port {{ port }}" + ## + relayChainPrometheus: + enabled: false + port: 9625 + + ## Additional args to use for relay chain node + ## + # relayChainFlags: [] + + ## Additional args to use + ## flags: - "--rpc-external" - "--ws-external" - "--rpc-methods=safe" - "--rpc-cors=all" - - "--prometheus-external" + + ## Keys to use by the node + ## ref: https://wiki.polkadot.network/docs/learn-keys + ## keys: {} - # - type: "gran" - # scheme: "ed25519" - # seed: "//Alice//gran" - # - type: "babe" - # scheme: "sr25519" - # seed: "//Alice//babe" + # - type: "gran" + # scheme: "ed25519" + # seed: "//Alice//gran" + # - type: "babe" + # scheme: "sr25519" + # seed: "//Alice//babe" + + ## Component to inject secrets via annotation of Hashicorp Vault + ## ref: https://www.vaultproject.io/docs/platform/k8s/injector/annotations + ## vault: + ## Vault annotations to use + ## #authPath: "" #authRole: "" #authType: "" #authConfigType: "" #authConfigServiceAccount: "" + + ## Keys to fetch from Hashicorp Vault and set on the node + ## keys: {} # - name: grankey # type: type @@ -119,16 +201,37 @@ node: # scheme: scheme # vaultPath: kv/secrets/babeKey # vaultKey: babe + + ## Node key to use via vault + ## nodeKey: {} # name: nodekey # vaultPath: kv/secret/nodekey # Remark; vaultKey cannot contain dashes ('-'), only alphanumeric characters due to a limitation in the go templating # vaultKey: key # vaultKeyAppendPodIndex: false + + ## If enabled, generate a persistent volume to use for the keys + ## persistGeneratedNodeKey: false - #customNodeKey: "" - #pruning: 1000 - resources: {} + # customNodeKey: "" + + ## Set the amount of blocks to retain + ## + # pruning: 1000 + + ## Expose metrics via Prometheus format in /metrics endpoint + ## Pass the following args: + ## - "--prometheus-external" \ + ## - "--prometheus-port {{ .Values.node.prometheus.port }}" + ## + prometheus: + enabled: true + port: 9615 + + ## Enable Service Monitor of Prometheus-Operator + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md#include-servicemonitors + ## serviceMonitor: enabled: false #namespace: monitoring @@ -138,7 +241,12 @@ node: - node relabelings: [] metricRelabelings: [] + + ## Configuration of individual services of node + ## perNodeServices: + ## If enabled, generic service to expose common node APIs + ## apiService: enabled: true type: ClusterIP # or NodePort, LoadBalancer @@ -146,10 +254,13 @@ node: httpPort: 9933 wsPort: 9944 prometheusPort: 9615 + relayChainPrometheusPort: 9625 externalDns: enabled: false hostname: example.com ttl: 300 + ## If enabled, create service to expose relay chain P2P + ## relayP2pService: enabled: false type: NodePort # or ClusterIP or LoadBalancer @@ -159,6 +270,8 @@ node: enabled: false hostname: example.com ttl: 300 + ## If enabled, create service to expose parachain P2P + ## paraP2pService: enabled: false type: NodePort # or ClusterIP, LoadBalancer @@ -168,20 +281,40 @@ node: enabled: false hostname: example.com ttl: 300 + ## If enabled, set `--public-addr` flag to be the NodePort p2p services external address + ## setPublicAddressToExternalIp: enabled: false ipRetrievalServiceUrl: https://ifconfig.io - #podManagementPolicy: Parallel - # Enables Jaeger Agent as a sidecar + ## Pod management policy of stateful set + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies + ## + # podManagementPolicy: Parallel + + ## Enables Jaeger Agent as a sidecar + ## tracing: enabled: false - # Enables Sustrate API as a sidecar + ## Enables Sustrate API as a sidecar + ## substrateApiSidecar: enabled: false -# https://github.com/paritytech/substrate-api-sidecar + ## Enable Node container's startup and readiness probes + ## + enableStartupProbe: true + enableReadinessProbe: true + + ## Resource limits & requests + ## + resources: {} + + +## Configuration of Substrate API +## ref: https://github.com/paritytech/substrate-api-sidecar +## substrateApiSidecar: image: repository: parity/substrate-api-sidecar @@ -189,7 +322,9 @@ substrateApiSidecar: env: {} resources: {} -# https://github.com/jaegertracing/jaeger +## Configuration of Jaeger agent +## https://github.com/jaegertracing/jaeger +## jaegerAgent: image: repository: jaegertracing/jaeger-agent @@ -208,16 +343,28 @@ jaegerAgent: env: {} resources: {} +## Annotations to add to the node pod +## podAnnotations: {} +## Define which Nodes the Pods are scheduled on. +## nodeSelector: {} terminationGracePeriodSeconds: 60 +## Tolerations for use with node taints +## tolerations: [] +## Assign custom affinity rules +## affinity: {} +## Storage class to use for persistent volume +## storageClass: "default" +## Additional containers to run in the pod +## extraContainers: [] diff --git a/charts/polkadot-introspector/Chart.yaml b/charts/polkadot-introspector/Chart.yaml index c96a4cff..50d984b5 100644 --- a/charts/polkadot-introspector/Chart.yaml +++ b/charts/polkadot-introspector/Chart.yaml @@ -2,5 +2,8 @@ apiVersion: v2 name: polkadot-introspector description: A Helm chart to deploy polkadot-introspector type: application -version: 0.1.0 +version: 0.1.1 appVersion: "0.1.0" +maintainers: + - name: Parity + url: https://github.com/paritytech/helm-charts diff --git a/charts/substrate-faucet/Chart.yaml b/charts/substrate-faucet/Chart.yaml index 9ad0436b..8d24f35c 100644 --- a/charts/substrate-faucet/Chart.yaml +++ b/charts/substrate-faucet/Chart.yaml @@ -2,4 +2,7 @@ apiVersion: v2 name: substrate-faucet description: A Helm chart to deploy substrate-faucet type: application -version: 1.0.0 +version: 1.0.1 +maintainers: + - name: Parity + url: https://github.com/paritytech/helm-charts diff --git a/charts/substrate-faucet/ci/kind-values.yaml b/charts/substrate-faucet/ci/kind-values.yaml new file mode 100644 index 00000000..25533bf3 --- /dev/null +++ b/charts/substrate-faucet/ci/kind-values.yaml @@ -0,0 +1,15 @@ +serviceMonitor: + enabled: false + +server: + config: + SMF_BACKEND_RPC_ENDPOINT: "https://westend-rpc.polkadot.io/" + +bot: + secret: + # your bot access token here is how to find it https://t2bot.io/docs/access_tokens/ + SMF_BOT_MATRIX_ACCESS_TOKEN: "__GITHUB_SECRET_SMF_BOT_MATRIX_ACCESS_TOKEN" + + config: + SMF_BOT_MATRIX_SERVER: "https://matrix.org" + SMF_BOT_MATRIX_BOT_USER_ID: "@parity_ci_bot:matrix.org" diff --git a/charts/substrate-faucet/templates/servicemonitor.yaml b/charts/substrate-faucet/templates/servicemonitor.yaml index 3c011c34..d0843388 100644 --- a/charts/substrate-faucet/templates/servicemonitor.yaml +++ b/charts/substrate-faucet/templates/servicemonitor.yaml @@ -1,3 +1,4 @@ +{{- if .Values.serviceMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: @@ -21,3 +22,4 @@ spec: endpoints: - port: metrics interval: 15s +{{- end }} diff --git a/charts/substrate-faucet/values.yaml b/charts/substrate-faucet/values.yaml index 11f4c168..2a44a36b 100644 --- a/charts/substrate-faucet/values.yaml +++ b/charts/substrate-faucet/values.yaml @@ -72,3 +72,6 @@ nodeSelector: {} tolerations: [] affinity: {} + +serviceMonitor: + enabled: true diff --git a/charts/substrate-telemetry/Chart.yaml b/charts/substrate-telemetry/Chart.yaml index 263f36da..0ce27ecb 100644 --- a/charts/substrate-telemetry/Chart.yaml +++ b/charts/substrate-telemetry/Chart.yaml @@ -15,10 +15,13 @@ 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: "2.1.1" +version: "2.1.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 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. appVersion: "1.16.0" +maintainers: + - name: Parity + url: https://github.com/paritytech/helm-charts diff --git a/charts/substrate-telemetry/values.yaml b/charts/substrate-telemetry/values.yaml index 86131c1e..266cd3c5 100644 --- a/charts/substrate-telemetry/values.yaml +++ b/charts/substrate-telemetry/values.yaml @@ -71,7 +71,7 @@ service: targetPort: 8000 annotations: {} # nodePort: 31000 - # externalTrafficPolicy: Cluster + # externalTrafficPolicy: Cluster # sessionAffinity: None core: type: ClusterIP @@ -79,7 +79,7 @@ service: targetPort: 8000 annotations: {} # nodePort: 31000 - # externalTrafficPolicy: Cluster + # externalTrafficPolicy: Cluster # sessionAffinity: None frontend: type: ClusterIP @@ -87,7 +87,7 @@ service: targetPort: 8000 annotations: {} # nodePort: 31000 - # externalTrafficPolicy: Cluster + # externalTrafficPolicy: Cluster # sessionAffinity: None ingress: