forkmon

by ethPandaOps

Helm chartv0.1.7Verified publisher

This is a little tool to keep track on a set of nodes, and see if they keep in step or if they go out of consensus.

About this chart

forkmon

This is a little tool to keep track on a set of nodes, and see if they keep in step or if they go out of consensus.

Homepage: https://github.com/ethereum/nodemonitor

Values

KeyTypeDefaultDescription
affinityobject{}Affinity configuration for pods
annotationsobject{}Annotations for the StatefulSet
configstringSee values.yamlConfig file
containerSecurityContextobjectSee values.yamlThe security context for containers
customCommandlist[]Command replacement for the forkmon container
endpointslist[{"addr":"http://execution-client:8545","kind":"rpc","name":"execution-client-name"}]Endpoints that you would like to monitor
extraArgslist[]Extra args for the forkmon container
extraContainerslist[]Additional containers
extraEnvlist[]Additional env variables
extraPortslist[]Additional ports. Useful when using extraContainers
extraVolumeMountslist[]Additional volume mounts
extraVolumeslist[]Additional volumes
fullnameOverridestring""Overrides the chart's computed fullname
httpPortint8080
image.pullPolicystring"IfNotPresent"forkmon container pull policy
image.repositorystring"holiman/nodemonitor"forkmon container image repository
image.tagstring"latest"forkmon container image tag
imagePullSecretslist[]Image pull secrets for Docker images
ingress.annotationsobject{}Annotations for Ingress
ingress.enabledboolfalseIngress resource for the HTTP API
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].pathslist[]
ingress.tlslist[]Ingress TLS
initContainerslist[]Additional init containers
livenessProbeobjectSee values.yamlLiveness probe
nameOverridestring""Overrides the chart's name
networkstring""Set a network name such as mainnet, holesky, sepolia
nodeSelectorobject{}Node selector for pods
persistence.accessModeslist["ReadWriteOnce"]Access mode for the volume claim template
persistence.annotationsobject{}Annotations for volume claim template
persistence.enabledboolfalseUses an EmptyDir when not enabled
persistence.existingClaimstringnilUse an existing PVC when persistence.enabled
persistence.selectorobject{}Selector for volume claim template
persistence.sizestring"1Gi"Requested size for volume claim template
persistence.storageClassNamestringnilUse a specific storage class E.g 'local-path' for local storage to achieve best performance Read more (https://github.com/rancher/local-path-provisioner)
persistentVolumeClaimRetentionPolicyobject{}PersistentVolumeClaim retention policy for the StatefulSet's volumeClaimTemplates (whenDeleted, whenScaled: Retain or Delete). Not rendered when empty, so Kubernetes keeps its default of retaining the PVCs. Ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
podAnnotationsobject{}Pod annotations
podDisruptionBudgetobject{}Define the PodDisruptionBudget spec If not set then a PodDisruptionBudget will not be created
podLabelsobject{}Pod labels
podManagementPolicystring"OrderedReady"Pod management policy
priorityClassNamestringnilPod priority class
readinessProbeobjectSee values.yamlReadiness probe
replicasint1Number of replicas
resourcesobject{}Resource requests and limits
secretEnvobject{}Additional env variables injected via a created secret
securityContextobjectSee values.yamlThe security context for pods
service.typestring"ClusterIP"Service type
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
terminationGracePeriodSecondsint30How long to wait until the pod is forcefully terminated
thirdparty_endpointslist[{"kind":"infura","name":"mainnet-infura","rate_limit":5},{"kind":"alchemy","name":"mainnet-alchemy","rate_limit":5},{"kind":"etherscan","name":"mainnet-etherscan","rate_limit":5}]Third party endpoints that you would like to monitor
tolerationslist[]Tolerations for pods
topologySpreadConstraintslist[]Topology Spread Constraints for pods
updateStrategyobject{"type":"RollingUpdate"}Update strategy for the Statefulset
updateStrategy.typestring"RollingUpdate"Update strategy type

Examples

Setting the configuration file

config.toml:
    # How often to reload data from the nodes
    reload_interval = "10s"
    # If specified, a http server will serve static content here
    server_address = "0.0.0.0:8080"

    # Shown in the document title, if specified
    chain_name="<NETWORK_NAME>"

    # Third party providers
    infura_key          = "<INFURA_API_KEY>"
    infura_endpoint     = "https://mainnet.infura.io/v3/"
    alchemy_key         = "<ALCHEMY_API_KEY>"
    alchemy_endpoint    = "https://eth-mainnet.g.alchemy.com/v2/"
    etherscan_key       = "<ETHERSCAN_API_KEY>"
    etherscan_endpoint  = "https://api.etherscan.io/api"

    [Metrics]

    enabled = true
    endpoint = "<INFLUX_ENDPOINT>"
    username = "<INFLUX_USERNAME>"
    database  = "<INFLUX_DB_NAME>"
    password  = "<INFLUX_PASSWORD>"

    # Local or non third party connection require rpc kind
    [[clients]]
      name = "<execution-client-name>"
      kind ="rpc"
      url  = "http://<execution-client>:<execution-client-port>"

    # Third party client configuration doesn't require url
    # Kind can vary between infura, alchemy or etherscan
    # Recommended to enable rate limit for third party services
    [[clients]]
      name = infura|alchemy|etcherscan
      kind = infura|alchemy|etherscan
      rate_limit = 5

Deploy forkmon with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has forkmon on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartforkmon is pinned at v0.1.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply