From a212da87457820ffa0b2a1eccff0b112d16e0e18 Mon Sep 17 00:00:00 2001 From: Evgeny Formanenko Date: Mon, 29 Jun 2026 10:53:40 +0300 Subject: [PATCH] feat(chart): nodeSelector/tolerations/affinity for api-rs, slackbotv2, postgres Add standard pod-scheduling knobs to the api-rs, slackbotv2 and postgres workloads, mirroring the existing repoCache support. Lets operators pin the control plane to dedicated nodes (e.g. a spot pool) without forking the chart. Defaults are empty ({} / []) so rendered output is unchanged when unset. values.schema.json and the chart version are updated to match. Co-Authored-By: Claude Opus 4.8 (1M context) --- contrib/chart/Chart.yaml | 2 +- contrib/chart/templates/apirs.yaml | 12 ++++++++++++ contrib/chart/templates/slackbotv2.yaml | 12 ++++++++++++ contrib/chart/templates/workloads.yaml | 12 ++++++++++++ contrib/chart/values.schema.json | 15 ++++++++++++--- contrib/chart/values.yaml | 14 ++++++++++++++ 6 files changed, 63 insertions(+), 4 deletions(-) diff --git a/contrib/chart/Chart.yaml b/contrib/chart/Chart.yaml index 9e2da353e..11c8131d4 100644 --- a/contrib/chart/Chart.yaml +++ b/contrib/chart/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: centaur description: Helm chart for the trusted Centaur control plane type: application -version: 0.1.79 +version: 0.1.80 appVersion: "0.1.0" dependencies: - name: connect diff --git a/contrib/chart/templates/apirs.yaml b/contrib/chart/templates/apirs.yaml index 3557e28d7..dd579ea99 100644 --- a/contrib/chart/templates/apirs.yaml +++ b/contrib/chart/templates/apirs.yaml @@ -138,6 +138,18 @@ spec: serviceAccountName: {{ $apiRsName }} {{- with .Values.global.imagePullSecrets }} imagePullSecrets: +{{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.apiRs.nodeSelector }} + nodeSelector: +{{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.apiRs.affinity }} + affinity: +{{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.apiRs.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} {{- end }} containers: diff --git a/contrib/chart/templates/slackbotv2.yaml b/contrib/chart/templates/slackbotv2.yaml index 30c6ac6cb..346716df9 100644 --- a/contrib/chart/templates/slackbotv2.yaml +++ b/contrib/chart/templates/slackbotv2.yaml @@ -30,6 +30,18 @@ spec: automountServiceAccountToken: false {{- with .Values.global.imagePullSecrets }} imagePullSecrets: +{{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.slackbotv2.nodeSelector }} + nodeSelector: +{{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.slackbotv2.affinity }} + affinity: +{{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.slackbotv2.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} {{- end }} containers: diff --git a/contrib/chart/templates/workloads.yaml b/contrib/chart/templates/workloads.yaml index e11fec05a..939b07fc5 100644 --- a/contrib/chart/templates/workloads.yaml +++ b/contrib/chart/templates/workloads.yaml @@ -25,6 +25,18 @@ spec: automountServiceAccountToken: false {{- with .Values.global.imagePullSecrets }} imagePullSecrets: +{{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.postgres.nodeSelector }} + nodeSelector: +{{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.postgres.affinity }} + affinity: +{{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.postgres.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} {{- end }} containers: diff --git a/contrib/chart/values.schema.json b/contrib/chart/values.schema.json index 26a9d1f03..8cf7a77cb 100644 --- a/contrib/chart/values.schema.json +++ b/contrib/chart/values.schema.json @@ -256,7 +256,10 @@ "extraEnv": { "type": "object", "additionalProperties": { "type": "string" } - } + }, + "nodeSelector": { "type": "object" }, + "tolerations": { "type": "array" }, + "affinity": { "type": "object" } } }, "slackbotv2": { @@ -276,7 +279,10 @@ "extraEnv": { "type": "object", "additionalProperties": { "type": "string" } - } + }, + "nodeSelector": { "type": "object" }, + "tolerations": { "type": "array" }, + "affinity": { "type": "object" } } }, "postgres": { @@ -294,7 +300,10 @@ "enabled": { "type": "boolean" }, "sizeLimit": { "type": "string" } } - } + }, + "nodeSelector": { "type": "object" }, + "tolerations": { "type": "array" }, + "affinity": { "type": "object" } } }, "networkPolicy": { diff --git a/contrib/chart/values.yaml b/contrib/chart/values.yaml index 78cd6b207..9726053c7 100644 --- a/contrib/chart/values.yaml +++ b/contrib/chart/values.yaml @@ -346,6 +346,10 @@ apiRs: terminationGracePeriodSeconds: 35 extraEnv: {} resources: {} + # Pin the control plane to specific nodes (e.g. a dedicated spot pool). + nodeSelector: {} + tolerations: [] + affinity: {} # Chat SDK Slackbot v2. Forwards Slack events to the api-rs control plane # (:8080) and streams responses back. Listens on :3001. @@ -368,6 +372,10 @@ slackbotv2: annotations: {} extraEnv: {} resources: {} + # Pin to specific nodes (e.g. a dedicated spot pool). + nodeSelector: {} + tolerations: [] + affinity: {} # Chat SDK Linear bot — Linear agent (actor=app) ingress. Receives # AgentSessionEvent webhooks on /api/webhooks/linear, forwards sessions to the @@ -456,6 +464,12 @@ postgres: enabled: true sizeLimit: 1Gi resources: {} + # Pin to specific nodes (e.g. a dedicated spot pool). Note: a StatefulSet's + # PVC binds to the node's zone, so keep the pool single-zone or use a + # multi-zone-aware storage class when pinning Postgres. + nodeSelector: {} + tolerations: [] + affinity: {} ingress: enabled: false