From 248039265285c8d7d43004bc94052a9135cc8138 Mon Sep 17 00:00:00 2001 From: Valerii Onyshchenko Date: Tue, 16 Dec 2025 17:48:39 +0200 Subject: [PATCH] feat: add per-deployment resource configuration for ghost and vao - Add separate resource constraints for ghost and vao deployments - Update deployment templates to use deployment-specific resources with fallback to global - Bump chart version to 0.4.9 - Update documentation with new resource fields --- charts/validator/Chart.yaml | 2 +- charts/validator/README.md | 8 +++--- .../validator/templates/deployment-vao.yaml | 2 +- charts/validator/templates/deployment.yaml | 4 +-- charts/validator/values.yaml | 26 +++++++++++++++++++ 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/charts/validator/Chart.yaml b/charts/validator/Chart.yaml index dc53a79..e507283 100644 --- a/charts/validator/Chart.yaml +++ b/charts/validator/Chart.yaml @@ -22,7 +22,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: "0.4.8" +version: "0.4.9" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/validator/README.md b/charts/validator/README.md index ee99ece..271ba85 100644 --- a/charts/validator/README.md +++ b/charts/validator/README.md @@ -1,6 +1,6 @@ # validator -![Version: 0.4.8](https://img.shields.io/badge/Version-0.4.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.66.2](https://img.shields.io/badge/AppVersion-0.66.2-informational?style=flat-square) +![Version: 0.4.9](https://img.shields.io/badge/Version-0.4.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.66.2](https://img.shields.io/badge/AppVersion-0.66.2-informational?style=flat-square) A Helm chart for deploying Chronicle Validator on Kubernetes @@ -16,12 +16,13 @@ A Helm chart for deploying Chronicle Validator on Kubernetes | Key | Type | Default | Description | |-----|------|---------|-------------| | extraObjects | list | `[]` | Extra K8s manifests to deploy | -| ghost | object | `{"argsOverride":[],"commandOverride":null,"env":{"normal":{},"raw":{}},"ethConfig":{},"rpcUrl":null,"service":{"annotations":{},"ports":{"libp2p":{"port":8000,"protocol":"TCP"},"webapi":{"port":8080,"protocol":"TCP"}},"type":"LoadBalancer"},"watchdogConfigReg":"0x94Fea534aef6df5cF66C2DAE5CE0A05d10C068F3","webApi":{"enabled":true,"listenAddr":"0.0.0.0:8080"}}` | Values for Ghost | +| ghost | object | `{"argsOverride":[],"commandOverride":null,"env":{"normal":{},"raw":{}},"ethConfig":{},"resources":{},"rpcUrl":null,"service":{"annotations":{},"ports":{"libp2p":{"port":8000,"protocol":"TCP"},"webapi":{"port":8080,"protocol":"TCP"}},"type":"LoadBalancer"},"watchdogConfigReg":"0x94Fea534aef6df5cF66C2DAE5CE0A05d10C068F3","webApi":{"enabled":true,"listenAddr":"0.0.0.0:8080"}}` | Values for Ghost | | ghost.argsOverride | list | `[]` | args override for the validator | | ghost.commandOverride | string | `nil` | command override for the validator | | ghost.env | object | `{"normal":{},"raw":{}}` | Environment variable listing | | ghost.env.normal | object | `{}` | un-encrypted env vars passed to the pod | | ghost.ethConfig | object | `{}` | Provide ETH keys from existing secrets : **NB** use only existing secret OR env vars, do not provide both | +| ghost.resources | object | `{}` | Resources constraints for the validator, CPU, Memory, etc. | | ghost.service | object | `{"annotations":{},"ports":{"libp2p":{"port":8000,"protocol":"TCP"},"webapi":{"port":8080,"protocol":"TCP"}},"type":"LoadBalancer"}` | Service type for the validator | | ghost.service.annotations | object | `{}` | Annotations to add to the service | | ghost.service.ports.libp2p | object | `{"port":8000,"protocol":"TCP"}` | libp2p port for the validator service | @@ -71,11 +72,10 @@ A Helm chart for deploying Chronicle Validator on Kubernetes | vao.env | object | `{"normal":{"CFG_DEFI_ENABLE":"0","CFG_VAO_ENABLE":"1"},"raw":{}}` | Environment variable listing | | vao.env.normal | object | `{"CFG_DEFI_ENABLE":"0","CFG_VAO_ENABLE":"1"}` | un-encrypted env vars passed to the pod | | vao.extraVolumes | list | `[]` | Extra volumes to mount (typically for secrets) | +| vao.resources | object | `{}` | Resources constraints for the validator, CPU, Memory, etc. | | vao.service | object | `{"annotations":{},"ports":{"libp2p":{"port":8001,"protocol":"TCP"}},"type":"LoadBalancer"}` | Service type for the validator | | vao.service.annotations | object | `{}` | Annotations to add to the service | | vao.service.ports.libp2p | object | `{"port":8001,"protocol":"TCP"}` | libp2p port for the validator service | | vao.service.type | string | `"LoadBalancer"` | Type of service for the validator, only `LoadBalancer` supported for now | | vao.watchdogConfigReg | string | `"0x064358f9b6428C51F80511D73AFEb3A9e5Cf0213"` | WATCHDOG onchain config address | ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/charts/validator/templates/deployment-vao.yaml b/charts/validator/templates/deployment-vao.yaml index 9f0b7d9..4a5bcf7 100644 --- a/charts/validator/templates/deployment-vao.yaml +++ b/charts/validator/templates/deployment-vao.yaml @@ -143,7 +143,7 @@ spec: {{- end }} resources: - {{- toYaml .Values.global.resources | nindent 12 }} + {{- toYaml ( .Values.vao.resources | default .Values.global.resources ) | nindent 12 }} {{- if .Values.vao.extraVolumes }} diff --git a/charts/validator/templates/deployment.yaml b/charts/validator/templates/deployment.yaml index d10bc89..21d9987 100644 --- a/charts/validator/templates/deployment.yaml +++ b/charts/validator/templates/deployment.yaml @@ -94,7 +94,7 @@ spec: ### -- LIBP2P - name: CFG_LIBP2P_LISTEN_ADDRS value: "/ip4/0.0.0.0/tcp/{{ .Values.ghost.service.ports.libp2p.port | default 8000 }}" - + ### -- WEB API {{- if .Values.ghost.webApi.enabled }} - name: CFG_WEBAPI_ENABLE @@ -173,7 +173,7 @@ spec: {{- end }} resources: - {{- toYaml .Values.global.resources | nindent 12 }} + {{- toYaml ( .Values.ghost.resources | default .Values.global.resources ) | nindent 12 }} {{- with .Values.global.nodeSelector }} diff --git a/charts/validator/values.yaml b/charts/validator/values.yaml index c596c06..e002212 100644 --- a/charts/validator/values.yaml +++ b/charts/validator/values.yaml @@ -144,6 +144,19 @@ ghost: # -- Listen address for the web api listenAddr: "0.0.0.0:8080" + # -- Resources constraints for the validator, CPU, Memory, etc. + 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 + # -- Provide ETH keys from existing secrets : **NB** use only existing secret OR env vars, do not provide both ethConfig: {} # ethFrom: @@ -226,6 +239,19 @@ vao: # name: foo-secret # key: foo-key + # -- Resources constraints for the validator, CPU, Memory, etc. + 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 + # -- Service type for the validator service: # -- Type of service for the validator, only `LoadBalancer` supported for now