Repository: cilium/cilium
Pull request #39299: helm: PodDisruptionBudget takes additional keys in v1.27+
Author: login: jcpunk
Labels: name: release-note/minor
description: This PR changes functionality that users may find relevant to operating Cilium.
name: ready-to-merge
description: This PR has passed all tests and received consensus from code owners to merge.
name: area/helm
description: Impacts helm charts and user deployment experience
name: kind/community-contribution
description: This was a contribution made by a community member.
Created: 2025-05-02T20:55:41Z | Merged: 2025-05-16T11:13:36Z

Please ensure your pull request adheres to the following guidelines:

- [x] For first time contributors, read [Submitting a pull request](https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#submitting-a-pull-request)
- [x] All code is covered by unit and/or runtime tests where feasible.
- [x] All commits contain a well written commit description including a title,
      description and a `Fixes: #XXX` line if the commit addresses a particular
      GitHub issue.
- [x] If your commit description contains a `Fixes: <commit-id>` tag, then
      please add the commit author[s] as reviewer[s] to this issue.
- [x] All commits are signed off. See the section [Developer’s Certificate of Origin](https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#dev-coo)
- [x] Provide a title or release-note blurb suitable for the release notes.
- [x] Are you a user of Cilium? Please add yourself to the [Users doc](https://github.com/cilium/cilium/blob/main/USERS.md)
- [x] Thanks for contributing!

<!-- Description of change -->

`PodDisruptionBudget` takes an additional key of `unhealthyPodEvictionPolicy`.  The chart is now smart enough to let folks set the keys in a free form manner

```release-note
helm: PodDisruptionBudget can now set unhealthyPodEvictionPolicy
```



Diff:
diff --git a/Documentation/helm-values.rst b/Documentation/helm-values.rst
index a19d1a6dead72..ce54eb42a1b8b 100644
--- a/Documentation/helm-values.rst
+++ b/Documentation/helm-values.rst
@@ -768,6 +768,10 @@
      - Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by ``maxUnavailable: null``
      - string
      - ``nil``
+   * - :spelling:ignore:`clustermesh.apiserver.podDisruptionBudget.unhealthyPodEvictionPolicy`
+     - How are unhealthy, but running, pods counted for eviction
+     - string
+     - ``nil``
    * - :spelling:ignore:`clustermesh.apiserver.podLabels`
      - Labels to be added to clustermesh-apiserver pods
      - object
@@ -1964,6 +1968,10 @@
      - Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by ``maxUnavailable: null``
      - string
      - ``nil``
+   * - :spelling:ignore:`hubble.relay.podDisruptionBudget.unhealthyPodEvictionPolicy`
+     - How are unhealthy, but running, pods counted for eviction
+     - string
+     - ``nil``
    * - :spelling:ignore:`hubble.relay.podLabels`
      - Labels to be added to hubble-relay pods
      - object
@@ -2288,6 +2296,10 @@
      - Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by ``maxUnavailable: null``
      - string
      - ``nil``
+   * - :spelling:ignore:`hubble.ui.podDisruptionBudget.unhealthyPodEvictionPolicy`
+     - How are unhealthy, but running, pods counted for eviction
+     - string
+     - ``nil``
    * - :spelling:ignore:`hubble.ui.podLabels`
      - Labels to be added to hubble-ui pods
      - object
@@ -2980,6 +2992,10 @@
      - Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by ``maxUnavailable: null``
      - string
      - ``nil``
+   * - :spelling:ignore:`operator.podDisruptionBudget.unhealthyPodEvictionPolicy`
+     - How are unhealthy, but running, pods counted for eviction
+     - string
+     - ``nil``
    * - :spelling:ignore:`operator.podLabels`
      - Labels to be added to cilium-operator pods
      - object
@@ -3180,6 +3196,10 @@
      - Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by ``maxUnavailable: null``
      - string
      - ``nil``
+   * - :spelling:ignore:`preflight.podDisruptionBudget.unhealthyPodEvictionPolicy`
+     - How are unhealthy, but running, pods counted for eviction
+     - string
+     - ``nil``
    * - :spelling:ignore:`preflight.podLabels`
      - Labels to be added to the preflight pod.
      - object
diff --git a/install/kubernetes/cilium/README.md b/install/kubernetes/cilium/README.md
index 2daae25cce206..aedcd88cba8db 100644
--- a/install/kubernetes/cilium/README.md
+++ b/install/kubernetes/cilium/README.md
@@ -242,6 +242,7 @@ contributors across the globe, there is almost always someone available to help.
 | clustermesh.apiserver.podDisruptionBudget.enabled | bool | `false` | enable PodDisruptionBudget ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ |
 | clustermesh.apiserver.podDisruptionBudget.maxUnavailable | int | `1` | Maximum number/percentage of pods that may be made unavailable |
 | clustermesh.apiserver.podDisruptionBudget.minAvailable | string | `nil` | Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by `maxUnavailable: null` |
+| clustermesh.apiserver.podDisruptionBudget.unhealthyPodEvictionPolicy | string | `nil` | How are unhealthy, but running, pods counted for eviction |
 | clustermesh.apiserver.podLabels | object | `{}` | Labels to be added to clustermesh-apiserver pods |
 | clustermesh.apiserver.podSecurityContext | object | `{"fsGroup":65532,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | Security context to be added to clustermesh-apiserver pods |
 | clustermesh.apiserver.priorityClassName | string | `""` | The priority class to use for clustermesh-apiserver |
@@ -541,6 +542,7 @@ contributors across the globe, there is almost always someone available to help.
 | hubble.relay.podDisruptionBudget.enabled | bool | `false` | enable PodDisruptionBudget ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ |
 | hubble.relay.podDisruptionBudget.maxUnavailable | int | `1` | Maximum number/percentage of pods that may be made unavailable |
 | hubble.relay.podDisruptionBudget.minAvailable | string | `nil` | Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by `maxUnavailable: null` |
+| hubble.relay.podDisruptionBudget.unhealthyPodEvictionPolicy | string | `nil` | How are unhealthy, but running, pods counted for eviction |
 | hubble.relay.podLabels | object | `{}` | Labels to be added to hubble-relay pods |
 | hubble.relay.podSecurityContext | object | `{"fsGroup":65532,"seccompProfile":{"type":"RuntimeDefault"}}` | hubble-relay pod security context |
 | hubble.relay.pprof.address | string | `"localhost"` | Configure pprof listen address for hubble-relay |
@@ -622,6 +624,7 @@ contributors across the globe, there is almost always someone available to help.
 | hubble.ui.podDisruptionBudget.enabled | bool | `false` | enable PodDisruptionBudget ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ |
 | hubble.ui.podDisruptionBudget.maxUnavailable | int | `1` | Maximum number/percentage of pods that may be made unavailable |
 | hubble.ui.podDisruptionBudget.minAvailable | string | `nil` | Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by `maxUnavailable: null` |
+| hubble.ui.podDisruptionBudget.unhealthyPodEvictionPolicy | string | `nil` | How are unhealthy, but running, pods counted for eviction |
 | hubble.ui.podLabels | object | `{}` | Labels to be added to hubble-ui pods |
 | hubble.ui.priorityClassName | string | `""` | The priority class to use for hubble-ui |
 | hubble.ui.replicas | int | `1` | The number of replicas of Hubble UI to deploy. |
@@ -795,6 +798,7 @@ contributors across the globe, there is almost always someone available to help.
 | operator.podDisruptionBudget.enabled | bool | `false` | enable PodDisruptionBudget ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ |
 | operator.podDisruptionBudget.maxUnavailable | int | `1` | Maximum number/percentage of pods that may be made unavailable |
 | operator.podDisruptionBudget.minAvailable | string | `nil` | Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by `maxUnavailable: null` |
+| operator.podDisruptionBudget.unhealthyPodEvictionPolicy | string | `nil` | How are unhealthy, but running, pods counted for eviction |
 | operator.podLabels | object | `{}` | Labels to be added to cilium-operator pods |
 | operator.podSecurityContext | object | `{}` | Security context to be added to cilium-operator pods |
 | operator.pprof.address | string | `"localhost"` | Configure pprof listen address for cilium-operator |
@@ -845,6 +849,7 @@ contributors across the globe, there is almost always someone available to help.
 | preflight.podDisruptionBudget.enabled | bool | `false` | enable PodDisruptionBudget ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ |
 | preflight.podDisruptionBudget.maxUnavailable | int | `1` | Maximum number/percentage of pods that may be made unavailable |
 | preflight.podDisruptionBudget.minAvailable | string | `nil` | Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by `maxUnavailable: null` |
+| preflight.podDisruptionBudget.unhealthyPodEvictionPolicy | string | `nil` | How are unhealthy, but running, pods counted for eviction |
 | preflight.podLabels | object | `{}` | Labels to be added to the preflight pod. |
 | preflight.podSecurityContext | object | `{}` | Security context to be added to preflight pods. |
 | preflight.priorityClassName | string | `""` | The priority class to use for the preflight pod. |
diff --git a/install/kubernetes/cilium/templates/cilium-operator/poddisruptionbudget.yaml b/install/kubernetes/cilium/templates/cilium-operator/poddisruptionbudget.yaml
index 74d29b435e726..ee543e93748da 100644
--- a/install/kubernetes/cilium/templates/cilium-operator/poddisruptionbudget.yaml
+++ b/install/kubernetes/cilium/templates/cilium-operator/poddisruptionbudget.yaml
@@ -24,6 +24,13 @@ spec:
   {{- with $component.minAvailable }}
   minAvailable: {{ . }}
   {{- end }}
+  {{- if (semverCompare ">= 1.27-0" .Capabilities.KubeVersion.Version) }}
+  {{- if hasKey $component "unhealthyPodEvictionPolicy" }}
+  {{- with $component.unhealthyPodEvictionPolicy }}
+  unhealthyPodEvictionPolicy: {{ . }}
+  {{- end }}
+  {{- end }}
+  {{- end }}
   selector:
     matchLabels:
       io.cilium/app: operator
diff --git a/install/kubernetes/cilium/templates/cilium-preflight/poddisruptionbudget.yaml b/install/kubernetes/cilium/templates/cilium-preflight/poddisruptionbudget.yaml
index be41a74cff5a0..576d9d3568a82 100644
--- a/install/kubernetes/cilium/templates/cilium-preflight/poddisruptionbudget.yaml
+++ b/install/kubernetes/cilium/templates/cilium-preflight/poddisruptionbudget.yaml
@@ -24,6 +24,13 @@ spec:
   {{- with $component.minAvailable }}
   minAvailable: {{ . }}
   {{- end }}
+  {{- if (semverCompare ">= 1.27-0" .Capabilities.KubeVersion.Version) }}
+  {{- if hasKey $component "unhealthyPodEvictionPolicy" }}
+  {{- with $component.unhealthyPodEvictionPolicy }}
+  unhealthyPodEvictionPolicy: {{ . }}
+  {{- end }}
+  {{- end }}
+  {{- end }}
   selector:
     matchLabels:
       k8s-app: cilium-pre-flight-check-deployment
diff --git a/install/kubernetes/cilium/templates/clustermesh-apiserver/poddisruptionbudget.yaml b/install/kubernetes/cilium/templates/clustermesh-apiserver/poddisruptionbudget.yaml
index d65b3a9e15ad7..2ead8f29e61e1 100644
--- a/install/kubernetes/cilium/templates/clustermesh-apiserver/poddisruptionbudget.yaml
+++ b/install/kubernetes/cilium/templates/clustermesh-apiserver/poddisruptionbudget.yaml
@@ -24,6 +24,13 @@ spec:
   {{- with $component.minAvailable }}
   minAvailable: {{ . }}
   {{- end }}
+  {{- if (semverCompare ">= 1.27-0" .Capabilities.KubeVersion.Version) }}
+  {{- if hasKey $component "unhealthyPodEvictionPolicy" }}
+  {{- with $component.unhealthyPodEvictionPolicy }}
+  unhealthyPodEvictionPolicy: {{ . }}
+  {{- end }}
+  {{- end }}
+  {{- end }}
   selector:
     matchLabels:
       k8s-app: clustermesh-apiserver
diff --git a/install/kubernetes/cilium/templates/hubble-relay/poddisruptionbudget.yaml b/install/kubernetes/cilium/templates/hubble-relay/poddisruptionbudget.yaml
index b44cecfa3a437..5f28b83f83c52 100644
--- a/install/kubernetes/cilium/templates/hubble-relay/poddisruptionbudget.yaml
+++ b/install/kubernetes/cilium/templates/hubble-relay/poddisruptionbudget.yaml
@@ -24,6 +24,13 @@ spec:
   {{- with $component.minAvailable }}
   minAvailable: {{ . }}
   {{- end }}
+  {{- if (semverCompare ">= 1.27-0" .Capabilities.KubeVersion.Version) }}
+  {{- if hasKey $component "unhealthyPodEvictionPolicy" }}
+  {{- with $component.unhealthyPodEvictionPolicy }}
+  unhealthyPodEvictionPolicy: {{ . }}
+  {{- end }}
+  {{- end }}
+  {{- end }}
   selector:
     matchLabels:
       k8s-app: hubble-relay
diff --git a/install/kubernetes/cilium/templates/hubble-ui/poddisruptionbudget.yaml b/install/kubernetes/cilium/templates/hubble-ui/poddisruptionbudget.yaml
index 354029841e101..93e909fb33451 100644
--- a/install/kubernetes/cilium/templates/hubble-ui/poddisruptionbudget.yaml
+++ b/install/kubernetes/cilium/templates/hubble-ui/poddisruptionbudget.yaml
@@ -24,6 +24,13 @@ spec:
   {{- with $component.minAvailable }}
   minAvailable: {{ . }}
   {{- end }}
+  {{- if (semverCompare ">= 1.27-0" .Capabilities.KubeVersion.Version) }}
+  {{- if hasKey $component "unhealthyPodEvictionPolicy" }}
+  {{- with $component.unhealthyPodEvictionPolicy }}
+  unhealthyPodEvictionPolicy: {{ . }}
+  {{- end }}
+  {{- end }}
+  {{- end }}
   selector:
     matchLabels:
       k8s-app: hubble-ui
diff --git a/install/kubernetes/cilium/values.schema.json b/install/kubernetes/cilium/values.schema.json
old mode 100644
new mode 100755
index 6f6b19a001ea7..9ed008cf8f3ae
--- a/install/kubernetes/cilium/values.schema.json
+++ b/install/kubernetes/cilium/values.schema.json
@@ -1207,6 +1207,12 @@
                     "integer",
                     "string"
                   ]
+                },
+                "unhealthyPodEvictionPolicy": {
+                  "type": [
+                    "null",
+                    "string"
+                  ]
                 }
               },
               "type": "object"
@@ -3064,6 +3070,12 @@
                     "integer",
                     "string"
                   ]
+                },
+                "unhealthyPodEvictionPolicy": {
+                  "type": [
+                    "null",
+                    "string"
+                  ]
                 }
               },
               "type": "object"
@@ -3566,6 +3578,12 @@
                     "integer",
                     "string"
                   ]
+                },
+                "unhealthyPodEvictionPolicy": {
+                  "type": [
+                    "null",
+                    "string"
+                  ]
                 }
               },
               "type": "object"
@@ -4614,6 +4632,12 @@
                 "integer",
                 "string"
               ]
+            },
+            "unhealthyPodEvictionPolicy": {
+              "type": [
+                "null",
+                "string"
+              ]
             }
           },
           "type": "object"
@@ -4940,6 +4964,12 @@
                 "integer",
                 "string"
               ]
+            },
+            "unhealthyPodEvictionPolicy": {
+              "type": [
+                "null",
+                "string"
+              ]
             }
           },
           "type": "object"
diff --git a/install/kubernetes/cilium/values.yaml b/install/kubernetes/cilium/values.yaml
index 9c0744fff707b..f7abedd7cb1f6 100644
--- a/install/kubernetes/cilium/values.yaml
+++ b/install/kubernetes/cilium/values.yaml
@@ -1563,6 +1563,11 @@ hubble:
       # @schema
       # -- Maximum number/percentage of pods that may be made unavailable
       maxUnavailable: 1
+      # @schema
+      # type: [null, string]
+      # @schema
+      # -- How are unhealthy, but running, pods counted for eviction
+      unhealthyPodEvictionPolicy: null
     # -- The priority class to use for hubble-relay
     priorityClassName: ""
     # -- Configure termination grace period for hubble relay Deployment.
@@ -1845,6 +1850,11 @@ hubble:
       # @schema
       # -- Maximum number/percentage of pods that may be made unavailable
       maxUnavailable: 1
+      # @schema
+      # type: [null, string]
+      # @schema
+      # -- How are unhealthy, but running, pods counted for eviction
+      unhealthyPodEvictionPolicy: null
     # -- Affinity for hubble-ui
     affinity: {}
     # -- Pod topology spread constraints for hubble-ui
@@ -2927,6 +2937,11 @@ operator:
     # @schema
     # -- Maximum number/percentage of pods that may be made unavailable
     maxUnavailable: 1
+    # @schema
+    # type: [null, string]
+    # @schema
+    # -- How are unhealthy, but running, pods counted for eviction
+    unhealthyPodEvictionPolicy: null
   # -- cilium-operator resource limits & requests
   # ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
   resources: {}
@@ -3177,6 +3192,11 @@ preflight:
     # @schema
     # -- Maximum number/percentage of pods that may be made unavailable
     maxUnavailable: 1
+    # @schema
+    # type: [null, string]
+    # @schema
+    # -- How are unhealthy, but running, pods counted for eviction
+    unhealthyPodEvictionPolicy: null
   # -- preflight resource limits & requests
   # ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
   resources: {}
@@ -3469,6 +3489,11 @@ clustermesh:
       # @schema
       # -- Maximum number/percentage of pods that may be made unavailable
       maxUnavailable: 1
+      # @schema
+      # type: [null, string]
+      # @schema
+      # -- How are unhealthy, but running, pods counted for eviction
+      unhealthyPodEvictionPolicy: null
     # -- Resource requests and limits for the clustermesh-apiserver
     resources: {}
     #   requests:
diff --git a/install/kubernetes/cilium/values.yaml.tmpl b/install/kubernetes/cilium/values.yaml.tmpl
index d78e1952a83be..ff4e7a82ac0d7 100644
--- a/install/kubernetes/cilium/values.yaml.tmpl
+++ b/install/kubernetes/cilium/values.yaml.tmpl
@@ -1575,6 +1575,11 @@ hubble:
       # @schema
       # -- Maximum number/percentage of pods that may be made unavailable
       maxUnavailable: 1
+      # @schema
+      # type: [null, string]
+      # @schema
+      # -- How are unhealthy, but running, pods counted for eviction
+      unhealthyPodEvictionPolicy: null
     # -- The priority class to use for hubble-relay
     priorityClassName: ""
     # -- Configure termination grace period for hubble relay Deployment.
@@ -1857,6 +1862,11 @@ hubble:
       # @schema
       # -- Maximum number/percentage of pods that may be made unavailable
       maxUnavailable: 1
+      # @schema
+      # type: [null, string]
+      # @schema
+      # -- How are unhealthy, but running, pods counted for eviction
+      unhealthyPodEvictionPolicy: null
     # -- Affinity for hubble-ui
     affinity: {}
     # -- Pod topology spread constraints for hubble-ui
@@ -2949,6 +2959,11 @@ operator:
     # @schema
     # -- Maximum number/percentage of pods that may be made unavailable
     maxUnavailable: 1
+    # @schema
+    # type: [null, string]
+    # @schema
+    # -- How are unhealthy, but running, pods counted for eviction
+    unhealthyPodEvictionPolicy: null
   # -- cilium-operator resource limits & requests
   # ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
   resources: {}
@@ -3199,6 +3214,11 @@ preflight:
     # @schema
     # -- Maximum number/percentage of pods that may be made unavailable
     maxUnavailable: 1
+    # @schema
+    # type: [null, string]
+    # @schema
+    # -- How are unhealthy, but running, pods counted for eviction
+    unhealthyPodEvictionPolicy: null
   # -- preflight resource limits & requests
   # ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
   resources: {}
@@ -3498,6 +3518,11 @@ clustermesh:
       # @schema
       # -- Maximum number/percentage of pods that may be made unavailable
       maxUnavailable: 1
+      # @schema
+      # type: [null, string]
+      # @schema
+      # -- How are unhealthy, but running, pods counted for eviction
+      unhealthyPodEvictionPolicy: null
     # -- Resource requests and limits for the clustermesh-apiserver
     resources: {}
     #   requests:


Reviews:
user: login: giorio94
body: Thanks! Approving, pending resolution of the inline comment.
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-05T06:57:57Z
user: login: joamaki
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-05T09:00:45Z
user: login: gandro
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-08T07:43:51Z
user: login: jcpunk
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T18:01:45Z
user: login: giorio94
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-12T07:37:57Z
user: login: gandro
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-12T07:39:14Z
user: login: jcpunk
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T19:16:53Z
user: login: giorio94
body: Thanks!
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-13T07:18:36Z
user: login: gandro
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-13T07:41:03Z
user: login: qmonnet
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-16T10:07:35Z

Review comments:
diff_hunk: @@ -18,12 +18,7 @@ metadata:
     {{- end }}
 
 spec:
-  {{- with $component.maxUnavailable }}
-  maxUnavailable: {{ . }}
-  {{- end }}
-  {{- with $component.minAvailable }}
-  minAvailable: {{ . }}
-  {{- end }}
+{{- toYaml (omit $component.podDisruptionBudget "enabled") | indent 2 }}
path: install/kubernetes/cilium/templates/clustermesh-apiserver/poddisruptionbudget.yaml
user: login: giorio94
body: I'm a bit on the fence on the best approach here, between plainly propagating all settings as done in this PR and explicitly propagating only known keys as it was done before. I see why the new approach is attractive, given the convenience of not having to update the template in case anything upstream changes, as well as completely moving the responsibility to the user in terms of dealing with different API versions. The downside, IMO, is that we lose the self-documentation provided by the helm values, and users now effectively cannot discover about the new field unless they dig into the helm chart itself (and we also lose the validation provided by the schema).

I probably slightly prefer the latter approach, but I don't have hard feelings, and I'd like to defer the choice to the @cilium/helm team on this one. 
created_at: 2025-05-05T06:57:15Z
author_association: MEMBER
diff_hunk: @@ -18,12 +18,7 @@ metadata:
     {{- end }}
 
 spec:
-  {{- with $component.maxUnavailable }}
-  maxUnavailable: {{ . }}
-  {{- end }}
-  {{- with $component.minAvailable }}
-  minAvailable: {{ . }}
-  {{- end }}
+{{- toYaml (omit $component.podDisruptionBudget "enabled") | indent 2 }}
path: install/kubernetes/cilium/templates/clustermesh-apiserver/poddisruptionbudget.yaml
user: login: gandro
body: I'm fine with the implementation - my concern also really is the lack of documentation for the newly introduced field. It is unfortunate that our helm-docs fork is unable to document absent values. 

In that sense, I think it would be better to keep the existing approach for the newly introduced `unhealthyPodEvictionPolicy` field (it's only three properties after all). We can introduce a helper template for the pod disruption spec if needed.

But if @jcpunk feels strongly about the current approach, I'm fine to merge as is. Unfortunately we already have many undocumented Helm values.
created_at: 2025-05-08T07:43:46Z
author_association: MEMBER
diff_hunk: @@ -18,12 +18,7 @@ metadata:
     {{- end }}
 
 spec:
-  {{- with $component.maxUnavailable }}
-  maxUnavailable: {{ . }}
-  {{- end }}
-  {{- with $component.minAvailable }}
-  minAvailable: {{ . }}
-  {{- end }}
+{{- toYaml (omit $component.podDisruptionBudget "enabled") | indent 2 }}
path: install/kubernetes/cilium/templates/clustermesh-apiserver/poddisruptionbudget.yaml
user: login: jcpunk
body: I'm a bit torn.

I believe more doc is always better.  But if a new field gets added, needing to update the chart and then waiting for a cilium release is not a great experience as it can be a while - furthermore it adds a maintenance burden.

I'll support whatever you think makes sense.
created_at: 2025-05-09T18:01:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -18,12 +18,7 @@ metadata:
     {{- end }}
 
 spec:
-  {{- with $component.maxUnavailable }}
-  maxUnavailable: {{ . }}
-  {{- end }}
-  {{- with $component.minAvailable }}
-  minAvailable: {{ . }}
-  {{- end }}
+{{- toYaml (omit $component.podDisruptionBudget "enabled") | indent 2 }}
path: install/kubernetes/cilium/templates/clustermesh-apiserver/poddisruptionbudget.yaml
user: login: giorio94
body: > I believe more doc is always better. But if a new field gets added, needing to update the chart and then waiting for a cilium release is not a great experience as it can be a while - furthermore it adds a maintenance burden.

Yeah, there's definitely a tradeoff there. Considering that I wouldn't expect the API to change frequently, and that there are only three fields at the moment, I would personally vote for the more explicit (documented) version. 
created_at: 2025-05-12T07:37:56Z
author_association: MEMBER
diff_hunk: @@ -18,12 +18,7 @@ metadata:
     {{- end }}
 
 spec:
-  {{- with $component.maxUnavailable }}
-  maxUnavailable: {{ . }}
-  {{- end }}
-  {{- with $component.minAvailable }}
-  minAvailable: {{ . }}
-  {{- end }}
+{{- toYaml (omit $component.podDisruptionBudget "enabled") | indent 2 }}
path: install/kubernetes/cilium/templates/clustermesh-apiserver/poddisruptionbudget.yaml
user: login: gandro
body: One potential middle ground - but I'm not sure if it works - is to add the newly supported `unhealthyPodEvictionPolicy` as an empty field to `values.yaml` (ensuring it is documented) and just have it be unset. I _believe_ older K8s versions will just ignore it.
created_at: 2025-05-12T07:39:14Z
author_association: MEMBER
diff_hunk: @@ -18,12 +18,7 @@ metadata:
     {{- end }}
 
 spec:
-  {{- with $component.maxUnavailable }}
-  maxUnavailable: {{ . }}
-  {{- end }}
-  {{- with $component.minAvailable }}
-  minAvailable: {{ . }}
-  {{- end }}
+{{- toYaml (omit $component.podDisruptionBudget "enabled") | indent 2 }}
path: install/kubernetes/cilium/templates/clustermesh-apiserver/poddisruptionbudget.yaml
user: login: jcpunk
body: I'll try and work up something around this.

One thing helm can do is check to see if you're running a new enough k8s and mask things behind that.  I've done similar work for cert-manager.
created_at: 2025-05-12T19:16:52Z
author_association: CONTRIBUTOR

PR comments:
user: login: jcpunk
created_at: 2025-05-05T14:13:08Z
body: I have no idea how to fix the tests.
author_association: CONTRIBUTOR
user: login: giorio94
created_at: 2025-05-05T16:49:57Z
body: > I have no idea how to fix the tests.

Don't worry about them at the moment, the failure is definitely unrelated (most likely a rebase would help).
author_association: MEMBER
user: login: aanm
created_at: 2025-05-08T09:25:37Z
body: /test
author_association: MEMBER
user: login: gandro
created_at: 2025-05-08T09:40:55Z
body: Disabled auto-merge as there are ongoing discussions
author_association: MEMBER
user: login: giorio94
created_at: 2025-05-13T07:19:21Z
body: /test
author_association: MEMBER
user: login: gandro
created_at: 2025-05-13T07:41:58Z
body: Image build failed due to Quay.io throwing errors. Closing and re-opening PR to re-trigger.
author_association: MEMBER
user: login: gandro
created_at: 2025-05-13T07:42:26Z
body: /test
author_association: MEMBER
user: login: gandro
created_at: 2025-05-13T07:58:03Z
body: Quay remains unhappy for the moment. Let's give it some time before I'll retry
author_association: MEMBER
user: login: jcpunk
created_at: 2025-05-13T20:25:01Z
body: Indeed: https://status.redhat.com/ shows quay.io is currently sad.
author_association: CONTRIBUTOR
user: login: gandro
created_at: 2025-05-14T07:34:00Z
body: /test
author_association: MEMBER
user: login: gandro
created_at: 2025-05-15T07:44:52Z
body: Not entirely sure why GitHub rejects the merge. Let's try rebasing and re-running CI :shrug: 
author_association: MEMBER
user: login: gandro
created_at: 2025-05-15T07:46:00Z
body: Ah, it seems there's probably some kind of merge conflict - I can't automatically rebase:
![image](https://github.com/user-attachments/assets/f9b10431-b061-49ba-9a83-6a0599f9040e)

@jcpunk Would you mind doing a manual rebase on `main` for this PR? Thanks and apologies for the inconvenience. 
author_association: MEMBER
user: login: jcpunk
created_at: 2025-05-15T13:44:06Z
body: Rebased.
author_association: CONTRIBUTOR
user: login: Artyop
created_at: 2025-05-15T13:59:36Z
body: /test
author_association: CONTRIBUTOR
user: login: giorio94
created_at: 2025-05-15T16:54:55Z
body: It seems there's something wrong with the autogenerated helm documentation: https://github.com/cilium/cilium/actions/runs/15046595406/job/42290570850?pr=39299

@jcpunk Could you please re-run:

```
make -C Documentation update-helm-values
```

And commit the changes?
author_association: MEMBER
user: login: jcpunk
created_at: 2025-05-15T19:40:07Z
body: Rebased and re-ran doc update
author_association: CONTRIBUTOR
user: login: qmonnet
created_at: 2025-05-16T10:06:50Z
body: /test
author_association: MEMBER