Skip to content

Commit

Permalink
remove top-level value watcher
Browse files Browse the repository at this point in the history
Signed-off-by: Mehdi Bechiri <[email protected]>
  • Loading branch information
cebidhem committed Sep 18, 2023
1 parent d2e25f6 commit ee71417
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 144 deletions.
92 changes: 46 additions & 46 deletions charts/eth-validator-watcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,52 @@ A Helm chart for running eth-validator-watcher

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| watcher.affinity | object | `{}` | |
| watcher.config.beaconType | string | `"other"` | |
| watcher.config.beaconUrl | string | `"http://localhost:5052"` | |
| watcher.config.watchedKeys | list | `[]` | List of public keys to watch. See https://github.com/kilnfi/eth-validator-watcher/blob/main/README.md#command-lines-examples |
| 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 | `""` | |
| 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 | `{}` | |
| affinity | object | `{}` | |
| config.beaconType | string | `"other"` | |
| config.beaconUrl | string | `"http://localhost:5052"` | |
| config.watchedKeys | list | `[]` | List of public keys to watch. See https://github.com/kilnfi/eth-validator-watcher/blob/main/README.md#command-lines-examples |
| extraArgs | list | `[]` | |
| extraInitContainers | list | `[]` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"ghcr.io/kilnfi/eth-validator-watcher"` | |
| image.tag | string | `""` | |
| imagePullSecrets | list | `[]` | |
| livenessProbe.failureThreshold | int | `1` | |
| livenessProbe.initialDelaySeconds | int | `60` | |
| livenessProbe.periodSeconds | int | `60` | |
| livenessProbe.successThreshold | int | `1` | |
| livenessProbe.timeoutSeconds | int | `1` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podMonitor.additionalLabels | object | `{}` | |
| podMonitor.enabled | bool | `false` | |
| podMonitor.interval | string | `"12s"` | |
| podMonitor.relabelings | list | `[]` | |
| podMonitor.scheme | string | `"http"` | |
| podMonitor.tlsConfig | object | `{}` | |
| podSecurityContext | object | `{}` | |
| readinessProbe.failureThreshold | int | `1` | |
| readinessProbe.initialDelaySeconds | int | `60` | |
| readinessProbe.periodSeconds | int | `60` | |
| readinessProbe.successThreshold | int | `1` | |
| readinessProbe.timeoutSeconds | int | `1` | |
| replicaCount | int | `1` | |
| resources.limits.memory | string | `"2400Mi"` | |
| resources.requests.cpu | string | `"100m"` | |
| resources.requests.memory | string | `"1200Mi"` | |
| securityContext | object | `{}` | |
| service.port | int | `80` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.labels | object | `{}` | |
| serviceAccount.name | string | `""` | |
| tolerations | list | `[]` | |
| volumeMounts | object | `{}` | |
| volumes | object | `{}` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
14 changes: 7 additions & 7 deletions charts/eth-validator-watcher/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Expand the name of the chart.
*/}}
{{- define "ethereum-validator-watcher.name" -}}
{{- default .Chart.Name .Values.watcher.nameOverride | trunc 63 | trimSuffix "-" }}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand All @@ -11,10 +11,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "ethereum-validator-watcher.fullname" -}}
{{- if .Values.watcher.fullnameOverride }}
{{- .Values.watcher.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.watcher.nameOverride }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -34,11 +34,11 @@ Create chart name and version as used by the chart label.
Create the name of the service account to use
*/}}
{{- define "ethereum-validator-watcher.serviceAccountName" -}}
{{- if .Values.watcher.serviceAccount.create }}
{{- default (include "ethereum-validator-watcher.fullname" .) .Values.watcher.serviceAccount.name }}
{{- if .Values.serviceAccount.create }}
{{- default (include "ethereum-validator-watcher.fullname" .) .Values.serviceAccount.name }}
{{- else }}

{{- default "default" .Values.watcher.serviceAccount.name }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

Expand Down
4 changes: 2 additions & 2 deletions charts/eth-validator-watcher/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "eth-validator-watcher.fullname" . }}
name: {{ include "ethereum-validator-watcher.fullname" . }}
labels:
{{- include "eth-validator-watcher.labels" . | nindent 4 }}
{{- include "ethereum-validator-watcher.labels" . | nindent 4 }}
data:
watched-keys.txt: |
{{- range .Values.config.watchedKeys }}
Expand Down
34 changes: 17 additions & 17 deletions charts/eth-validator-watcher/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,48 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "ethereum-validator-watcher.labels" . | nindent 4 }}
{{- with .Values.watcher.podAnnotations }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.watcher.replicaCount }}
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "ethereum-validator-watcher.matchLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "ethereum-validator-watcher.matchLabels" . | nindent 8 }}
{{- with .Values.watcher.podLabels }}
{{- with .Values.podLabels }}
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.watcher.podAnnotations }}
{{- with .Values.podAnnotations }}
annotations: {{ tpl (toYaml .) $ | nindent 8 }}
{{- end }}
spec:
containers:
- name: validator-watcher
image: "{{ .Values.watcher.image.repository }}:{{ .Values.watcher.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.watcher.image.pullPolicy }}
{{- with .Values.watcher.resources }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
ports:
- name: metrics
containerPort: 8000
args:
{{- if .Values.watcher.config.watchedKeys }}
{{- if .Values.config.watchedKeys }}
- --pubkeys-file-path=/data/keys/watched-keys.txt
{{- end }}
- --beacon-url={{ .Values.watcher.config.beaconUrl }}
- --beacon-type={{ .Values.watcher.config.beaconType }}
- --beacon-url={{ .Values.config.beaconUrl }}
- --beacon-type={{ .Values.config.beaconType }}
- --liveness-file=/tmp/liveness
{{- with .Values.watcher.extraArgs }}
{{- with .Values.extraArgs }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.watcher.livenessProbe }}
{{- with .Values.livenessProbe }}
livenessProbe:
exec:
command:
Expand All @@ -59,7 +59,7 @@ spec:
successThreshold: {{ .successThreshold }}
failureThreshold: {{ .failureThreshold }}
{{- end }}
{{- with .Values.watcher.readinessProbe }}
{{- with .Values.readinessProbe }}
readinessProbe:
exec:
command:
Expand All @@ -73,21 +73,21 @@ spec:
failureThreshold: {{ .failureThreshold }}
{{- end }}
volumeMounts:
{{- if .Values.watcher.config.watchedKeys }}
{{- if .Values.config.watchedKeys }}
- name: "watched-keys"
mountPath: "/data/keys"
readOnly: true
{{- end }}
{{- with .Values.watcher.volumeMounts }}
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
serviceAccountName: {{ include "ethereum-validator-watcher.serviceAccountName" . }}
volumes:
{{- if .Values.watcher.config.watchedKeys }}
{{- if .Values.config.watchedKeys }}
- name: "watched-keys"
configMap:
name: {{ include "ethereum-validator-watcher.fullname" . }}
{{- end }}
{{- with .Values.watcher.volumes }}
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
22 changes: 11 additions & 11 deletions charts/eth-validator-watcher/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.watcher.podMonitor.enabled }}
{{- if .Values.podMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
Expand All @@ -12,22 +12,22 @@ spec:
{{- include "ethereum-validator-watcher.matchLabels" . | nindent 8 }}
podMetricsEndpoints:
- port: metrics
{{- if .Values.watcher.podMonitor.interval }}
interval: {{ .Values.watcher.podMonitor.interval }}
{{- if .Values.podMonitor.interval }}
interval: {{ .Values.podMonitor.interval }}
{{- end }}
{{- if .Values.watcher.podMonitor.additionalLabels }}
{{- if .Values.podMonitor.additionalLabels }}
additionalLabels:
{{- toYaml .Values.watcher.podMonitor.additionalLabels | nindent 6 }}
{{- toYaml .Values.podMonitor.additionalLabels | nindent 6 }}
{{- end }}
{{- if .Values.watcher.podMonitor.scheme }}
scheme: {{ .Values.watcher.podMonitor.scheme }}
{{- if .Values.podMonitor.scheme }}
scheme: {{ .Values.podMonitor.scheme }}
{{- end }}
{{- if .Values.watcher.podMonitor.tlsConfig }}
{{- if .Values.podMonitor.tlsConfig }}
tlsConfig:
{{- toYaml .Values.watcher.podMonitor.tlsConfig | nindent 6 }}
{{- toYaml .Values.podMonitor.tlsConfig | nindent 6 }}
{{- end }}
{{- if .Values.watcher.podMonitor.relabelings }}
{{- if .Values.podMonitor.relabelings }}
relabelings:
{{ toYaml .Values.watcher.podMonitor.relabelings | nindent 6 }}
{{ toYaml .Values.podMonitor.relabelings | nindent 6 }}
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/eth-validator-watcher/templates/sa.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{- if .Values.watcher.serviceAccount.create }}
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
{{- include "ethereum-validator-watcher.labels" . | nindent 4 }}
{{- with .Values.watcher.serviceAccount.labels }}
{{- with .Values.serviceAccount.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.watcher.serviceAccount.annotations }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
Loading

0 comments on commit ee71417

Please sign in to comment.