diff --git a/charts/xatu-relay-monitor/.helmignore b/charts/xatu-relay-monitor/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/xatu-relay-monitor/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/xatu-relay-monitor/Chart.yaml b/charts/xatu-relay-monitor/Chart.yaml new file mode 100644 index 00000000..8d9afa70 --- /dev/null +++ b/charts/xatu-relay-monitor/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: xatu-relay-monitor +description: Xatu Relay Monitor +home: https://github.com/ethpandaops/xatu +type: application +version: 0.0.1 +maintainers: + - name: samcm + email: sam.calder-mason@ethereum.org + - name: savid + email: andrew.davis@ethereum.org diff --git a/charts/xatu-relay-monitor/README.md b/charts/xatu-relay-monitor/README.md new file mode 100644 index 00000000..ba2ce733 --- /dev/null +++ b/charts/xatu-relay-monitor/README.md @@ -0,0 +1,61 @@ + +# xatu-relay-monitor + +![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) + +Xatu Relay Monitor + +**Homepage:** + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Affinity configuration for pods | +| annotations | object | `{}` | Annotations for the Deployment | +| args | list | `[]` | Command arguments | +| config | object | `{"ethereum":{"genesisSszUrl":"https://raw.githubusercontent.com/eth-clients/mainnet/main/metadata/genesis.ssz","network":"mainnet","networkConfigUrl":"https://raw.githubusercontent.com/eth-clients/mainnet/main/metadata/config.yaml","slotsPerEpoch":32},"logging":"info","metricsAddr":":9090","name":"example-instance","outputs":[{"config":{"address":"http://localhost:8080","batchTimeout":"5s","exportTimeout":"30s","headers":{"authorization":"Someb64Value"},"maxExportBatchSize":512,"maxQueueSize":51200},"name":"basic","type":"http"}],"relays":[{"name":"Flashbots","url":"https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net"},{"name":"Aestus","url":"https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live"},{"name":"Agnostic Gnosis","url":"https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net"},{"name":"BloXroute Max Profit","url":"https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com"},{"name":"BloXroute Regulated","url":"https://0xb0b07cd0abef743db4260b0ed50619cf6ad4d82064cb4fbec9d3ec530f7c5e6793d9f286c4e082c0244ffb9f2658fe88@bloxroute.regulated.blxrbdn.com"},{"name":"Eden Network","url":"https://0xb3ee7afcf27f1f1259ac1787876318c6584ee353097a50ed84f51a1f21a323b3736f271a895c7ce918c038e4265918be@relay.edennetwork.io"},{"name":"Manifold","url":"https://0x98650451ba02064f7b000f5768cf0cf4d4e492317d82871bdc87ef841a0743f69f0f1eea11168503240ac35d101c9135@mainnet-relay.securerpc.com"},{"name":"Ultra Sound","url":"https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money"},{"name":"Wenmerge","url":"https://0x8c7d33605ecef85403f8b7289c8058f440cbb6bf72b055dfe2f3e2c6695b6a1ea5a9cd0eb3a7982927a463feb4c3dae2@relay.wenmerge.com"},{"name":"Titan Relay","url":"https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@titanrelay.xyz"}],"schedule":{"atSlotTimes":["4s"]}}` | Xatu config | +| containerSecurityContext | object | See `values.yaml` | The security context for containers | +| customArgs | list | `[]` | Custom args for the xatu container | +| customCommand | list | `[]` | Command replacement for the xatu container | +| extraContainers | list | `[]` | Additional containers | +| extraEnv | list | `[]` | Additional env variables | +| extraPorts | list | `[]` | Additional ports. Useful when using extraContainers | +| extraVolumeMounts | list | `[]` | Additional volume mounts | +| extraVolumes | list | `[]` | Additional volumes | +| fullnameOverride | string | `""` | Overrides the chart's computed fullname | +| image.pullPolicy | string | `"IfNotPresent"` | xatu container pull policy | +| image.repository | string | `"ethpandaops/xatu"` | xatu container image repository | +| image.tag | string | `"latest"` | xatu container image tag | +| imagePullSecrets | list | `[]` | Image pull secrets for Docker images | +| initContainers | list | `[]` | Additional init containers | +| lifecycle | object | See `values.yaml` | Lifecycle hooks | +| livenessProbe | object | See `values.yaml` | Liveness probe | +| nameOverride | string | `""` | Overrides the chart's name | +| nodeSelector | object | `{}` | Node selector for pods | +| podAnnotations | object | `{}` | Pod annotations | +| podDisruptionBudget | object | `{}` | Define the PodDisruptionBudget spec If not set then a PodDisruptionBudget will not be created | +| podLabels | object | `{}` | Pod labels | +| priorityClassName | string | `nil` | Pod priority class | +| readinessProbe | object | See `values.yaml` | Readiness probe | +| replicas | int | `1` | Number of replicas | +| resources | object | `{}` | Resource requests and limits | +| secretEnv | object | `{}` | Secret env variables injected via a created secret | +| securityContext | object | See `values.yaml` | The security context for pods | +| service.type | string | `"ClusterIP"` | Service type | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `false` | 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.annotations | object | `{}` | Additional ServiceMonitor annotations | +| serviceMonitor.enabled | bool | `false` | If true, a ServiceMonitor CRD is created for a prometheus operator https://github.com/coreos/prometheus-operator | +| serviceMonitor.interval | string | `"15s"` | ServiceMonitor scrape interval | +| serviceMonitor.labels | object | `{}` | Additional ServiceMonitor labels | +| serviceMonitor.namespace | string | `nil` | Alternative namespace for ServiceMonitor | +| serviceMonitor.path | string | `"/metrics"` | Path to scrape | +| serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabelings | +| serviceMonitor.scheme | string | `"http"` | ServiceMonitor scheme | +| serviceMonitor.scrapeTimeout | string | `"30s"` | ServiceMonitor scrape timeout | +| serviceMonitor.tlsConfig | object | `{}` | ServiceMonitor TLS configuration | +| terminationGracePeriodSeconds | int | `90` | How long to wait until the pod is forcefully terminated | +| tolerations | list | `[]` | Tolerations for pods | +| topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pods | diff --git a/charts/xatu-relay-monitor/README.md.gotmpl b/charts/xatu-relay-monitor/README.md.gotmpl new file mode 100644 index 00000000..54549956 --- /dev/null +++ b/charts/xatu-relay-monitor/README.md.gotmpl @@ -0,0 +1,15 @@ + +{{ template "chart.header" . }} +{{ template "chart.deprecationWarning" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }} + +{{ template "chart.description" . }} + +{{ template "chart.homepageLine" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} diff --git a/charts/xatu-relay-monitor/templates/NOTES.txt b/charts/xatu-relay-monitor/templates/NOTES.txt new file mode 100644 index 00000000..3c913f1a --- /dev/null +++ b/charts/xatu-relay-monitor/templates/NOTES.txt @@ -0,0 +1,16 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "xatu-relay-monitor.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "xatu-relay-monitor.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "xatu-relay-monitor.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ include "xatu-relay-monitor.httpPort" . }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "xatu-relay-monitor.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/charts/xatu-relay-monitor/templates/_helpers.tpl b/charts/xatu-relay-monitor/templates/_helpers.tpl new file mode 100644 index 00000000..69706994 --- /dev/null +++ b/charts/xatu-relay-monitor/templates/_helpers.tpl @@ -0,0 +1,72 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "xatu-relay-monitor.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +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 "xatu-relay-monitor.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "xatu-relay-monitor.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "xatu-relay-monitor.labels" -}} +helm.sh/chart: {{ include "xatu-relay-monitor.chart" . }} +{{ include "xatu-relay-monitor.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "xatu-relay-monitor.selectorLabels" -}} +app.kubernetes.io/name: {{ include "xatu-relay-monitor.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "xatu-relay-monitor.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "xatu-relay-monitor.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{- define "xatu-relay-monitor.metricsPort" -}} +{{ (split ":" .Values.config.metricsAddr)._1 | default ":9090" }} +{{- end -}} + +{{- define "xatu-relay-monitor.pprofPort" -}} +{{- if .Values.config.pprofAddr -}} +{{ (split ":" .Values.config.pprofAddr)._1 | default "6060" }} +{{- end -}} +{{- end -}} diff --git a/charts/xatu-relay-monitor/templates/configmap.yaml b/charts/xatu-relay-monitor/templates/configmap.yaml new file mode 100644 index 00000000..c22ed05a --- /dev/null +++ b/charts/xatu-relay-monitor/templates/configmap.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "xatu-relay-monitor.fullname" . }} + labels: + {{- include "xatu-relay-monitor.labels" . | nindent 4 }} +data: + config.yaml: |- + {{ tpl (toYaml .Values.config | nindent 4) $ }} diff --git a/charts/xatu-relay-monitor/templates/deployment.yaml b/charts/xatu-relay-monitor/templates/deployment.yaml new file mode 100644 index 00000000..935ff011 --- /dev/null +++ b/charts/xatu-relay-monitor/templates/deployment.yaml @@ -0,0 +1,117 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "xatu-relay-monitor.fullname" . }} + labels: + {{- include "xatu-relay-monitor.labels" . | nindent 4 }} + annotations: + {{- toYaml .Values.annotations | nindent 4 }} +spec: + replicas: {{ .Values.replicas }} + selector: + matchLabels: + {{- include "xatu-relay-monitor.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "xatu-relay-monitor.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/secrets: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + serviceAccountName: {{ include "xatu-relay-monitor.serviceAccountName" . }} + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} + securityContext: + {{- toYaml .Values.securityContext | nindent 8 }} + initContainers: + {{- if .Values.initContainers }} + {{- toYaml .Values.initContainers | nindent 8 }} + {{- end }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + {{- if gt (len .Values.customCommand) 0 }} + {{- toYaml .Values.customCommand | nindent 12}} + {{- else }} + - "/xatu" + - "relay-monitor" + - --config=/config.yaml + {{- if gt (len .Values.args) 0 }} + {{- toYaml .Values.args | nindent 12}} + {{- end }} + {{- end }} + {{- if gt (len .Values.customArgs) 0 }} + args: + {{- toYaml .Values.customArgs | nindent 12}} + {{- end }} + securityContext: + {{- toYaml .Values.containerSecurityContext | nindent 12 }} + volumeMounts: + - name: config + mountPath: "/config.yaml" + subPath: config.yaml + readOnly: true + {{- if .Values.extraVolumeMounts }} + {{ toYaml .Values.extraVolumeMounts | nindent 10}} + {{- end }} + ports: + - name: metrics + containerPort: {{ include "xatu-relay-monitor.metricsPort" . }} + protocol: TCP + {{- if (include "xatu-relay-monitor.pprofPort" .) }} + - name: pprof + containerPort: {{ include "xatu-relay-monitor.pprofPort" . }} + protocol: TCP + {{- end }} + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.readinessProbe | nindent 12 }} + lifecycle: + {{- toYaml .Values.lifecycle | nindent 12 }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + env: + {{- range $key, $value := .Values.secretEnv }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: {{ include "xatu-relay-monitor.fullname" $ }}-env + key: {{ $key }} + {{- end }} + {{- if .Values.extraEnv }} + {{- toYaml .Values.extraEnv | nindent 12 }} + {{- end }} + {{- if .Values.extraContainers }} + {{ toYaml .Values.extraContainers | nindent 8}} + {{- end }} + nodeSelector: + {{- toYaml .Values.nodeSelector | nindent 8 }} + affinity: + {{- toYaml .Values.affinity | nindent 8 }} + tolerations: + {{- toYaml .Values.tolerations | nindent 8 }} + topologySpreadConstraints: + {{- toYaml .Values.topologySpreadConstraints | nindent 8 }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + volumes: + {{- if .Values.extraVolumes }} + {{ toYaml .Values.extraVolumes | nindent 8}} + {{- end }} + - name: config + configMap: + name: {{ include "xatu-relay-monitor.fullname" . }} diff --git a/charts/xatu-relay-monitor/templates/pdb.yaml b/charts/xatu-relay-monitor/templates/pdb.yaml new file mode 100644 index 00000000..84fce405 --- /dev/null +++ b/charts/xatu-relay-monitor/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if or .Values.podDisruptionBudget.minAvailable .Values.podDisruptionBudget.maxUnavailable -}} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "xatu-relay-monitor.fullname" . }} + labels: + {{- include "xatu-relay-monitor.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + {{- include "xatu-relay-monitor.selectorLabels" . | nindent 6 }} + {{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + {{- end }} +{{- end -}} \ No newline at end of file diff --git a/charts/xatu-relay-monitor/templates/secret.yaml b/charts/xatu-relay-monitor/templates/secret.yaml new file mode 100644 index 00000000..0d287afb --- /dev/null +++ b/charts/xatu-relay-monitor/templates/secret.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "xatu-relay-monitor.fullname" . }}-env + labels: + {{- include "xatu-relay-monitor.labels" . | nindent 4 }} +data: +{{- range $key, $value := .Values.secretEnv }} + {{ $key }}: {{ $value | b64enc }} +{{- end }} diff --git a/charts/xatu-relay-monitor/templates/service.yaml b/charts/xatu-relay-monitor/templates/service.yaml new file mode 100644 index 00000000..a187574c --- /dev/null +++ b/charts/xatu-relay-monitor/templates/service.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "xatu-relay-monitor.fullname" . }} + labels: + {{- include "xatu-relay-monitor.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ include "xatu-relay-monitor.metricsPort" . }} + targetPort: metrics + protocol: TCP + name: metrics + {{- if (include "xatu-relay-monitor.pprofPort" .) }} + - port: {{ include "xatu-relay-monitor.pprofPort" . }} + targetPort: pprof + protocol: TCP + name: pprof + {{- end }} + {{- if .Values.extraPorts }} + {{ toYaml .Values.extraPorts | nindent 4}} + {{- end }} + selector: + {{- include "xatu-relay-monitor.selectorLabels" . | nindent 4 }} diff --git a/charts/xatu-relay-monitor/templates/serviceaccount.yaml b/charts/xatu-relay-monitor/templates/serviceaccount.yaml new file mode 100644 index 00000000..712103cf --- /dev/null +++ b/charts/xatu-relay-monitor/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "xatu-relay-monitor.serviceAccountName" . }} + labels: + {{- include "xatu-relay-monitor.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/xatu-relay-monitor/templates/servicemonitor.yaml b/charts/xatu-relay-monitor/templates/servicemonitor.yaml new file mode 100644 index 00000000..47d0a668 --- /dev/null +++ b/charts/xatu-relay-monitor/templates/servicemonitor.yaml @@ -0,0 +1,43 @@ +{{- if .Values.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "xatu-relay-monitor.fullname" . }} + {{- if .Values.serviceMonitor.namespace }} + namespace: {{ .Values.serviceMonitor.namespace }} + {{- end }} + labels: + {{- include "xatu-relay-monitor.labels" . | nindent 4 }} + {{- if .Values.serviceMonitor.labels }} + {{- toYaml .Values.serviceMonitor.labels | nindent 4 }} + {{- end }} + {{- if .Values.serviceMonitor.annotations }} + annotations: + {{ toYaml .Values.serviceMonitor.annotations | nindent 4 }} + {{- end }} +spec: + endpoints: + - interval: {{ .Values.serviceMonitor.interval }} + {{- if .Values.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} + {{- end }} + honorLabels: true + port: metrics + path: {{ .Values.serviceMonitor.path }} + scheme: {{ .Values.serviceMonitor.scheme }} + {{- if .Values.serviceMonitor.tlsConfig }} + tlsConfig: + {{- toYaml .Values.serviceMonitor.tlsConfig | nindent 6 }} + {{- end }} + {{- if .Values.serviceMonitor.relabelings }} + relabelings: + {{- toYaml .Values.serviceMonitor.relabelings | nindent 4 }} + {{- end }} + jobLabel: "{{ .Release.Name }}" + selector: + matchLabels: + {{- include "xatu-relay-monitor.selectorLabels" . | nindent 8 }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/charts/xatu-relay-monitor/values.yaml b/charts/xatu-relay-monitor/values.yaml new file mode 100644 index 00000000..817e3fb9 --- /dev/null +++ b/charts/xatu-relay-monitor/values.yaml @@ -0,0 +1,249 @@ +# -- Overrides the chart's name +nameOverride: "" + +# -- Overrides the chart's computed fullname +fullnameOverride: "" + +# -- Number of replicas +replicas: 1 + +image: + # -- xatu container image repository + repository: ethpandaops/xatu + # -- xatu container image tag + tag: latest + # -- xatu container pull policy + pullPolicy: IfNotPresent + +# -- Secret env variables injected via a created secret +secretEnv: {} + +# -- Command arguments +args: [] + +# -- Xatu config +config: + logging: "info" + metricsAddr: ":9090" + name: example-instance + + ethereum: + network: mainnet + networkConfigUrl: https://raw.githubusercontent.com/eth-clients/mainnet/main/metadata/config.yaml + genesisSszUrl: https://raw.githubusercontent.com/eth-clients/mainnet/main/metadata/genesis.ssz + slotsPerEpoch: 32 + # network: holesky + # networkConfigUrl: https://raw.githubusercontent.com/eth-clients/holesky/main/metadata/config.yaml + # genesisSszUrl: https://raw.githubusercontent.com/eth-clients/holesky/main/metadata/genesis.ssz + # slotsPerEpoch: 32 + + # network: sepolia + # networkConfigUrl: https://raw.githubusercontent.com/eth-clients/sepolia/main/metadata/config.yaml + # genesisSszUrl: https://raw.githubusercontent.com/eth-clients/sepolia/main/metadata/genesis.ssz + # slotsPerEpoch: 32 + relays: + # Mainnet relays + - name: "Flashbots" + url: https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net + - name: "Aestus" + url: https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live + - name: "Agnostic Gnosis" + url: https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net + - name: "BloXroute Max Profit" + url: https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com + - name: "BloXroute Regulated" + url: https://0xb0b07cd0abef743db4260b0ed50619cf6ad4d82064cb4fbec9d3ec530f7c5e6793d9f286c4e082c0244ffb9f2658fe88@bloxroute.regulated.blxrbdn.com + - name: "Eden Network" + url: https://0xb3ee7afcf27f1f1259ac1787876318c6584ee353097a50ed84f51a1f21a323b3736f271a895c7ce918c038e4265918be@relay.edennetwork.io + - name: "Manifold" + url: https://0x98650451ba02064f7b000f5768cf0cf4d4e492317d82871bdc87ef841a0743f69f0f1eea11168503240ac35d101c9135@mainnet-relay.securerpc.com + - name: "Ultra Sound" + url: https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money + - name: "Wenmerge" + url: https://0x8c7d33605ecef85403f8b7289c8058f440cbb6bf72b055dfe2f3e2c6695b6a1ea5a9cd0eb3a7982927a463feb4c3dae2@relay.wenmerge.com + - name: "Titan Relay" + url: https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@titanrelay.xyz + # # Holesky + # - name: "BloXroute" + # url: https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.holesky.blxrbdn.com + # - name: "Eden Network" + # url: https://0xb1d229d9c21298a87846c7022ebeef277dfc321fe674fa45312e20b5b6c400bfde9383f801848d7837ed5fc449083a12@relay-holesky.edennetwork.io + # - name: "Flashbots" + # url: https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-holesky.flashbots.net + # - name: "Aestus" + # url: https://0xab78bf8c781c58078c3beb5710c57940874dd96aef2835e7742c866b4c7c0406754376c2c8285a36c630346aa5c5f833@holesky.aestus.live + # - name: "Ultra Sound" + # url: https://0xb1559beef7b5ba3127485bbbb090362d9f497ba64e177ee2c8e7db74746306efad687f2cf8574e38d70067d40ef136dc@relay-stag.ultrasound.money + # - name: "Titan Relay" + # url: https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@holesky.titanrelay.xyz + # # Sepolia + # - name: "Flashbots" + # url: https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-sepolia.flashbots.net + schedule: + atSlotTimes: + - "4s" + # - "12s" + outputs: + - name: basic + type: http + config: + address: http://localhost:8080 + headers: + authorization: Someb64Value + maxQueueSize: 51200 + batchTimeout: 5s + exportTimeout: 30s + maxExportBatchSize: 512 + +# -- Custom args for the xatu container +customArgs: [] + +# -- Command replacement for the xatu container +customCommand: [] # Only change this if you need to change the default command + +service: + # -- Service type + type: ClusterIP + +# -- Affinity configuration for pods +affinity: {} + +# -- Image pull secrets for Docker images +imagePullSecrets: [] + +# -- Annotations for the Deployment +annotations: {} + +# -- Liveness probe +# @default -- See `values.yaml` +livenessProbe: + tcpSocket: + port: metrics + initialDelaySeconds: 60 + periodSeconds: 120 + +# -- Readiness probe +# @default -- See `values.yaml` +readinessProbe: + tcpSocket: + port: metrics + initialDelaySeconds: 10 + periodSeconds: 10 + +# -- Node selector for pods +nodeSelector: {} + +# -- Pod labels +podLabels: {} + +# -- Pod annotations +podAnnotations: {} + +# -- Pod priority class +priorityClassName: null + +# -- Resource requests and limits +resources: {} +# limits: +# cpu: 500m +# memory: 2Gi +# requests: +# cpu: 300m +# memory: 1Gi + +# -- The security context for pods +# @default -- See `values.yaml` +securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + +# -- The security context for containers +# @default -- See `values.yaml` +containerSecurityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +serviceAccount: + # -- Specifies whether a service account should be created + create: false + # -- 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: "" + +# -- Lifecycle hooks +# @default -- See `values.yaml` +lifecycle: + preStop: + exec: + command: + - /bin/sleep + - "30" + +# -- How long to wait until the pod is forcefully terminated +terminationGracePeriodSeconds: 90 + +# -- Tolerations for pods +## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +tolerations: [] + +# -- Topology Spread Constraints for pods +## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ +topologySpreadConstraints: [] + +# -- Define the PodDisruptionBudget spec +# If not set then a PodDisruptionBudget will not be created +podDisruptionBudget: {} +# minAvailable: 1 +# maxUnavailable: 1 + +# -- Additional init containers +initContainers: [] +# - name: my-init-container +# image: busybox:latest +# command: ['sh', '-c', 'echo hello'] + +# -- Additional containers +extraContainers: [] + +# -- Additional volumes +extraVolumes: [] + +# -- Additional volume mounts +extraVolumeMounts: [] + +# -- Additional ports. Useful when using extraContainers +extraPorts: [] + +# -- Additional env variables +extraEnv: [] + +serviceMonitor: + # -- If true, a ServiceMonitor CRD is created for a prometheus operator + # https://github.com/coreos/prometheus-operator + enabled: false + # -- Path to scrape + path: /metrics + # -- Alternative namespace for ServiceMonitor + namespace: null + # -- Additional ServiceMonitor labels + labels: {} + # -- Additional ServiceMonitor annotations + annotations: {} + # -- ServiceMonitor scrape interval + interval: 15s + # -- ServiceMonitor scheme + scheme: http + # -- ServiceMonitor TLS configuration + tlsConfig: {} + # -- ServiceMonitor scrape timeout + scrapeTimeout: 30s + # -- ServiceMonitor relabelings + relabelings: []