From ef8f73ca7c70e2d63b2e5df388ad6670d11f49aa Mon Sep 17 00:00:00 2001 From: Pierre Besson Date: Tue, 11 Jul 2023 11:32:17 +0200 Subject: [PATCH] Add helm-docs for bridge-common-relay chart (#271) * add helm-docs for bridge-common-relay chart * remove trailing blank line --- .helmdocsignore | 1 - charts/bridges-common-relay/Chart.yaml | 3 +- charts/bridges-common-relay/README.md | 82 +++++++++++++++++++- charts/bridges-common-relay/README.md.gotmpl | 38 +++++++++ charts/bridges-common-relay/values.yaml | 56 +++++++++++-- 5 files changed, 169 insertions(+), 11 deletions(-) create mode 100644 charts/bridges-common-relay/README.md.gotmpl diff --git a/.helmdocsignore b/.helmdocsignore index 5e9f6ceb..3e855810 100644 --- a/.helmdocsignore +++ b/.helmdocsignore @@ -1,5 +1,4 @@ # These charts do not yet support generating README.md with helm-docs -bridges-common-relay/ common/ polkadot-basic-notification/ polkadot-introspector/ diff --git a/charts/bridges-common-relay/Chart.yaml b/charts/bridges-common-relay/Chart.yaml index f148d962..da8bc52c 100644 --- a/charts/bridges-common-relay/Chart.yaml +++ b/charts/bridges-common-relay/Chart.yaml @@ -2,7 +2,8 @@ apiVersion: v2 name: bridges-common-relay description: A Helm chart for bridges-common-relay type: application -version: 0.2.1 +version: 0.2.2 maintainers: - name: Parity url: https://github.com/paritytech/helm-charts + email: devops+helm@parity.io diff --git a/charts/bridges-common-relay/README.md b/charts/bridges-common-relay/README.md index 9cf1a138..3139d9bd 100644 --- a/charts/bridges-common-relay/README.md +++ b/charts/bridges-common-relay/README.md @@ -1,6 +1,32 @@ + + # Parity Bridges Common helm chart -The helm chart installs the [Parity Bridges Common](https://github.com/paritytech/parity-bridges-common). +![Version: 0.2.2](https://img.shields.io/badge/Version-0.2.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) + +This helm chart installs [Parity Bridges Common](https://github.com/paritytech/parity-bridges-common) relayer. + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Parity | | | ## Installing the chart @@ -9,4 +35,56 @@ helm repo add parity https://paritytech.github.io/helm-charts/ helm install bridges-common-relay parity/bridges-common-relay ``` -## This is an experimental chart \ No newline at end of file +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Assign custom affinity rules | +| env | object | `{}` | Set environment variables | +| existingSecretName | string | `""` | Override secrets with already existing secret name. | +| extraArgs | list | `[]` | Set extra command line arguments | +| extraLabels | object | `{}` | Additional common labels on pods and services | +| fullnameOverride | string | `""` | Provide a name to substitute for the full names of resources | +| image.pullPolicy | string | `"Always"` | Image pull policy | +| image.repository | string | `"paritytech/substrate-relay"` | Image repository | +| image.tag | string | `"latest"` | Image tag | +| imagePullSecrets | list | `[]` | 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/ | +| nameOverride | string | `""` | Provide a name in place of node for `app:` labels | +| nodeSelector | object | `{}` | Define which Nodes the Pods are scheduled on | +| podAnnotations | object | `{}` | Annotations to add to the Pod | +| podSecurityContext | object | `{}` | SecurityContext holds pod-level security attributes and common container settings. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ | +| prometheus | object | `{"enabled":false,"port":9615}` | Expose metrics via Prometheus format in /metrics endpoint. | +| prometheus.enabled | bool | `false` | Expose Prometheus metrics | +| prometheus.port | int | `9615` | The port for exposed Prometheus metrics | +| relayHeaders.enabled | bool | `false` | | +| relayHeaders.name | string | `"rococo-to-bridge-hub-wococo"` | | +| relayHeaders.params.source-host | string | `"ws://rpc.example"` | | +| relayHeaders.params.source-port | int | `9955` | | +| relayHeaders.params.target-host | string | `"ws://rpc.example"` | | +| relayHeaders.params.target-port | int | `9944` | | +| relayHeadersAndMessages.enabled | bool | `false` | | +| relayHeadersAndMessages.name | string | `"bridge-hub-rococo-bridge-hub-wococo"` | | +| relayHeadersAndMessages.params | object | `{}` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | Resource limits & requests | +| secrets | object | `{}` | Secrets will be mounted to pod /secrets/{key} | +| securityContext | object | `{}` | SecurityContext holds pod-level security attributes and common container settings. | +| service | object | `{"port":80,"type":"ClusterIP"}` | Service | +| service.port | int | `80` | Service port | +| service.type | string | `"ClusterIP"` | Service type | +| serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Service account for the node to use. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ | +| serviceAccount.annotations | object | `{}` | Annotations to add to the Service Account | +| serviceAccount.create | bool | `true` | Enable creation of a Service Account for the main container | +| serviceAccount.name | string | `""` | Service Account name | +| serviceMonitor | object | `{"enabled":false,"interval":"30s","metricRelabelings":[],"namespace":null,"relabelings":[],"scrapeTimeout":"10s","targetLabels":["node"]}` | 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 | bool | `false` | Enables Service Monitor | +| serviceMonitor.interval | string | `"30s"` | Scrape interval | +| serviceMonitor.metricRelabelings | list | `[]` | Metric relabelings config | +| serviceMonitor.namespace | string | `nil` | Namespace to deploy Service Monitor. If not set deploys in the same namespace with the chart | +| serviceMonitor.relabelings | list | `[]` | Relabelings config | +| serviceMonitor.scrapeTimeout | string | `"10s"` | Scrape timeout | +| serviceMonitor.targetLabels | list | `["node"]` | Labels to scrape | +| tolerations | list | `[]` | Tolerations for use with node taints | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/bridges-common-relay/README.md.gotmpl b/charts/bridges-common-relay/README.md.gotmpl new file mode 100644 index 00000000..0ff77bd5 --- /dev/null +++ b/charts/bridges-common-relay/README.md.gotmpl @@ -0,0 +1,38 @@ + + +# Parity Bridges Common helm chart + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} + +This helm chart installs [Parity Bridges Common](https://github.com/paritytech/parity-bridges-common) relayer. + +{{ template "chart.maintainersSection" . }} + +## Installing the chart + +```console +helm repo add parity https://paritytech.github.io/helm-charts/ +helm install bridges-common-relay parity/bridges-common-relay +``` + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/bridges-common-relay/values.yaml b/charts/bridges-common-relay/values.yaml index 29b7dc76..baf64c73 100644 --- a/charts/bridges-common-relay/values.yaml +++ b/charts/bridges-common-relay/values.yaml @@ -1,19 +1,33 @@ +# -- Number of replicas for the pod + replicaCount: 1 image: + # -- Image repository repository: paritytech/substrate-relay + # -- Image pull policy pullPolicy: Always + # -- Image tag tag: latest +# -- 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: [] +# -- 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: {} +# -- Service account for the node to use. +# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ serviceAccount: + # -- Enable creation of a Service Account for the main container create: true + # -- Annotations to add to the Service Account annotations: {} + # -- Service Account name name: "" relayHeaders: @@ -50,23 +64,29 @@ relayHeadersAndMessages: # bridge-hub-wococo-transactions-mortality: 4 # lane: ["00000001", "00000002"] -# secrets will be mounted to pod /secrets/{key} +# -- Secrets will be mounted to pod /secrets/{key} secrets: {} # bridge-hub-wococo-signer-file: //Charlie -# override secrets with already existing secret name. +# -- Override secrets with already existing secret name. existingSecretName: "" +# -- Set environment variables env: {} # RUST_LOG: 'runtime=trace' +# -- Set extra command line arguments extraArgs: [] +# -- Annotations to add to the Pod podAnnotations: {} +# -- SecurityContext holds pod-level security attributes and common container settings. +# ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ podSecurityContext: {} # fsGroup: 2000 +# -- SecurityContext holds pod-level security attributes and common container settings. securityContext: {} # capabilities: # drop: @@ -75,10 +95,14 @@ securityContext: {} # runAsNonRoot: true # runAsUser: 1000 +# -- Service service: + # -- Service type type: ClusterIP + # -- Service port port: 80 +# -- Resource limits & requests resources: {} # limits: # cpu: 100m @@ -87,19 +111,37 @@ resources: {} # cpu: 100m # memory: 128Mi - +# -- Define which Nodes the Pods are scheduled on nodeSelector: {} +# -- Tolerations for use with node taints tolerations: [] +# -- Assign custom affinity rules affinity: {} +# -- Expose metrics via Prometheus format in /metrics endpoint. prometheus: + # -- Expose Prometheus metrics enabled: false + # -- The port for exposed Prometheus metrics port: 9615 +# -- Service Monitor of Prometheus-Operator +# ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md#include-servicemonitors serviceMonitor: + # -- Enables Service Monitor enabled: false - interval: 1m - scrapeTimeout: 30s - targetLabels: [] + # -- Namespace to deploy Service Monitor. If not set deploys in the same namespace with the chart + namespace: + # -- Scrape interval + interval: 30s + # -- Scrape timeout + scrapeTimeout: 10s + # -- Labels to scrape + targetLabels: + - node + # -- Relabelings config + relabelings: [] + # -- Metric relabelings config + metricRelabelings: []