From 4e7939c450c9ecb356045f2c6603ec73287f8639 Mon Sep 17 00:00:00 2001 From: Pierre Besson Date: Wed, 26 Jul 2023 13:55:26 +0200 Subject: [PATCH] Remove polkadot-runtime-exporter chart (#279) remove polkadot-runtime-exporter chart --- .helmdocsignore | 1 - chart-testing/run-local.sh | 1 - charts/polkadot-runtime-exporter/Chart.lock | 6 - charts/polkadot-runtime-exporter/Chart.yaml | 12 - charts/polkadot-runtime-exporter/README.md | 144 -------- .../ci/kind-values.yaml | 2 - .../templates/NOTES.txt | 8 - .../templates/_helpers.tpl | 48 --- .../templates/config.yaml | 15 - .../templates/role.yaml | 26 -- .../templates/secret.yaml | 9 - .../templates/service-account.yaml | 22 -- .../templates/service.yaml | 20 -- .../templates/servicemonitor.yaml | 26 -- .../templates/statefulset.yaml | 132 -------- charts/polkadot-runtime-exporter/values.yaml | 309 ------------------ 16 files changed, 781 deletions(-) delete mode 100644 charts/polkadot-runtime-exporter/Chart.lock delete mode 100644 charts/polkadot-runtime-exporter/Chart.yaml delete mode 100644 charts/polkadot-runtime-exporter/README.md delete mode 100644 charts/polkadot-runtime-exporter/ci/kind-values.yaml delete mode 100644 charts/polkadot-runtime-exporter/templates/NOTES.txt delete mode 100644 charts/polkadot-runtime-exporter/templates/_helpers.tpl delete mode 100644 charts/polkadot-runtime-exporter/templates/config.yaml delete mode 100644 charts/polkadot-runtime-exporter/templates/role.yaml delete mode 100644 charts/polkadot-runtime-exporter/templates/secret.yaml delete mode 100644 charts/polkadot-runtime-exporter/templates/service-account.yaml delete mode 100644 charts/polkadot-runtime-exporter/templates/service.yaml delete mode 100644 charts/polkadot-runtime-exporter/templates/servicemonitor.yaml delete mode 100644 charts/polkadot-runtime-exporter/templates/statefulset.yaml delete mode 100644 charts/polkadot-runtime-exporter/values.yaml diff --git a/.helmdocsignore b/.helmdocsignore index 3e855810..bc2fc7fc 100644 --- a/.helmdocsignore +++ b/.helmdocsignore @@ -2,7 +2,6 @@ common/ polkadot-basic-notification/ polkadot-introspector/ -polkadot-runtime-exporter/ polkadot-stps/ staking-miner/ substrate-faucet/ diff --git a/chart-testing/run-local.sh b/chart-testing/run-local.sh index ed072b43..7482164b 100755 --- a/chart-testing/run-local.sh +++ b/chart-testing/run-local.sh @@ -5,6 +5,5 @@ targetBranch="$(git branch --show-current)" ct lint-and-install \ --target-branch="${targetBranch}" \ --charts="${changed}" \ - --excluded-charts=charts/polkadot-runtime-exporter \ --validate-chart-schema=false \ --lint-conf="chart-testing/lintconf.yaml" diff --git a/charts/polkadot-runtime-exporter/Chart.lock b/charts/polkadot-runtime-exporter/Chart.lock deleted file mode 100644 index c1bbb4d8..00000000 --- a/charts/polkadot-runtime-exporter/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: https://charts.bitnami.com/bitnami - version: 1.14.1 -digest: sha256:301436627b26b7537c5fee9c4121b6b7108bcce85187ba844f03c0728fac2371 -generated: "2022-08-19T16:21:27.680760095+02:00" diff --git a/charts/polkadot-runtime-exporter/Chart.yaml b/charts/polkadot-runtime-exporter/Chart.yaml deleted file mode 100644 index 35cf3d5d..00000000 --- a/charts/polkadot-runtime-exporter/Chart.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v2 -name: polkadot-runtime-exporter -description: A Helm chart to deploy runtime exporter (https://github.com/paritytech/polkadot-runtime-prom-exporter) -type: application -version: 1.2.0 -maintainers: - - name: Parity - url: https://github.com/paritytech/helm-charts -dependencies: -- name: common - version: 1.14.1 - repository: https://charts.bitnami.com/bitnami diff --git a/charts/polkadot-runtime-exporter/README.md b/charts/polkadot-runtime-exporter/README.md deleted file mode 100644 index a60dda96..00000000 --- a/charts/polkadot-runtime-exporter/README.md +++ /dev/null @@ -1,144 +0,0 @@ -# Polkadot Runtime Exporter Helm Chart - -DEPRECATED: This chart is no longer maintained. - -## TL;DR - -```console -$ helm repo add bitnami https://charts.bitnami.com/bitnami -$ helm repo add parity https://paritytech.github.io/helm-charts/ -$ helm dependency build -$ helm install runtime-exporter parity/runtime-exporter -``` - -## Introduction - -A Helm chart for the [polkadot-runtime-exporter](https://github.com/paritytech/polkadot-runtime-prom-exporter) - -## Prerequisites - -- Kubernetes 1.19+ -- Helm 3.2.0+ - -## Installing the Chart - -To install the chart with the release name `runtime-exporter`: - -```console -helm install runtime-exporter parity/runtime-exporter -``` - -The command deploys runtime-exporter on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `runtime-exporter` deployment: - -```console -helm delete runtime-exporter -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -> **NOTE**: The Helm chart uses [readme-generator](https://github.com/bitnami-labs/readme-generator-for-helm) to generate [Parameters](#parameters) section. Make sure to update the parameters with that tool instead of manually editing it. - -## Parameters - -### Global parameters - -| Name | Description | Value | -| ---- | ----------- | ----- | - - -### Common parameters - -| Name | Description | Value | -| ------------------------ | --------------------------------------------------------------------------------------- | --------------- | -| `kubeVersion` | Override Kubernetes version | `""` | -| `nameOverride` | String to partially override common.names.name | `""` | -| `fullnameOverride` | String to fully override common.names.fullname | `""` | -| `namespaceOverride` | String to fully override common.names.namespace | `""` | -| `commonLabels` | Labels to add to all deployed objects | `{}` | -| `commonAnnotations` | Annotations to add to all deployed objects | `{}` | -| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` | -| `extraDeploy` | Array of extra objects to deploy with the release | `[]` | -| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` | -| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` | -| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` | - - -### runtime-exporter Parameters - -| Name | Description | Value | -| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------- | -| `runtimeExporter.config` | The content of the config.json file for runtime exporter. | `{ - "rpcs": ["wss://rpc.polkadot.io"] -} -` | -| `runtimeExporter.prometheus.enabled` | Enable exposing the prometheus port | `true` | -| `runtimeExporter.prometheus.port` | Set the prometheus port | `8000` | -| `runtimeExporter.prometheus.port` | Set the prometheus port | `8000` | -| `runtimeExporter.secret.tsdbConnectionUrl` | Connection URL of the TSDB database | `""` | -| `runtimeExporter.existingSecretName` | Name of an existing Kubernetes secret that should set TSDB_CONN to the Connection URL of the TSDB database. | `""` | -| `image.registry` | runtime-exporter image registry | `docker.io` | -| `image.repository` | runtime-exporter image repository | `paritytech/polkadot-runtime-prom-exporter` | -| `image.tag` | runtime-exporter image tag (immutable tags are recommended) | `latest` | -| `image.pullPolicy` | runtime-exporter image pull policy | `IfNotPresent` | -| `image.pullSecrets` | runtime-exporter image pull secrets | `[]` | -| `replicaCount` | Number of runtime-exporter replicas to deploy | `1` | -| `customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | -| `customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | -| `customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | -| `resources.limits` | The resources limits for the runtime-exporter containers | `{}` | -| `resources.requests` | The requested resources for the runtime-exporter containers | `{}` | -| `podSecurityContext.enabled` | Enabled runtime-exporter pods' Security Context | `true` | -| `podSecurityContext.fsGroup` | Set runtime-exporter pod's Security Context fsGroup | `1001` | -| `containerSecurityContext.enabled` | Enabled runtime-exporter containers' Security Context | `true` | -| `containerSecurityContext.runAsUser` | Set runtime-exporter containers' Security Context runAsUser | `1001` | -| `containerSecurityContext.runAsNonRoot` | Set runtime-exporter containers' Security Context runAsNonRoot | `true` | -| `containerSecurityContext.readOnlyRootFilesystem` | Set runtime-exporter containers' Security Context runAsNonRoot | `false` | -| `hostAliases` | runtime-exporter pods host aliases | `[]` | -| `podLabels` | Extra labels for runtime-exporter pods | `{}` | -| `podAnnotations` | Annotations for runtime-exporter pods | `{}` | -| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` | -| `pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` | -| `pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` | -| `pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` | -| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set | `""` | -| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set | `[]` | -| `affinity` | Affinity for runtime-exporter pods assignment | `{}` | -| `nodeSelector` | Node labels for runtime-exporter pods assignment | `{}` | -| `tolerations` | Tolerations for runtime-exporter pods assignment | `[]` | -| `updateStrategy.type` | runtime-exporter statefulset strategy type | `RollingUpdate` | -| `podManagementPolicy` | Statefulset Pod management policy, it needs to be Parallel to be able to complete the cluster join | `OrderedReady` | -| `priorityClassName` | runtime-exporter pods' priorityClassName | `""` | -| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `{}` | -| `schedulerName` | Name of the k8s scheduler (other than default) for runtime-exporter pods | `""` | -| `terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` | -| `lifecycleHooks` | for the runtime-exporter container(s) to automate configuration before or after startup | `{}` | -| `sidecars` | Add additional sidecar containers to the runtime-exporter pod(s) | `{}` | -| `initContainers` | Add additional init containers to the runtime-exporter pod(s) | `{}` | - - -### Other Parameters - -| Name | Description | Value | -| --------------------------------------------- | ---------------------------------------------------------------- | ---------- | -| `rbac.create` | Specifies whether RBAC resources should be created | `false` | -| `rbac.rules` | Custom RBAC rules to set | `[]` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` | -| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` | -| `serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` | -| `serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` | -| `serviceMonitor.enabled` | Specifies whether a ServiceMonitor should be created | `false` | -| `serviceMonitor.annotations` | Set the ServiceMonitor annotations | `{}` | -| `serviceMonitor.endpoint.path` | HTTP path to scrape for metrics. | `/metrics` | -| `serviceMonitor.endpoint.port` | Name of the service port this endpoint refers to | `prom` | -| `serviceMonitor.endpoint.interval` | Interval at which metrics should be scraped | `6s` | -| `serviceMonitor.endpoint.scheme` | HTTP scheme to use for scraping. | `http` | -| `serviceMonitor.endpoint.scrapeTimeout` | Timeout after which the scrape is ended | `3s` | -| `serviceMonitor.endpoint.honorLabels` | Chooses the metric’s labels on collisions with target labels. | `true` | diff --git a/charts/polkadot-runtime-exporter/ci/kind-values.yaml b/charts/polkadot-runtime-exporter/ci/kind-values.yaml deleted file mode 100644 index 1b643d29..00000000 --- a/charts/polkadot-runtime-exporter/ci/kind-values.yaml +++ /dev/null @@ -1,2 +0,0 @@ -runtimeExporter: - config: '{"rpcs": ["wss://rpc.polkadot.io"]}' diff --git a/charts/polkadot-runtime-exporter/templates/NOTES.txt b/charts/polkadot-runtime-exporter/templates/NOTES.txt deleted file mode 100644 index 9d854248..00000000 --- a/charts/polkadot-runtime-exporter/templates/NOTES.txt +++ /dev/null @@ -1,8 +0,0 @@ -CHART NAME: {{ .Chart.Name }} -CHART VERSION: {{ .Chart.Version }} -APP VERSION: {{ .Chart.AppVersion }} - -** Please be patient while the chart is being deployed ** - -{{- include "common.warnings.rollingTag" .Values.image }} -{{- include "runtimeExporter.validateValues" . }} diff --git a/charts/polkadot-runtime-exporter/templates/_helpers.tpl b/charts/polkadot-runtime-exporter/templates/_helpers.tpl deleted file mode 100644 index d5b79402..00000000 --- a/charts/polkadot-runtime-exporter/templates/_helpers.tpl +++ /dev/null @@ -1,48 +0,0 @@ -{{/* -Return the proper runtime-exporter image name -*/}} -{{- define "runtimeExporter.image" -}} -{{ include "common.images.image" (dict "imageRoot" .Values.image) }} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "runtimeExporter.imagePullSecrets" -}} -{{- include "common.images.pullSecrets" (dict "images" (list .Values.image)) -}} -{{- end -}} - -{{/* -Create the name of the secret to use -*/}} -{{- define "runtimeExporter.secretName" -}} -{{- if not .Values.runtimeExporter.existingSecretName -}} - {{ include "common.names.fullname" . }} -{{- else -}} - {{ .Values.runtimeExporter.existingSecretName }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "runtimeExporter.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Compile all warnings into a single message. -*/}} -{{- define "runtimeExporter.validateValues" -}} -{{- $messages := list -}} -{{- $messages := without $messages "" -}} -{{- $message := join "\n" $messages -}} - -{{- if $message -}} -{{- printf "\nVALUES VALIDATION:\n%s" $message -}} -{{- end -}} -{{- end -}} diff --git a/charts/polkadot-runtime-exporter/templates/config.yaml b/charts/polkadot-runtime-exporter/templates/config.yaml deleted file mode 100644 index ba2a9107..00000000 --- a/charts/polkadot-runtime-exporter/templates/config.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: - config.json: | - {{ .Values.runtimeExporter.config | nindent 4 }} diff --git a/charts/polkadot-runtime-exporter/templates/role.yaml b/charts/polkadot-runtime-exporter/templates/role.yaml deleted file mode 100644 index 23770879..00000000 --- a/charts/polkadot-runtime-exporter/templates/role.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{ if .Values.rbac.create }} -kind: Role -apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} -metadata: - name: {{ include "common.names.fullname" . }} - namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: runtime-exporter - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -rules: - # Update resources and verbs to the proper values for the application cases - - apiGroups: [""] - resources: ["*"] - verbs: ["*"] - - apiGroups: [""] - resources: ["*"] - verbs: ["*"] - {{- if .Values.rbac.rules }} - {{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }} - {{- end }} -{{- end }} diff --git a/charts/polkadot-runtime-exporter/templates/secret.yaml b/charts/polkadot-runtime-exporter/templates/secret.yaml deleted file mode 100644 index a05dff8d..00000000 --- a/charts/polkadot-runtime-exporter/templates/secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -{{- if not .Values.runtimeExporter.existingSecretName }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "common.names.fullname" . }} -type: Opaque -data: - TSDB_CONN: {{ .Values.runtimeExporter.secret.tsdbConnectionUrl | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/polkadot-runtime-exporter/templates/service-account.yaml b/charts/polkadot-runtime-exporter/templates/service-account.yaml deleted file mode 100644 index 45ac01ef..00000000 --- a/charts/polkadot-runtime-exporter/templates/service-account.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "runtimeExporter.serviceAccountName" . }} - namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: runtime-exporter - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} - {{- end }} -automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} -{{- end }} diff --git a/charts/polkadot-runtime-exporter/templates/service.yaml b/charts/polkadot-runtime-exporter/templates/service.yaml deleted file mode 100644 index f55ee592..00000000 --- a/charts/polkadot-runtime-exporter/templates/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.runtimeExporter.prometheus.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "common.names.fullname" . }} - labels: - {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: runtime-exporter - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - type: ClusterIP - ports: - - name: prom - port: {{ .Values.runtimeExporter.prometheus.port }} - selector: - {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: runtime-exporter -{{- end }} diff --git a/charts/polkadot-runtime-exporter/templates/servicemonitor.yaml b/charts/polkadot-runtime-exporter/templates/servicemonitor.yaml deleted file mode 100644 index 3fb0d8f7..00000000 --- a/charts/polkadot-runtime-exporter/templates/servicemonitor.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if .Values.serviceMonitor.enabled }} ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "common.names.fullname" . }} - namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: runtime-exporter - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - endpoints: - - {{- toYaml .Values.serviceMonitor.endpoint | nindent 6 }} - jobLabel: "{{ .Release.Name }}" - selector: - matchLabels: - {{- include "common.labels.matchLabels" . | nindent 6 }} - namespaceSelector: - matchNames: - - {{ include "common.names.namespace" . | quote }} -{{- end }} diff --git a/charts/polkadot-runtime-exporter/templates/statefulset.yaml b/charts/polkadot-runtime-exporter/templates/statefulset.yaml deleted file mode 100644 index 5794d7ad..00000000 --- a/charts/polkadot-runtime-exporter/templates/statefulset.yaml +++ /dev/null @@ -1,132 +0,0 @@ -apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "common.names.fullname" . }} - namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: runtime-exporter - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.replicaCount }} - podManagementPolicy: {{ .Values.podManagementPolicy | quote }} - selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: runtime-exporter - serviceName: {{ template "common.names.fullname" . }} - {{- if .Values.updateStrategy }} - updateStrategy: {{- toYaml .Values.updateStrategy | nindent 4 }} - {{- end }} - template: - metadata: - annotations: - configmap/checksum: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }} - secret/checksum: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- if .Values.podAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} - app.kubernetes.io/component: runtime-exporter - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ template "runtimeExporter.serviceAccountName" . }} - {{- include "runtimeExporter.imagePullSecrets" . | nindent 6 }} - {{- if .Values.hostAliases }} - hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.affinity }} - affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.affinity "context" $) | nindent 8 }} - {{- else }} - affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "component" "runtime-exporter" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "component" "runtime-exporter" "context" $) | nindent 10 }} - nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} - {{- end }} - {{- if .Values.nodeSelector }} - nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.tolerations }} - tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }} - {{- end }} - {{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName | quote }} - {{- end }} - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - {{- if .Values.topologySpreadConstraints }} - topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }} - {{- end }} - {{- if .Values.podSecurityContext.enabled }} - securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }} - {{- end }} - {{- if .Values.terminationGracePeriodSeconds }} - terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} - {{- end }} - initContainers: - {{- if .Values.initContainers }} - {{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }} - {{- end }} - containers: - - name: runtime-exporter - image: {{ template "runtimeExporter.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.runtimeExporter.prometheus.enabled }} - ports: - - name: prom - containerPort: {{ .Values.runtimeExporter.prometheus.port }} - protocol: TCP - {{- end }} - {{- if .Values.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - {{- else if .Values.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} - {{- else if .Values.args }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }} - {{- end }} - env: - - name: CONFIG_FULL_PATH - value: "/config/config.json" - - name: TSDB_CONN - valueFrom: - secretKeyRef: - name: {{ include "runtimeExporter.secretName" . }} - key: TSDB_CONN - {{- if .Values.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.resources }} - resources: {{- toYaml .Values.resources | nindent 12 }} - {{- end }} - {{- if .Values.lifecycleHooks }} - lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }} - {{- end }} - volumeMounts: - - name: config - mountPath: "/config" - readOnly: true - {{- if .Values.extraVolumeMounts }} - {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.sidecars }} - {{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $) | nindent 8 }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ include "common.names.fullname" . }} - {{- if .Values.extraVolumes }} - {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }} - {{- end }} diff --git a/charts/polkadot-runtime-exporter/values.yaml b/charts/polkadot-runtime-exporter/values.yaml deleted file mode 100644 index de664b74..00000000 --- a/charts/polkadot-runtime-exporter/values.yaml +++ /dev/null @@ -1,309 +0,0 @@ -## @section Global parameters -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry, imagePullSecrets - -## @section Common parameters - -## @param kubeVersion Override Kubernetes version -## -kubeVersion: "" -## @param nameOverride String to partially override common.names.name -## -nameOverride: "" -## @param fullnameOverride String to fully override common.names.fullname -## -fullnameOverride: "" -## @param namespaceOverride String to fully override common.names.namespace -## -namespaceOverride: "" -## @param commonLabels Labels to add to all deployed objects -## -commonLabels: {} -## @param commonAnnotations Annotations to add to all deployed objects -## -commonAnnotations: {} -## @param clusterDomain Kubernetes cluster domain name -## -clusterDomain: cluster.local -## @param extraDeploy Array of extra objects to deploy with the release -## -extraDeploy: [] - -## Enable diagnostic mode in the deployment -## -diagnosticMode: - ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden) - ## - enabled: false - ## @param diagnosticMode.command Command to override all containers in the deployment - ## - command: - - sleep - ## @param diagnosticMode.args Args to override all containers in the deployment - ## - args: - - infinity - -## @section runtime-exporter Parameters -## @param runtimeExporter.config The content of the config.json file for runtime exporter. -## @param runtimeExporter.prometheus.enabled Enable exposing the prometheus port -## @param runtimeExporter.prometheus.port Set the prometheus port -## @param runtimeExporter.prometheus.port Set the prometheus port -## @param runtimeExporter.secret.tsdbConnectionUrl Connection URL of the TSDB database -## @param runtimeExporter.existingSecretName Name of an existing Kubernetes secret that should set TSDB_CONN to the Connection URL of the TSDB database. -runtimeExporter: - prometheus: - enabled: true - port: 8000 - config: | - { - "rpcs": ["wss://rpc.polkadot.io"] - } - secret: - tsdbConnectionUrl: "" - existingSecretName: "" - -## Parity runtime-exporter image -## ref: https://hub.docker.com/r/paritytech/polkadot-runtime-prom-exporter/tags/ -## @param image.registry runtime-exporter image registry -## @param image.repository runtime-exporter image repository -## @param image.tag runtime-exporter image tag (immutable tags are recommended) -## @param image.pullPolicy runtime-exporter image pull policy -## @param image.pullSecrets runtime-exporter image pull secrets -## -image: - registry: docker.io - repository: paritytech/polkadot-runtime-prom-exporter - tag: latest - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## e.g: - ## pullSecrets: - ## - myRegistryKeySecretName - ## - pullSecrets: [] -## @param replicaCount Number of runtime-exporter replicas to deploy -## -replicaCount: 1 -## @param customLivenessProbe Custom livenessProbe that overrides the default one -## -customLivenessProbe: {} -## @param customReadinessProbe Custom readinessProbe that overrides the default one -## -customReadinessProbe: {} -## @param customStartupProbe Custom startupProbe that overrides the default one -## -customStartupProbe: {} -## runtime-exporter resource requests and limits -## ref: http://kubernetes.io/docs/user-guide/compute-resources/ -## @param resources.limits The resources limits for the runtime-exporter containers -## @param resources.requests The requested resources for the runtime-exporter containers -## -resources: - limits: {} - requests: {} -## Configure Pods Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod -## @param podSecurityContext.enabled Enabled runtime-exporter pods' Security Context -## @param podSecurityContext.fsGroup Set runtime-exporter pod's Security Context fsGroup -## -podSecurityContext: - enabled: true - fsGroup: 1001 -## Configure Container Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container -## @param containerSecurityContext.enabled Enabled runtime-exporter containers' Security Context -## @param containerSecurityContext.runAsUser Set runtime-exporter containers' Security Context runAsUser -## @param containerSecurityContext.runAsNonRoot Set runtime-exporter containers' Security Context runAsNonRoot -## @param containerSecurityContext.readOnlyRootFilesystem Set runtime-exporter containers' Security Context runAsNonRoot -## -containerSecurityContext: - enabled: true - runAsUser: 1001 - runAsNonRoot: true - readOnlyRootFilesystem: false - -## @param hostAliases runtime-exporter pods host aliases -## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ -## -hostAliases: [] -## @param podLabels Extra labels for runtime-exporter pods -## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -## -podLabels: {} -## @param podAnnotations Annotations for runtime-exporter pods -## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -## -podAnnotations: {} -## @param podAffinityPreset Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` -## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity -## -podAffinityPreset: "" -## @param podAntiAffinityPreset Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` -## ref: https://kubernetes.io/docs/concepts/schedulinfg-eviction/assign-pod-node/#inter-pod-afinity-and-anti-affinity -## -podAntiAffinityPreset: soft -## Pod Disruption Budget configuration -## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb -## @param pdb.create Enable/disable a Pod Disruption Budget creation -## @param pdb.minAvailable Minimum number/percentage of pods that should remain scheduled -## @param pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable -## -pdb: - create: false - minAvailable: 1 - maxUnavailable: "" -## Node affinity preset -## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity -## -nodeAffinityPreset: - ## @param nodeAffinityPreset.type Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` - ## - type: "" - ## @param nodeAffinityPreset.key Node label key to match. Ignored if `affinity` is set - ## - key: "" - ## @param nodeAffinityPreset.values Node label values to match. Ignored if `affinity` is set - ## E.g. - ## values: - ## - e2e-az1 - ## - e2e-az2 - ## - values: [] -## @param affinity Affinity for runtime-exporter pods assignment -## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -## NOTE: `podAffinityPreset`, `podAntiAffinityPreset`, and `nodeAffinityPreset` will be ignored when it's set -## -affinity: {} -## @param nodeSelector Node labels for runtime-exporter pods assignment -## ref: https://kubernetes.io/docs/user-guide/node-selection/ -## -nodeSelector: {} -## @param tolerations Tolerations for runtime-exporter pods assignment -## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -## -tolerations: [] -## @param updateStrategy.type runtime-exporter statefulset strategy type -## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies -## -updateStrategy: - ## StrategyType - ## Can be set to RollingUpdate or OnDelete - ## - type: RollingUpdate - -## @param podManagementPolicy Statefulset Pod management policy, it needs to be Parallel to be able to complete the cluster join -## Ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies -## -podManagementPolicy: OrderedReady - -## @param priorityClassName runtime-exporter pods' priorityClassName -## -priorityClassName: "" -## @param topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template -## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods -## -topologySpreadConstraints: {} -## @param schedulerName Name of the k8s scheduler (other than default) for runtime-exporter pods -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -schedulerName: "" -## @param terminationGracePeriodSeconds Seconds Redmine pod needs to terminate gracefully -## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods -## -terminationGracePeriodSeconds: "" -## @param lifecycleHooks for the runtime-exporter container(s) to automate configuration before or after startup -## -lifecycleHooks: {} -## @param sidecars Add additional sidecar containers to the runtime-exporter pod(s) -## e.g: -## sidecars: -## - name: your-image-name -## image: your-image -## imagePullPolicy: Always -## ports: -## - name: portname -## containerPort: 1234 -## -sidecars: {} -## @param initContainers Add additional init containers to the runtime-exporter pod(s) -## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ -## e.g: -## initContainers: -## - name: your-image-name -## image: your-image -## imagePullPolicy: Always -## command: ['sh', '-c', 'echo "hello world"'] -## -initContainers: {} - -## @section Other Parameters - -## RBAC configuration -## -rbac: - ## @param rbac.create Specifies whether RBAC resources should be created - ## - create: false - ## @param rbac.rules Custom RBAC rules to set - ## e.g: - ## rules: - ## - apiGroups: - ## - "" - ## resources: - ## - pods - ## verbs: - ## - get - ## - list - ## - rules: [] - -## ServiceAccount configuration -## -serviceAccount: - ## @param serviceAccount.create Specifies whether a ServiceAccount should be created - ## - create: true - ## @param serviceAccount.name The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the common.names.fullname template - ## - name: "" - ## @param serviceAccount.annotations Additional Service Account annotations (evaluated as a template) - ## - annotations: {} - ## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account - ## - automountServiceAccountToken: true - -## ServiceMonitor configuration -## -serviceMonitor: - ## @param serviceMonitor.enabled Specifies whether a ServiceMonitor should be created - ## - enabled: false - ## @param serviceMonitor.annotations Set the ServiceMonitor annotations - ## - annotations: {} - - ## Prometheus endpoint scrape configuration - ## - ## @param serviceMonitor.endpoint.path HTTP path to scrape for metrics. - ## @param serviceMonitor.endpoint.port Name of the service port this endpoint refers to - ## @param serviceMonitor.endpoint.interval Interval at which metrics should be scraped - ## @param serviceMonitor.endpoint.scheme HTTP scheme to use for scraping. - ## @param serviceMonitor.endpoint.scrapeTimeout Timeout after which the scrape is ended - ## @param serviceMonitor.endpoint.honorLabels Chooses the metric’s labels on collisions with target labels. - endpoint: - path: /metrics - port: prom - interval: 6s # Corresponds to the average 6s block time of Polkadot - scheme: http - scrapeTimeout: 3s - honorLabels: true