Skip to content

Commit df0be08

Browse files
authored
PodDisruptionBudget spec logic update (#9904)
Signed-off-by: Peter Jakubis <[email protected]>
1 parent 61ae861 commit df0be08

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

charts/ingress-nginx/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ As of version `1.26.0` of this chart, by simply not providing any clusterIP valu
365365
| controller.metrics.serviceMonitor.relabelings | list | `[]` | |
366366
| controller.metrics.serviceMonitor.scrapeInterval | string | `"30s"` | |
367367
| controller.metrics.serviceMonitor.targetLabels | list | `[]` | |
368-
| controller.minAvailable | int | `1` | Define either 'minAvailable' or 'maxUnavailable', never both. |
368+
| controller.minAvailable | int | `1` | Minimum available pods set in PodDisruptionBudget. Define either 'minAvailable' or 'maxUnavailable', never both. |
369369
| controller.minReadySeconds | int | `0` | `minReadySeconds` to avoid killing pods before we are ready # |
370370
| controller.name | string | `"controller"` | |
371371
| controller.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for controller pod assignment # Ref: https://kubernetes.io/docs/user-guide/node-selection/ # |

charts/ingress-nginx/templates/controller-poddisruptionbudget.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
matchLabels:
1919
{{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
2020
app.kubernetes.io/component: controller
21-
{{- if .Values.controller.minAvailable }}
21+
{{- if and .Values.controller.minAvailable (not (hasKey .Values.controller "maxUnavailable")) }}
2222
minAvailable: {{ .Values.controller.minAvailable }}
2323
{{- else if .Values.controller.maxUnavailable }}
2424
maxUnavailable: {{ .Values.controller.maxUnavailable }}

charts/ingress-nginx/values.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,10 @@ controller:
308308
##
309309
podAnnotations: {}
310310
replicaCount: 1
311-
# -- Define either 'minAvailable' or 'maxUnavailable', never both.
311+
# -- Minimum available pods set in PodDisruptionBudget.
312+
# Define either 'minAvailable' or 'maxUnavailable', never both.
312313
minAvailable: 1
313-
# -- Define either 'minAvailable' or 'maxUnavailable', never both.
314+
# -- Maximum unavalaile pods set in PodDisruptionBudget. If set, 'minAvailable' is ignored.
314315
# maxUnavailable: 1
315316

316317
## Define requests resources to avoid probe issues due to CPU utilization in busy nodes

0 commit comments

Comments
 (0)