From 547863496ada619d8ec918cbe5d2f9c42793ba1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?coffee=20=E2=98=95=EF=B8=8F?= Date: Wed, 3 Jun 2026 08:53:49 -0400 Subject: [PATCH] feat(chart): add ha resource overrides --- charts/abstract-node/templates/deployment-api.yaml | 2 +- charts/abstract-node/templates/statefulset.yaml | 3 ++- charts/abstract-node/values.yaml | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/abstract-node/templates/deployment-api.yaml b/charts/abstract-node/templates/deployment-api.yaml index 1fb84bc..792c914 100644 --- a/charts/abstract-node/templates/deployment-api.yaml +++ b/charts/abstract-node/templates/deployment-api.yaml @@ -193,7 +193,7 @@ spec: - name: healthcheck containerPort: {{ .Values.healthcheck.port }} {{- end }} - {{- with .Values.resources }} + {{- with (default .Values.resources .Values.ha.api.resources) }} resources: {{ toYaml . | nindent 12 | trim }} {{- end }} diff --git a/charts/abstract-node/templates/statefulset.yaml b/charts/abstract-node/templates/statefulset.yaml index 5d412c1..5c6c213 100644 --- a/charts/abstract-node/templates/statefulset.yaml +++ b/charts/abstract-node/templates/statefulset.yaml @@ -260,7 +260,8 @@ spec: mountPath: /consensus/config.yaml subPath: config.yaml {{- end }} - {{- with .Values.resources }} + {{- $resources := ternary (default .Values.resources .Values.ha.core.resources) .Values.resources .Values.ha.enabled }} + {{- with $resources }} resources: {{ toYaml . | nindent 12 | trim }} {{- end }} diff --git a/charts/abstract-node/values.yaml b/charts/abstract-node/values.yaml index d01e3c8..bd6e908 100644 --- a/charts/abstract-node/values.yaml +++ b/charts/abstract-node/values.yaml @@ -102,12 +102,20 @@ ha: ## components: "" extraArgs: [] + ## Resource requests and limits for the core StatefulSet pod. + ## Falls back to top-level resources when empty. + ## + resources: {} api: replicaCount: 2 ## Components for API replicas. Leave empty to use "api". ## components: "" extraArgs: [] + ## Resource requests and limits for API Deployment pods. + ## Falls back to top-level resources when empty. + ## + resources: {} service: ## API service defaults to a normal ClusterIP service for load balancing. ##