diff --git a/.github/workflows/helm-chart.yaml b/.github/workflows/helm-chart.yaml new file mode 100644 index 0000000..0fe1798 --- /dev/null +++ b/.github/workflows/helm-chart.yaml @@ -0,0 +1,83 @@ +name: charts::ghcr-oci + +on: + push: + branches: + - main + paths: + - "charts/**" + - ".github/workflows/helm-chart.yaml" + pull_request: + branches: + - main + paths: + - "charts/**" + - ".github/workflows/helm-chart.yaml" + +permissions: + id-token: write + actions: write + pull-requests: write + issues: write + contents: write + packages: write + +jobs: + helm-lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.1.0 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch main --chart-dirs charts) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + run: ct lint --target-branch main --chart-dirs charts + + helm-release: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + needs: + - helm-lint-test + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install Helm + uses: azure/setup-helm@v3 + with: + version: v3.8.0 + + - name: 'helm:package:create' + run: | + helm package charts/ + + - name: 'helm:package:get_artifcat_name' + run: | + find . -name "*.tgz" + echo "ARTIFACT_NAME=$(find . -name "*.tgz" -maxdepth 1)" >> $GITHUB_ENV + + - name: 'helm:package:upload' + run: | + echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username kilnfi --password-stdin + helm push ${{ env.ARTIFACT_NAME }} oci://${{ env.REGISTRY }}/kilnfi/helm-charts/ + env: + REGISTRY: ghcr.io diff --git a/README.md b/README.md index 698acc7..8b872a2 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,12 @@ Finally, this program exports the following sets of data from: - Prometheus (you can use this Grafana dashboard to monitor your validators) - Slack - logs - + Prometheus server is automatically exposed on port 8000. Command line options -------------------- - + ``` ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ * --beacon-url TEXT URL of beacon node [required] │ diff --git a/charts/eth-validator-watcher/Chart.yaml b/charts/eth-validator-watcher/Chart.yaml index cb3fee8..d4a4efb 100644 --- a/charts/eth-validator-watcher/Chart.yaml +++ b/charts/eth-validator-watcher/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: A Helm chart for running eth-validator-watcher name: eth-validator-watcher type: application -version: 1.0.0 +version: 1.1.0 maintainers: - name: Alluvial email: contact@alluvial.finance diff --git a/charts/eth-validator-watcher/README.md b/charts/eth-validator-watcher/README.md index ba4d5d0..24f2c80 100644 --- a/charts/eth-validator-watcher/README.md +++ b/charts/eth-validator-watcher/README.md @@ -1,6 +1,6 @@ # eth-validator-watcher -![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) +![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart for running eth-validator-watcher @@ -8,55 +8,58 @@ A Helm chart for running eth-validator-watcher | Name | Email | Url | | ---- | ------ | --- | -| Alluvial | | | +| Alluvial | contact@alluvial.finance | https://alluvial.finance | ## Values | Key | Type | Default | Description | |-----|------|---------|-------------| -| affinity | object | `{}` | | -| args | list | `[]` | Specifies the arguments to the command line Please refer to https://github.com/kilnfi/eth-validator-watcher/blob/main/README.md#description | -| env | object | `{}` | | -| envFrom | object | `{}` | | -| fullnameOverride | string | `""` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"ghcr.io/kilnfi/eth-validator-watcher"` | | -| image.tag | string | `"latest"` | | -| imagePullSecrets | list | `[]` | | -| livenessProbe.exec.command[0] | string | `"/usr/bin/python3.9"` | | -| livenessProbe.exec.command[1] | string | `"/usr/local/bin/liveness_check.py"` | | -| livenessProbe.exec.command[2] | string | `"/tmp/liveness"` | | -| livenessProbe.failureThreshold | int | `10` | | -| livenessProbe.initialDelaySeconds | int | `120` | | -| livenessProbe.periodSeconds | int | `60` | | -| nameOverride | string | `""` | | -| nodeSelector | object | `{}` | | -| podAnnotations | object | `{}` | | -| podSecurityContext | object | `{}` | | -| readinessProbe.exec.command[0] | string | `"/usr/bin/python3.9"` | | -| readinessProbe.exec.command[1] | string | `"/usr/local/bin/liveness_check.py"` | | -| readinessProbe.exec.command[2] | string | `"/tmp/liveness"` | | -| readinessProbe.failureThreshold | int | `10` | | -| readinessProbe.initialDelaySeconds | int | `30` | | -| readinessProbe.periodSeconds | int | `60` | | -| replicaCount | int | `1` | | -| resources | object | `{}` | | -| securityContext | object | `{}` | | -| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | -| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | -| 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 | -| serviceMonitor.additionalLabels | object | `{}` | | -| serviceMonitor.enabled | bool | `false` | | -| serviceMonitor.metricRelabelings | list | `[]` | | -| serviceMonitor.namespace | string | `""` | | -| serviceMonitor.namespaceSelector | object | `{}` | | -| serviceMonitor.scrapeInterval | string | `"60s"` | | -| serviceMonitor.targetLabels | list | `[]` | | -| startupProbe | object | `{}` | | -| tolerations | list | `[]` | | -| volumeMounts | list | `[]` | | -| volumes | list | `[]` | | | watchedKeys | list | `[]` | List of public keys to watch. See https://github.com/kilnfi/eth-validator-watcher/blob/main/README.md#command-lines-examples | +| watcher.affinity | object | `{}` | | +| watcher.config.beaconType | string | `"other"` | | +| watcher.config.beaconUrl | string | `"http://localhost:5052"` | | +| watcher.extraArgs | list | `[]` | | +| watcher.extraInitContainers | list | `[]` | | +| watcher.fullnameOverride | string | `""` | | +| watcher.image.pullPolicy | string | `"IfNotPresent"` | | +| watcher.image.repository | string | `"ghcr.io/kilnfi/eth-validator-watcher"` | | +| watcher.image.tag | string | `"v0.41.0"` | | +| watcher.imagePullSecrets | list | `[]` | | +| watcher.livenessProbe.failureThreshold | int | `1` | | +| watcher.livenessProbe.initialDelaySeconds | int | `60` | | +| watcher.livenessProbe.periodSeconds | int | `60` | | +| watcher.livenessProbe.successThreshold | int | `1` | | +| watcher.livenessProbe.timeoutSeconds | int | `1` | | +| watcher.nameOverride | string | `""` | | +| watcher.nodeSelector | object | `{}` | | +| watcher.podAnnotations | object | `{}` | | +| watcher.podLabels | object | `{}` | | +| watcher.podMonitor.additionalLabels | object | `{}` | | +| watcher.podMonitor.enabled | bool | `false` | | +| watcher.podMonitor.interval | string | `"12s"` | | +| watcher.podMonitor.relabelings | list | `[]` | | +| watcher.podMonitor.scheme | string | `"http"` | | +| watcher.podMonitor.tlsConfig | object | `{}` | | +| watcher.podSecurityContext | object | `{}` | | +| watcher.readinessProbe.failureThreshold | int | `1` | | +| watcher.readinessProbe.initialDelaySeconds | int | `60` | | +| watcher.readinessProbe.periodSeconds | int | `60` | | +| watcher.readinessProbe.successThreshold | int | `1` | | +| watcher.readinessProbe.timeoutSeconds | int | `1` | | +| watcher.replicaCount | int | `1` | | +| watcher.resources.limits.memory | string | `"2400Mi"` | | +| watcher.resources.requests.cpu | string | `"100m"` | | +| watcher.resources.requests.memory | string | `"1200Mi"` | | +| watcher.securityContext | object | `{}` | | +| watcher.service.port | int | `80` | | +| watcher.service.type | string | `"ClusterIP"` | | +| watcher.serviceAccount.annotations | object | `{}` | | +| watcher.serviceAccount.create | bool | `true` | | +| watcher.serviceAccount.labels | object | `{}` | | +| watcher.serviceAccount.name | string | `""` | | +| watcher.tolerations | list | `[]` | | +| watcher.volumeMounts | object | `{}` | | +| watcher.volumes | object | `{}` | | ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +Autogenerated from chart metadata using [helm-docs v1.7.0](https://github.com/norwoodj/helm-docs/releases/v1.7.0) diff --git a/charts/eth-validator-watcher/templates/_helpers.tpl b/charts/eth-validator-watcher/templates/_helpers.tpl index b6d897a..d38ddfa 100644 --- a/charts/eth-validator-watcher/templates/_helpers.tpl +++ b/charts/eth-validator-watcher/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Expand the name of the chart. */}} -{{- define "eth-validator-watcher.name" -}} +{{- define "ethereum-validator-watcher.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} @@ -10,7 +10,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "eth-validator-watcher.fullname" -}} +{{- define "ethereum-validator-watcher.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -26,37 +26,41 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "eth-validator-watcher.chart" -}} +{{- define "ethereum-validator-watcher.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* -Common labels +Create the name of the service account to use */}} -{{- define "eth-validator-watcher.labels" -}} -helm.sh/chart: {{ include "eth-validator-watcher.chart" . }} -{{ include "eth-validator-watcher.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- define "ethereum-validator-watcher.serviceAccountName" -}} +{{- if .Values.watcher.serviceAccount.create }} +{{- default (include "ethereum-validator-watcher.fullname" .) .Values.watcher.serviceAccount.name }} +{{- else }} + +{{- default "default" .Values.watcher.serviceAccount.name }} {{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }} {{/* -Selector labels +Common labels */}} -{{- define "eth-validator-watcher.selectorLabels" -}} -app.kubernetes.io/name: {{ include "eth-validator-watcher.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} +{{- define "ethereum-validator-watcher.labels" -}} +app.kubernetes.io/name: {{ include "ethereum-validator-watcher.name" . }} +helm.sh/chart: {{ include "ethereum-validator-watcher.chart" . }} +app.kubernetes.io/instance: ethereum-validator-watcher +app.kubernetes.io/client-type: {{ .Values.clientType }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} +{{- end -}} {{/* -Create the name of the service account to use +Selector labels */}} -{{- define "eth-validator-watcher.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "eth-validator-watcher.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} +{{- define "ethereum-validator-watcher.matchLabels" -}} +app.kubernetes.io/name: {{ include "ethereum-validator-watcher.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/client-type: {{ .Values.clientType }} +{{- end -}} diff --git a/charts/eth-validator-watcher/templates/configmap.yaml b/charts/eth-validator-watcher/templates/configmap.yaml deleted file mode 100644 index ff2f616..0000000 --- a/charts/eth-validator-watcher/templates/configmap.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.watchedKeys }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "eth-validator-watcher.fullname" . }} - labels: - {{- include "eth-validator-watcher.labels" . | nindent 4 }} -data: - watched-keys.txt: | - {{- range .Values.watchedKeys }} - {{- . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/eth-validator-watcher/templates/deployment.yaml b/charts/eth-validator-watcher/templates/deployment.yaml index c19c970..6e8754e 100644 --- a/charts/eth-validator-watcher/templates/deployment.yaml +++ b/charts/eth-validator-watcher/templates/deployment.yaml @@ -1,103 +1,97 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "eth-validator-watcher.fullname" . }} + name: {{ include "ethereum-validator-watcher.fullname" . }} + namespace: {{ .Release.Namespace }} labels: - {{- include "eth-validator-watcher.labels" . | nindent 4 }} + {{- include "ethereum-validator-watcher.labels" . | nindent 4 }} + {{- with .Values.deploymentAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "eth-validator-watcher.selectorLabels" . | nindent 6 }} + {{- include "ethereum-validator-watcher.matchLabels" . | nindent 6 }} template: metadata: - annotations: - {{- with .Values.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} labels: - {{- include "eth-validator-watcher.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} + {{- include "ethereum-validator-watcher.matchLabels" . | nindent 8 }} + {{- with .Values.watcher.podLabels }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} + {{- with .Values.watcher.podAnnotations }} + annotations: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} - serviceAccountName: {{ include "eth-validator-watcher.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + spec: containers: - - name: eth-validator-watcher - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - args: - {{- if .Values.watchedKeys }} - - --pubkeys-file-path=/data/keys/watched-keys.txt - {{- end }} - {{- with .Values.args }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: metrics - containerPort: 8000 - protocol: TCP - {{- with .Values.readinessProbe }} - readinessProbe: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.livenessProbe }} - livenessProbe: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.startupProbe }} - startupProbe: - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- if or .Values.env .Values.envFrom }} - env: - {{- with .Values.envFrom }} - {{- range $key, $value := . }} - - name: {{ $key }} - {{- toYaml $value | nindent 12 }} + - name: validator-watcher + image: "{{ .Values.watcher.image.repository }}:{{ .Values.watcher.image.tag }}" + imagePullPolicy: {{ .Values.watcher.image.pullPolicy }} + {{- with .Values.watcher.resources }} + resources: + {{- toYaml . | nindent 10 }} + {{- end }} + ports: + - name: metrics + containerPort: 8000 + args: + - --beacon-url={{ .Values.watcher.config.beaconUrl }} + - --beacon-type={{ .Values.watcher.config.beaconType }} + {{- if .Values.keysLoader.enabled }} + - --pubkeys-file-path={{ .Values.keysLoader.config.outputDir }}/{{ .Values.keysLoader.config.outputFilename }} {{- end }} + - --liveness-file=/tmp/liveness + {{- with .Values.watcher.extraArgs }} + {{- toYaml . | nindent 10 }} {{- end }} - {{- with .Values.env }} - {{- range $key, $value := . }} - - name: {{ $key }} - value: {{ $value | quote }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.watchedKeys }} - volumeMounts: - - name: "watched-keys" - mountPath: "/data/keys" - readOnly: true - {{- end }} - {{- with .Values.volumeMounts }} + {{- with .Values.watcher.livenessProbe }} + livenessProbe: + exec: + command: + - /usr/bin/python3.9 + - /usr/local/bin/liveness_check.py + - /tmp/liveness + initialDelaySeconds: {{ .initialDelaySeconds }} + periodSeconds: {{ .periodSeconds }} + timeoutSeconds: {{ .timeoutSeconds }} + successThreshold: {{ .successThreshold }} + failureThreshold: {{ .failureThreshold }} + {{- end }} + {{- with .Values.watcher.readinessProbe }} + readinessProbe: + exec: + command: + - /usr/bin/python3.9 + - /usr/local/bin/liveness_check.py + - /tmp/liveness + initialDelaySeconds: {{ .initialDelaySeconds }} + periodSeconds: {{ .periodSeconds }} + timeoutSeconds: {{ .timeoutSeconds }} + successThreshold: {{ .successThreshold }} + failureThreshold: {{ .failureThreshold }} + {{- end }} + volumeMounts: + {{- with .Values.watcher.volumeMounts }} {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.watchedKeys }} + {{- end }} + {{- if .Values.keysLoader.enabled }} + - mountPath: {{ .Values.keysLoader.config.outputDir }} + name: configs + {{- end }} + serviceAccountName: {{ include "ethereum-validator-watcher.serviceAccountName" . }} volumes: - - name: "watched-keys" - configMap: - name: {{ include "eth-validator-watcher.fullname" . }} - {{- end }} {{- with .Values.volumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} - affinity: + {{- with .Values.keysLoader.volumes }} {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} - tolerations: + {{- with .Values.keysLoader.init.volumes }} {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.keysLoader.enabled }} + - name: configs + emptyDir: {} + {{- end }} diff --git a/charts/eth-validator-watcher/templates/podmonitor.yaml b/charts/eth-validator-watcher/templates/podmonitor.yaml new file mode 100644 index 0000000..be323e9 --- /dev/null +++ b/charts/eth-validator-watcher/templates/podmonitor.yaml @@ -0,0 +1,33 @@ +{{- if .Values.watcher.podMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ include "ethereum-validator-watcher.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "ethereum-validator-watcher.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + {{- include "ethereum-validator-watcher.matchLabels" . | nindent 8 }} + podMetricsEndpoints: + - port: metrics + {{- if .Values.watcher.podMonitor.interval }} + interval: {{ .Values.watcher.podMonitor.interval }} + {{- end }} + {{- if .Values.watcher.podMonitor.additionalLabels }} + additionalLabels: + {{- toYaml .Values.watcher.podMonitor.additionalLabels | nindent 6 }} + {{- end }} + {{- if .Values.watcher.podMonitor.scheme }} + scheme: {{ .Values.watcher.podMonitor.scheme }} + {{- end }} + {{- if .Values.watcher.podMonitor.tlsConfig }} + tlsConfig: + {{- toYaml .Values.watcher.podMonitor.tlsConfig | nindent 6 }} + {{- end }} + {{- if .Values.watcher.podMonitor.relabelings }} + relabelings: + {{ toYaml .Values.watcher.podMonitor.relabelings | nindent 6 }} + {{- end }} +{{- end }} diff --git a/charts/eth-validator-watcher/templates/sa.yaml b/charts/eth-validator-watcher/templates/sa.yaml new file mode 100644 index 0000000..ecd3f49 --- /dev/null +++ b/charts/eth-validator-watcher/templates/sa.yaml @@ -0,0 +1,16 @@ +{{- if .Values.watcher.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + {{- include "ethereum-validator-watcher.labels" . | nindent 4 }} + {{- with .Values.watcher.serviceAccount.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.watcher.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + name: {{ include "ethereum-validator-watcher.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/eth-validator-watcher/templates/service.yaml b/charts/eth-validator-watcher/templates/service.yaml deleted file mode 100644 index 370653a..0000000 --- a/charts/eth-validator-watcher/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "eth-validator-watcher.fullname" . }} - labels: - {{- include "eth-validator-watcher.labels" . | nindent 4 }} -spec: - type: ClusterIP - ports: - - name: metrics - port: 8000 - targetPort: metrics - protocol: TCP - selector: - {{- include "eth-validator-watcher.selectorLabels" . | nindent 4 }} diff --git a/charts/eth-validator-watcher/templates/serviceaccount.yaml b/charts/eth-validator-watcher/templates/serviceaccount.yaml deleted file mode 100644 index 1070f43..0000000 --- a/charts/eth-validator-watcher/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "eth-validator-watcher.serviceAccountName" . }} - labels: - {{- include "eth-validator-watcher.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/eth-validator-watcher/templates/servicemonitor.yaml b/charts/eth-validator-watcher/templates/servicemonitor.yaml deleted file mode 100644 index a37b354..0000000 --- a/charts/eth-validator-watcher/templates/servicemonitor.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.serviceMonitor.enabled -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "eth-validator-watcher.fullname" . }} -{{- if .Values.serviceMonitor.namespace }} - namespace: {{ .Values.serviceMonitor.namespace | quote }} -{{- end }} - labels: - {{- include "eth-validator-watcher.labels" . | nindent 4 }} - {{- if .Values.serviceMonitor.additionalLabels }} - {{- toYaml .Values.serviceMonitor.additionalLabels | nindent 4 }} - {{- end }} -spec: - endpoints: - - port: metrics - interval: {{ .Values.serviceMonitor.scrapeInterval }} - {{- if .Values.serviceMonitor.honorLabels }} - honorLabels: true - {{- end }} - {{- if .Values.serviceMonitor.metricRelabelings }} - metricRelabelings: {{ toYaml .Values.serviceMonitor.metricRelabelings | nindent 8 }} - {{- end }} -{{- if .Values.serviceMonitor.namespaceSelector }} - namespaceSelector: {{ toYaml .Values.serviceMonitor.namespaceSelector | nindent 4 }} -{{ else }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} -{{- if .Values.serviceMonitor.targetLabels }} - targetLabels: - {{- range .Values.serviceMonitor.targetLabels }} - - {{ . }} - {{- end }} -{{- end }} - selector: - matchLabels: - {{- include "eth-validator-watcher.selectorLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/eth-validator-watcher/values.yaml b/charts/eth-validator-watcher/values.yaml index 5140344..05c37e0 100644 --- a/charts/eth-validator-watcher/values.yaml +++ b/charts/eth-validator-watcher/values.yaml @@ -1,98 +1,66 @@ -replicaCount: 1 - -image: - repository: ghcr.io/kilnfi/eth-validator-watcher - pullPolicy: IfNotPresent - tag: "latest" - -# -- Specifies the arguments to the command line -# Please refer to https://github.com/kilnfi/eth-validator-watcher/blob/main/README.md#description -args: [] - -env: {} -envFrom: {} - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # -- Specifies whether a service account should be created - create: 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 - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -livenessProbe: - periodSeconds: 60 - initialDelaySeconds: 120 - failureThreshold: 10 - exec: - command: - - /usr/bin/python3.9 - - /usr/local/bin/liveness_check.py - - /tmp/liveness -readinessProbe: - periodSeconds: 60 - initialDelaySeconds: 30 - failureThreshold: 10 - exec: - command: - - /usr/bin/python3.9 - - /usr/local/bin/liveness_check.py - - /tmp/liveness -startupProbe: {} - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -volumes: [] - -volumeMounts: [] - -serviceMonitor: - enabled: false - additionalLabels: {} - namespace: "" - namespaceSelector: {} - # Default: scrape .Release.Namespace only - # To scrape all, use the following: - # namespaceSelector: - # any: true - scrapeInterval: 60s - # honorLabels: true - targetLabels: [] - metricRelabelings: [] +watcher: + replicaCount: 1 + image: + repository: ghcr.io/kilnfi/eth-validator-watcher + pullPolicy: IfNotPresent + tag: latest + + imagePullSecrets: [] + nameOverride: "" + fullnameOverride: "" + + config: + beaconUrl: "http://localhost:5052" + beaconType: "other" + + extraArgs: [] + podAnnotations: {} + podLabels: {} + podSecurityContext: {} + securityContext: {} + + resources: + requests: + cpu: 100m + memory: 1200Mi + limits: + memory: 2400Mi + + livenessProbe: + periodSeconds: 60 + initialDelaySeconds: 60 + timeoutSeconds: 1 + failureThreshold: 1 + successThreshold: 1 + readinessProbe: + periodSeconds: 60 + initialDelaySeconds: 60 + timeoutSeconds: 1 + failureThreshold: 1 + successThreshold: 1 + + extraInitContainers: [] + volumeMounts: {} + volumes: {} + nodeSelector: {} + tolerations: [] + affinity: {} + serviceAccount: + create: true + annotations: {} + name: "" + labels: {} + service: + type: ClusterIP + port: 80 + + podMonitor: + enabled: false + interval: 12s + additionalLabels: {} + scheme: http + tlsConfig: {} + relabelings: [] # -- List of public keys to watch. See https://github.com/kilnfi/eth-validator-watcher/blob/main/README.md#command-lines-examples watchedKeys: [] diff --git a/grafana_dashboard.json b/grafana_dashboard.json index 9c125ed..c03b1c5 100644 --- a/grafana_dashboard.json +++ b/grafana_dashboard.json @@ -2031,4 +2031,4 @@ "uid": "K_icw4y4k", "version": 53, "weekStart": "" -} \ No newline at end of file +} diff --git a/tests/beacon/assets/rewards.json b/tests/beacon/assets/rewards.json index cd5a3dc..b98b50b 100644 --- a/tests/beacon/assets/rewards.json +++ b/tests/beacon/assets/rewards.json @@ -30,4 +30,4 @@ } ] } -} \ No newline at end of file +}