From 2991e45aaa4a26af3736d81a9966137348f8a62b Mon Sep 17 00:00:00 2001 From: Anthony Hausman Date: Fri, 21 Aug 2026 17:40:38 +0200 Subject: [PATCH 1/3] feat(helm): add deploymentAnnotations and podDisruptionBudget Support custom deployment metadata annotations and configurable PodDisruptionBudget for kagent-tools. Assisted-by: Gemini 3.7 Flash Signed-off-by: Anthony Hausman --- helm/kagent-tools/templates/deployment.yaml | 4 ++ helm/kagent-tools/templates/pdb.yaml | 29 ++++++++++ helm/kagent-tools/tests/deployment_test.yaml | 21 +++++++ helm/kagent-tools/tests/pdb_test.yaml | 59 ++++++++++++++++++++ helm/kagent-tools/values.yaml | 12 ++++ 5 files changed, 125 insertions(+) create mode 100644 helm/kagent-tools/templates/pdb.yaml create mode 100644 helm/kagent-tools/tests/pdb_test.yaml diff --git a/helm/kagent-tools/templates/deployment.yaml b/helm/kagent-tools/templates/deployment.yaml index 5a81ca9..715acab 100644 --- a/helm/kagent-tools/templates/deployment.yaml +++ b/helm/kagent-tools/templates/deployment.yaml @@ -5,6 +5,10 @@ metadata: namespace: {{ include "kagent-tools.namespace" . }} labels: {{- include "kagent-tools.labels" . | nindent 4 }} + {{- with .Values.deploymentAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.replicaCount }} selector: diff --git a/helm/kagent-tools/templates/pdb.yaml b/helm/kagent-tools/templates/pdb.yaml new file mode 100644 index 0000000..6cb9183 --- /dev/null +++ b/helm/kagent-tools/templates/pdb.yaml @@ -0,0 +1,29 @@ +{{- if .Values.podDisruptionBudget.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "kagent-tools.fullname" . }} + namespace: {{ include "kagent-tools.namespace" . }} + labels: + {{- include "kagent-tools.labels" . | nindent 4 }} + {{- with .Values.podDisruptionBudget.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.podDisruptionBudget.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + {{- end }} + {{- if .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }} + unhealthyPodEvictionPolicy: {{ .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }} + {{- end }} + selector: + matchLabels: + {{- include "kagent-tools.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/helm/kagent-tools/tests/deployment_test.yaml b/helm/kagent-tools/tests/deployment_test.yaml index 84bdaae..847a65d 100644 --- a/helm/kagent-tools/tests/deployment_test.yaml +++ b/helm/kagent-tools/tests/deployment_test.yaml @@ -173,3 +173,24 @@ tests: value: app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME + + - it: should not have deployment annotations by default + template: deployment.yaml + asserts: + - isNull: + path: metadata.annotations + + - it: should render custom deployment annotations + template: deployment.yaml + set: + deploymentAnnotations: + keel.sh/policy: "force" + example.com/annotation: "test-value" + asserts: + - equal: + path: metadata.annotations["keel.sh/policy"] + value: "force" + - equal: + path: metadata.annotations["example.com/annotation"] + value: "test-value" + diff --git a/helm/kagent-tools/tests/pdb_test.yaml b/helm/kagent-tools/tests/pdb_test.yaml new file mode 100644 index 0000000..f8e15e1 --- /dev/null +++ b/helm/kagent-tools/tests/pdb_test.yaml @@ -0,0 +1,59 @@ +suite: test pod disruption budget +templates: + - pdb.yaml +tests: + - it: should not render pdb by default + template: pdb.yaml + asserts: + - hasDocuments: + count: 0 + + - it: should render pdb when enabled with minAvailable + template: pdb.yaml + set: + podDisruptionBudget: + enabled: true + minAvailable: 1 + asserts: + - isKind: + of: PodDisruptionBudget + - equal: + path: metadata.name + value: RELEASE-NAME + - equal: + path: spec.minAvailable + value: 1 + - isNull: + path: spec.maxUnavailable + - equal: + path: spec.selector.matchLabels + value: + app.kubernetes.io/name: RELEASE-NAME + app.kubernetes.io/instance: RELEASE-NAME + + - it: should render pdb with maxUnavailable and annotations/labels + template: pdb.yaml + set: + podDisruptionBudget: + enabled: true + maxUnavailable: "50%" + unhealthyPodEvictionPolicy: IfHealthyBudget + labels: + custom-label: pdb-label + annotations: + custom-annotation: pdb-annotation + asserts: + - isKind: + of: PodDisruptionBudget + - equal: + path: spec.maxUnavailable + value: "50%" + - equal: + path: spec.unhealthyPodEvictionPolicy + value: IfHealthyBudget + - equal: + path: metadata.labels["custom-label"] + value: pdb-label + - equal: + path: metadata.annotations["custom-annotation"] + value: pdb-annotation diff --git a/helm/kagent-tools/values.yaml b/helm/kagent-tools/values.yaml index 45755f3..817d0f6 100644 --- a/helm/kagent-tools/values.yaml +++ b/helm/kagent-tools/values.yaml @@ -78,6 +78,9 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +# Annotations to add to the deployment +deploymentAnnotations: {} + podAnnotations: {} podSecurityContext: {} @@ -90,6 +93,15 @@ securityContext: {} # readOnlyRootFilesystem: true # runAsNonRoot: true # runAsUser: 1000 + +# PodDisruptionBudget configuration +podDisruptionBudget: + enabled: false + # minAvailable: 1 + # maxUnavailable: 1 + # labels: {} + # annotations: {} + # unhealthyPodEvictionPolicy: IfHealthyBudget # Node taints which will be tolerated for Pod. tolerations: [] From 00bc01105598e3c3dbb140da455767cc4260c725 Mon Sep 17 00:00:00 2001 From: Dmytro Rashko Date: Wed, 11 Nov 2026 23:41:35 +0100 Subject: [PATCH 2/3] fix(helm): preserve zero PDB budgets and validate minAvailable/maxUnavailable Use hasKey so minAvailable/maxUnavailable of 0 are rendered, fail when both or neither are set, and add unit tests for these cases. Signed-off-by: Dmytro Rashko --- helm/kagent-tools/templates/pdb.yaml | 36 +++++++++------ helm/kagent-tools/tests/deployment_test.yaml | 1 - helm/kagent-tools/tests/pdb_test.yaml | 46 ++++++++++++++++++++ helm/kagent-tools/values.yaml | 2 + 4 files changed, 71 insertions(+), 14 deletions(-) diff --git a/helm/kagent-tools/templates/pdb.yaml b/helm/kagent-tools/templates/pdb.yaml index 6cb9183..ff47234 100644 --- a/helm/kagent-tools/templates/pdb.yaml +++ b/helm/kagent-tools/templates/pdb.yaml @@ -1,29 +1,39 @@ -{{- if .Values.podDisruptionBudget.enabled }} +{{- with .Values.podDisruptionBudget }} +{{- if .enabled }} +{{- $hasMinAvailable := and (hasKey . "minAvailable") (ne .minAvailable nil) }} +{{- $hasMaxUnavailable := and (hasKey . "maxUnavailable") (ne .maxUnavailable nil) }} +{{- if and $hasMinAvailable $hasMaxUnavailable }} +{{- fail "podDisruptionBudget: set only one of minAvailable or maxUnavailable" }} +{{- end }} +{{- if not (or $hasMinAvailable $hasMaxUnavailable) }} +{{- fail "podDisruptionBudget: one of minAvailable or maxUnavailable is required when enabled" }} +{{- end }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: - name: {{ include "kagent-tools.fullname" . }} - namespace: {{ include "kagent-tools.namespace" . }} + name: {{ include "kagent-tools.fullname" $ }} + namespace: {{ include "kagent-tools.namespace" $ }} labels: - {{- include "kagent-tools.labels" . | nindent 4 }} - {{- with .Values.podDisruptionBudget.labels }} + {{- include "kagent-tools.labels" $ | nindent 4 }} + {{- with .labels }} {{- toYaml . | nindent 4 }} {{- end }} - {{- with .Values.podDisruptionBudget.annotations }} + {{- with .annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- if .Values.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} + {{- if $hasMinAvailable }} + minAvailable: {{ .minAvailable }} {{- end }} - {{- if .Values.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + {{- if $hasMaxUnavailable }} + maxUnavailable: {{ .maxUnavailable }} {{- end }} - {{- if .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }} - unhealthyPodEvictionPolicy: {{ .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }} + {{- with .unhealthyPodEvictionPolicy }} + unhealthyPodEvictionPolicy: {{ . }} {{- end }} selector: matchLabels: - {{- include "kagent-tools.selectorLabels" . | nindent 6 }} + {{- include "kagent-tools.selectorLabels" $ | nindent 6 }} +{{- end }} {{- end }} diff --git a/helm/kagent-tools/tests/deployment_test.yaml b/helm/kagent-tools/tests/deployment_test.yaml index 847a65d..5f3060f 100644 --- a/helm/kagent-tools/tests/deployment_test.yaml +++ b/helm/kagent-tools/tests/deployment_test.yaml @@ -193,4 +193,3 @@ tests: - equal: path: metadata.annotations["example.com/annotation"] value: "test-value" - diff --git a/helm/kagent-tools/tests/pdb_test.yaml b/helm/kagent-tools/tests/pdb_test.yaml index f8e15e1..4568e82 100644 --- a/helm/kagent-tools/tests/pdb_test.yaml +++ b/helm/kagent-tools/tests/pdb_test.yaml @@ -57,3 +57,49 @@ tests: - equal: path: metadata.annotations["custom-annotation"] value: pdb-annotation + + - it: should render minAvailable of zero + template: pdb.yaml + set: + podDisruptionBudget: + enabled: true + minAvailable: 0 + asserts: + - equal: + path: spec.minAvailable + value: 0 + - notExists: + path: spec.maxUnavailable + + - it: should render maxUnavailable of zero + template: pdb.yaml + set: + podDisruptionBudget: + enabled: true + maxUnavailable: 0 + asserts: + - equal: + path: spec.maxUnavailable + value: 0 + - notExists: + path: spec.minAvailable + + - it: should fail when both minAvailable and maxUnavailable are set + template: pdb.yaml + set: + podDisruptionBudget: + enabled: true + minAvailable: 1 + maxUnavailable: 1 + asserts: + - failedTemplate: + errorMessage: "podDisruptionBudget: set only one of minAvailable or maxUnavailable" + + - it: should fail when neither minAvailable nor maxUnavailable is set + template: pdb.yaml + set: + podDisruptionBudget: + enabled: true + asserts: + - failedTemplate: + errorMessage: "podDisruptionBudget: one of minAvailable or maxUnavailable is required when enabled" diff --git a/helm/kagent-tools/values.yaml b/helm/kagent-tools/values.yaml index 817d0f6..e8526c6 100644 --- a/helm/kagent-tools/values.yaml +++ b/helm/kagent-tools/values.yaml @@ -95,6 +95,8 @@ securityContext: {} # runAsUser: 1000 # PodDisruptionBudget configuration +# Set exactly one of minAvailable or maxUnavailable when enabled. +# With replicaCount: 1, minAvailable: 1 (or maxUnavailable: 0) blocks node drains. podDisruptionBudget: enabled: false # minAvailable: 1 From a597d3fdd60b028aa777933ecefdc37eeaca4890 Mon Sep 17 00:00:00 2001 From: Dmytro Rashko Date: Wed, 11 Nov 2026 23:47:58 +0100 Subject: [PATCH 3/3] feat(helm): combine kagent and istio PDB patterns - Add kagent-tools.pdb.isSet/validate helpers: null and "" are unset, 0 and percentages are kept; both-set and neither-set fail with actionable messages (mirrors kagent's controller PDB). - Default to maxUnavailable: 1 when enabled. - Only render the PDB when replicaCount > 1 (istio pattern), still validating config, and warn in NOTES when it is skipped. - Expand unit tests. Signed-off-by: Dmytro Rashko --- helm/kagent-tools/templates/NOTES.txt | 6 +- helm/kagent-tools/templates/_helpers.tpl | 39 ++++++++ helm/kagent-tools/templates/pdb.yaml | 38 +++----- helm/kagent-tools/tests/pdb_test.yaml | 112 ++++++++++++++++------- helm/kagent-tools/values.yaml | 28 ++++-- 5 files changed, 157 insertions(+), 66 deletions(-) diff --git a/helm/kagent-tools/templates/NOTES.txt b/helm/kagent-tools/templates/NOTES.txt index 2876aa1..1c14345 100644 --- a/helm/kagent-tools/templates/NOTES.txt +++ b/helm/kagent-tools/templates/NOTES.txt @@ -7,4 +7,8 @@ # # 2. Then visit http://127.0.0.1:{{.Values.service.ports.tools.port}}/mcp to use MCP # -############################################################################################### \ No newline at end of file +###############################################################################################{{- if and (.Values.podDisruptionBudget).enabled (not (include "kagent-tools.pdb.shouldRender" .)) }} + +WARNING: podDisruptionBudget.enabled is true but replicaCount is {{ .Values.replicaCount }}. +The PodDisruptionBudget was not created; set replicaCount > 1 to enable it. +{{- end }} diff --git a/helm/kagent-tools/templates/_helpers.tpl b/helm/kagent-tools/templates/_helpers.tpl index f98bd5a..cb46072 100644 --- a/helm/kagent-tools/templates/_helpers.tpl +++ b/helm/kagent-tools/templates/_helpers.tpl @@ -120,6 +120,45 @@ over it would brick an install the value was never about. {{- end -}} {{- end -}} +{{/* +Prints "1" when a PDB budget value is set. null and "" mean unset; 0 and +percentage strings are valid budgets and must be kept. +*/}} +{{- define "kagent-tools.pdb.isSet" -}} +{{- if not (kindIs "invalid" .) -}} +{{- if ne (toString .) "" -}}1{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Kubernetes rejects a PodDisruptionBudget that sets both minAvailable and +maxUnavailable, and one that sets neither is meaningless, so both fail at +template time. Runs whenever the PDB is enabled, even if the replica guard +skips rendering, so misconfiguration surfaces before replicas are scaled up. +*/}} +{{- define "kagent-tools.pdb.validate" -}} +{{- $pdb := .Values.podDisruptionBudget | default dict -}} +{{- if $pdb.enabled -}} +{{- $hasMinAvailable := include "kagent-tools.pdb.isSet" $pdb.minAvailable -}} +{{- $hasMaxUnavailable := include "kagent-tools.pdb.isSet" $pdb.maxUnavailable -}} +{{- if and $hasMinAvailable $hasMaxUnavailable -}} +{{- fail "podDisruptionBudget: minAvailable and maxUnavailable are mutually exclusive. Set exactly one (to use minAvailable, set podDisruptionBudget.maxUnavailable=null)." -}} +{{- end -}} +{{- if not (or $hasMinAvailable $hasMaxUnavailable) -}} +{{- fail "podDisruptionBudget is enabled but neither minAvailable nor maxUnavailable is set. Set exactly one." -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +A PodDisruptionBudget is only rendered for more than one replica: with a single +replica it either protects nothing or blocks node drains entirely. +*/}} +{{- define "kagent-tools.pdb.shouldRender" -}} +{{- $pdb := .Values.podDisruptionBudget | default dict -}} +{{- if and $pdb.enabled (gt (int .Values.replicaCount) 1) -}}1{{- end -}} +{{- end -}} + {{/* Pull secrets for the pod: the chart's own list merged (union) with global.imagePullSecrets. Renders nothing when both are empty. diff --git a/helm/kagent-tools/templates/pdb.yaml b/helm/kagent-tools/templates/pdb.yaml index ff47234..0ff5484 100644 --- a/helm/kagent-tools/templates/pdb.yaml +++ b/helm/kagent-tools/templates/pdb.yaml @@ -1,39 +1,31 @@ -{{- with .Values.podDisruptionBudget }} -{{- if .enabled }} -{{- $hasMinAvailable := and (hasKey . "minAvailable") (ne .minAvailable nil) }} -{{- $hasMaxUnavailable := and (hasKey . "maxUnavailable") (ne .maxUnavailable nil) }} -{{- if and $hasMinAvailable $hasMaxUnavailable }} -{{- fail "podDisruptionBudget: set only one of minAvailable or maxUnavailable" }} -{{- end }} -{{- if not (or $hasMinAvailable $hasMaxUnavailable) }} -{{- fail "podDisruptionBudget: one of minAvailable or maxUnavailable is required when enabled" }} -{{- end }} +{{- include "kagent-tools.pdb.validate" . }} +{{- if include "kagent-tools.pdb.shouldRender" . }} +{{- $pdb := .Values.podDisruptionBudget }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: - name: {{ include "kagent-tools.fullname" $ }} - namespace: {{ include "kagent-tools.namespace" $ }} + name: {{ include "kagent-tools.fullname" . }} + namespace: {{ include "kagent-tools.namespace" . }} labels: - {{- include "kagent-tools.labels" $ | nindent 4 }} - {{- with .labels }} + {{- include "kagent-tools.labels" . | nindent 4 }} + {{- with $pdb.labels }} {{- toYaml . | nindent 4 }} {{- end }} - {{- with .annotations }} + {{- with $pdb.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- if $hasMinAvailable }} - minAvailable: {{ .minAvailable }} + {{- if include "kagent-tools.pdb.isSet" $pdb.minAvailable }} + minAvailable: {{ $pdb.minAvailable }} + {{- else }} + maxUnavailable: {{ $pdb.maxUnavailable }} {{- end }} - {{- if $hasMaxUnavailable }} - maxUnavailable: {{ .maxUnavailable }} - {{- end }} - {{- with .unhealthyPodEvictionPolicy }} + {{- with $pdb.unhealthyPodEvictionPolicy }} unhealthyPodEvictionPolicy: {{ . }} {{- end }} selector: matchLabels: - {{- include "kagent-tools.selectorLabels" $ | nindent 6 }} -{{- end }} + {{- /* Same helper as the Deployment's spec.selector, so the budget cannot drift from its pods. */}} + {{- include "kagent-tools.selectorLabels" . | nindent 6 }} {{- end }} diff --git a/helm/kagent-tools/tests/pdb_test.yaml b/helm/kagent-tools/tests/pdb_test.yaml index 4568e82..b2d8885 100644 --- a/helm/kagent-tools/tests/pdb_test.yaml +++ b/helm/kagent-tools/tests/pdb_test.yaml @@ -3,17 +3,15 @@ templates: - pdb.yaml tests: - it: should not render pdb by default - template: pdb.yaml asserts: - hasDocuments: count: 0 - - it: should render pdb when enabled with minAvailable - template: pdb.yaml + - it: should render default maxUnavailable of 1 when enabled with multiple replicas set: + replicaCount: 2 podDisruptionBudget: enabled: true - minAvailable: 1 asserts: - isKind: of: PodDisruptionBudget @@ -21,49 +19,58 @@ tests: path: metadata.name value: RELEASE-NAME - equal: - path: spec.minAvailable - value: 1 - - isNull: path: spec.maxUnavailable + value: 1 + - notExists: + path: spec.minAvailable + - notExists: + path: spec.unhealthyPodEvictionPolicy - equal: path: spec.selector.matchLabels value: app.kubernetes.io/name: RELEASE-NAME app.kubernetes.io/instance: RELEASE-NAME - - it: should render pdb with maxUnavailable and annotations/labels - template: pdb.yaml + - it: should not render pdb with a single replica set: + replicaCount: 1 podDisruptionBudget: enabled: true - maxUnavailable: "50%" - unhealthyPodEvictionPolicy: IfHealthyBudget - labels: - custom-label: pdb-label - annotations: - custom-annotation: pdb-annotation asserts: - - isKind: - of: PodDisruptionBudget + - hasDocuments: + count: 0 + + - it: should still validate pdb settings with a single replica + set: + replicaCount: 1 + podDisruptionBudget: + enabled: true + minAvailable: 1 + asserts: + - failedTemplate: + errorMessage: "podDisruptionBudget: minAvailable and maxUnavailable are mutually exclusive. Set exactly one (to use minAvailable, set podDisruptionBudget.maxUnavailable=null)." + + - it: should render minAvailable when maxUnavailable is nulled + set: + replicaCount: 3 + podDisruptionBudget: + enabled: true + minAvailable: "50%" + maxUnavailable: null + asserts: - equal: - path: spec.maxUnavailable + path: spec.minAvailable value: "50%" - - equal: - path: spec.unhealthyPodEvictionPolicy - value: IfHealthyBudget - - equal: - path: metadata.labels["custom-label"] - value: pdb-label - - equal: - path: metadata.annotations["custom-annotation"] - value: pdb-annotation + - notExists: + path: spec.maxUnavailable - it: should render minAvailable of zero - template: pdb.yaml set: + replicaCount: 2 podDisruptionBudget: enabled: true minAvailable: 0 + maxUnavailable: null asserts: - equal: path: spec.minAvailable @@ -72,8 +79,8 @@ tests: path: spec.maxUnavailable - it: should render maxUnavailable of zero - template: pdb.yaml set: + replicaCount: 2 podDisruptionBudget: enabled: true maxUnavailable: 0 @@ -84,22 +91,61 @@ tests: - notExists: path: spec.minAvailable + - it: should treat empty string budgets as unset + set: + replicaCount: 2 + podDisruptionBudget: + enabled: true + minAvailable: "" + maxUnavailable: "25%" + asserts: + - equal: + path: spec.maxUnavailable + value: "25%" + - notExists: + path: spec.minAvailable + + - it: should render eviction policy, labels and annotations + set: + replicaCount: 2 + podDisruptionBudget: + enabled: true + unhealthyPodEvictionPolicy: AlwaysAllow + labels: + custom-label: pdb-label + annotations: + custom-annotation: pdb-annotation + asserts: + - equal: + path: spec.unhealthyPodEvictionPolicy + value: AlwaysAllow + - equal: + path: metadata.labels["custom-label"] + value: pdb-label + - equal: + path: metadata.labels["app.kubernetes.io/name"] + value: RELEASE-NAME + - equal: + path: metadata.annotations["custom-annotation"] + value: pdb-annotation + - it: should fail when both minAvailable and maxUnavailable are set - template: pdb.yaml set: + replicaCount: 2 podDisruptionBudget: enabled: true minAvailable: 1 maxUnavailable: 1 asserts: - failedTemplate: - errorMessage: "podDisruptionBudget: set only one of minAvailable or maxUnavailable" + errorMessage: "podDisruptionBudget: minAvailable and maxUnavailable are mutually exclusive. Set exactly one (to use minAvailable, set podDisruptionBudget.maxUnavailable=null)." - it: should fail when neither minAvailable nor maxUnavailable is set - template: pdb.yaml set: + replicaCount: 2 podDisruptionBudget: enabled: true + maxUnavailable: null asserts: - failedTemplate: - errorMessage: "podDisruptionBudget: one of minAvailable or maxUnavailable is required when enabled" + errorMessage: "podDisruptionBudget is enabled but neither minAvailable nor maxUnavailable is set. Set exactly one." diff --git a/helm/kagent-tools/values.yaml b/helm/kagent-tools/values.yaml index e8526c6..7b519e9 100644 --- a/helm/kagent-tools/values.yaml +++ b/helm/kagent-tools/values.yaml @@ -94,17 +94,27 @@ securityContext: {} # runAsNonRoot: true # runAsUser: 1000 -# PodDisruptionBudget configuration -# Set exactly one of minAvailable or maxUnavailable when enabled. -# With replicaCount: 1, minAvailable: 1 (or maxUnavailable: 0) blocks node drains. +# PodDisruptionBudget for the tools Deployment. +# Only rendered when replicaCount > 1: with a single replica a PDB either +# protects nothing or blocks node drains entirely. podDisruptionBudget: + # -- Set to true to create the PodDisruptionBudget. enabled: false - # minAvailable: 1 - # maxUnavailable: 1 - # labels: {} - # annotations: {} - # unhealthyPodEvictionPolicy: IfHealthyBudget - + # -- Minimum number of pods that must remain available. Int or percentage + # string (e.g. `1` or `"50%"`). Mutually exclusive with `maxUnavailable`; + # to use it, also set `maxUnavailable: null`. + minAvailable: null + # -- Maximum number of pods that may be unavailable. Int or percentage + # string (e.g. `1` or `"50%"`). Mutually exclusive with `minAvailable`. + maxUnavailable: 1 + # -- `spec.unhealthyPodEvictionPolicy`: `IfHealthyBudget` (Kubernetes + # default) or `AlwaysAllow`. Unset leaves the Kubernetes default. + unhealthyPodEvictionPolicy: "" + # -- Extra labels for the PodDisruptionBudget. + labels: {} + # -- Annotations for the PodDisruptionBudget. + annotations: {} + # Node taints which will be tolerated for Pod. tolerations: []