From 328d102cf4a18663989cf3b56c90c85319b30844 Mon Sep 17 00:00:00 2001 From: Fran Mulero Date: Wed, 5 Jun 2024 12:33:20 +0200 Subject: [PATCH] [bitnami/flux] Align PodDisruptionBudgets with templates (#26694) * [bitnami/flux] Enable PodDisruptionBudgets Signed-off-by: Fran Mulero * Update CHANGELOG.md Signed-off-by: Bitnami Containers * Update CHANGELOG.md Signed-off-by: Bitnami Containers --------- Signed-off-by: Fran Mulero Signed-off-by: Bitnami Containers Co-authored-by: Bitnami Containers --- bitnami/flux/CHANGELOG.md | 8 ++++++-- bitnami/flux/Chart.yaml | 2 +- bitnami/flux/README.md | 12 ++++++------ bitnami/flux/templates/helm-controller/pdb.yaml | 4 ++-- .../templates/image-automation-controller/pdb.yaml | 4 ++-- .../templates/image-reflector-controller/pdb.yaml | 4 ++-- bitnami/flux/templates/kustomize-controller/pdb.yaml | 4 ++-- .../flux/templates/notification-controller/pdb.yaml | 4 ++-- bitnami/flux/templates/source-controller/pdb.yaml | 4 ++-- bitnami/flux/values.yaml | 12 ++++++------ 10 files changed, 31 insertions(+), 27 deletions(-) diff --git a/bitnami/flux/CHANGELOG.md b/bitnami/flux/CHANGELOG.md index e13d5d8b22..177ed11760 100644 --- a/bitnami/flux/CHANGELOG.md +++ b/bitnami/flux/CHANGELOG.md @@ -1,8 +1,12 @@ # Changelog -## 2.3.2 (2024-06-05) +## 2.3.3 (2024-06-05) -* [bitnami/flux] Release 2.3.2 ([#26725](https://github.com/bitnami/charts/pull/26725)) +* [bitnami/flux] Align PodDisruptionBudgets with templates ([#26694](https://github.com/bitnami/charts/pull/26694)) + +## 2.3.2 (2024-06-05) + +* [bitnami/flux] Release 2.3.2 (#26725) ([53a66af](https://github.com/bitnami/charts/commit/53a66af5a59dbbd365c4d458f1ad5a95a62e5266)), closes [#26725](https://github.com/bitnami/charts/issues/26725) ## 2.3.1 (2024-06-04) diff --git a/bitnami/flux/Chart.yaml b/bitnami/flux/Chart.yaml index aa137bf179..99d8de3225 100644 --- a/bitnami/flux/Chart.yaml +++ b/bitnami/flux/Chart.yaml @@ -43,4 +43,4 @@ maintainers: name: flux sources: - https://github.com/bitnami/charts/tree/main/bitnami/flux -version: 2.3.2 +version: 2.3.3 diff --git a/bitnami/flux/README.md b/bitnami/flux/README.md index f2358167d8..a3129a3f5c 100644 --- a/bitnami/flux/README.md +++ b/bitnami/flux/README.md @@ -139,7 +139,7 @@ The command deploys flux on the Kubernetes cluster in the default configuration. | `kustomizeController.podAffinityPreset` | Pod affinity preset. Ignored if `kustomizeController.affinity` is set. Allowed values: `soft` or `hard` | `""` | | `kustomizeController.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `kustomizeController.affinity` is set. Allowed values: `soft` or `hard` | `soft` | | `kustomizeController.pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` | -| `kustomizeController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` | +| `kustomizeController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` | | `kustomizeController.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` | | `kustomizeController.autoscaling.enabled` | Enable autoscaling for kustomizeController | `false` | | `kustomizeController.autoscaling.minReplicas` | Minimum number of kustomizeController replicas | `""` | @@ -276,7 +276,7 @@ The command deploys flux on the Kubernetes cluster in the default configuration. | `helmController.podAffinityPreset` | Pod affinity preset. Ignored if `helmController.affinity` is set. Allowed values: `soft` or `hard` | `""` | | `helmController.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `helmController.affinity` is set. Allowed values: `soft` or `hard` | `soft` | | `helmController.pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` | -| `helmController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` | +| `helmController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` | | `helmController.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` | | `helmController.autoscaling.enabled` | Enable autoscaling for helmController | `false` | | `helmController.autoscaling.minReplicas` | Minimum number of helmController replicas | `""` | @@ -414,7 +414,7 @@ The command deploys flux on the Kubernetes cluster in the default configuration. | `sourceController.podAffinityPreset` | Pod affinity preset. Ignored if `sourceController.affinity` is set. Allowed values: `soft` or `hard` | `""` | | `sourceController.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `sourceController.affinity` is set. Allowed values: `soft` or `hard` | `soft` | | `sourceController.pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` | -| `sourceController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` | +| `sourceController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` | | `sourceController.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` | | `sourceController.autoscaling.enabled` | Enable autoscaling for sourceController | `false` | | `sourceController.autoscaling.minReplicas` | Minimum number of sourceController replicas | `""` | @@ -584,7 +584,7 @@ The command deploys flux on the Kubernetes cluster in the default configuration. | `notificationController.podAffinityPreset` | Pod affinity preset. Ignored if `notificationController.affinity` is set. Allowed values: `soft` or `hard` | `""` | | `notificationController.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `notificationController.affinity` is set. Allowed values: `soft` or `hard` | `soft` | | `notificationController.pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` | -| `notificationController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` | +| `notificationController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` | | `notificationController.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` | | `notificationController.autoscaling.enabled` | Enable autoscaling for notificationController | `false` | | `notificationController.autoscaling.minReplicas` | Minimum number of notificationController replicas | `""` | @@ -748,7 +748,7 @@ The command deploys flux on the Kubernetes cluster in the default configuration. | `imageAutomationController.podAffinityPreset` | Pod affinity preset. Ignored if `imageAutomationController.affinity` is set. Allowed values: `soft` or `hard` | `""` | | `imageAutomationController.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `imageAutomationController.affinity` is set. Allowed values: `soft` or `hard` | `soft` | | `imageAutomationController.pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` | -| `imageAutomationController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` | +| `imageAutomationController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` | | `imageAutomationController.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` | | `imageAutomationController.autoscaling.enabled` | Enable autoscaling for imageAutomationController | `false` | | `imageAutomationController.autoscaling.minReplicas` | Minimum number of imageAutomationController replicas | `""` | @@ -885,7 +885,7 @@ The command deploys flux on the Kubernetes cluster in the default configuration. | `imageReflectorController.podAffinityPreset` | Pod affinity preset. Ignored if `imageReflectorController.affinity` is set. Allowed values: `soft` or `hard` | `""` | | `imageReflectorController.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `imageReflectorController.affinity` is set. Allowed values: `soft` or `hard` | `soft` | | `imageReflectorController.pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` | -| `imageReflectorController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` | +| `imageReflectorController.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` | | `imageReflectorController.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` | | `imageReflectorController.autoscaling.enabled` | Enable autoscaling for imageReflectorController | `false` | | `imageReflectorController.autoscaling.minReplicas` | Minimum number of imageReflectorController replicas | `""` | diff --git a/bitnami/flux/templates/helm-controller/pdb.yaml b/bitnami/flux/templates/helm-controller/pdb.yaml index 3f4d6fc06f..e245e52157 100644 --- a/bitnami/flux/templates/helm-controller/pdb.yaml +++ b/bitnami/flux/templates/helm-controller/pdb.yaml @@ -21,8 +21,8 @@ spec: {{- if .Values.helmController.pdb.minAvailable }} minAvailable: {{ .Values.helmController.pdb.minAvailable }} {{- end }} - {{- if .Values.helmController.pdb.maxUnavailable }} - maxUnavailable: {{ .Values.helmController.pdb.maxUnavailable }} + {{- if or .Values.helmController.pdb.maxUnavailable ( not .Values.helmController.pdb.minAvailable ) }} + maxUnavailable: {{ .Values.helmController.pdb.maxUnavailable | default 1 }} {{- end }} {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.helmController.podLabels .Values.commonLabels ) "context" . ) }} selector: diff --git a/bitnami/flux/templates/image-automation-controller/pdb.yaml b/bitnami/flux/templates/image-automation-controller/pdb.yaml index a388c67b94..b00edb637e 100644 --- a/bitnami/flux/templates/image-automation-controller/pdb.yaml +++ b/bitnami/flux/templates/image-automation-controller/pdb.yaml @@ -21,8 +21,8 @@ spec: {{- if .Values.imageAutomationController.pdb.minAvailable }} minAvailable: {{ .Values.imageAutomationController.pdb.minAvailable }} {{- end }} - {{- if .Values.imageAutomationController.pdb.maxUnavailable }} - maxUnavailable: {{ .Values.imageAutomationController.pdb.maxUnavailable }} + {{- if or .Values.imageAutomationController.pdb.maxUnavailable ( not .Values.imageAutomationController.pdb.minAvailable ) }} + maxUnavailable: {{ .Values.imageAutomationController.pdb.maxUnavailable | default 1 }} {{- end }} {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.imageAutomationController.podLabels .Values.commonLabels ) "context" . ) }} selector: diff --git a/bitnami/flux/templates/image-reflector-controller/pdb.yaml b/bitnami/flux/templates/image-reflector-controller/pdb.yaml index 2638045ca5..d042bf5d94 100644 --- a/bitnami/flux/templates/image-reflector-controller/pdb.yaml +++ b/bitnami/flux/templates/image-reflector-controller/pdb.yaml @@ -21,8 +21,8 @@ spec: {{- if .Values.imageReflectorController.pdb.minAvailable }} minAvailable: {{ .Values.imageReflectorController.pdb.minAvailable }} {{- end }} - {{- if .Values.imageReflectorController.pdb.maxUnavailable }} - maxUnavailable: {{ .Values.imageReflectorController.pdb.maxUnavailable }} + {{- if or .Values.imageReflectorController.pdb.maxUnavailable ( not .Values.imageReflectorController.pdb.minAvailable ) }} + maxUnavailable: {{ .Values.imageReflectorController.pdb.maxUnavailable | default 1 }} {{- end }} {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.imageReflectorController.podLabels .Values.commonLabels ) "context" . ) }} selector: diff --git a/bitnami/flux/templates/kustomize-controller/pdb.yaml b/bitnami/flux/templates/kustomize-controller/pdb.yaml index 2c99261af3..7d3a2e1a1c 100644 --- a/bitnami/flux/templates/kustomize-controller/pdb.yaml +++ b/bitnami/flux/templates/kustomize-controller/pdb.yaml @@ -21,8 +21,8 @@ spec: {{- if .Values.kustomizeController.pdb.minAvailable }} minAvailable: {{ .Values.kustomizeController.pdb.minAvailable }} {{- end }} - {{- if .Values.kustomizeController.pdb.maxUnavailable }} - maxUnavailable: {{ .Values.kustomizeController.pdb.maxUnavailable }} + {{- if or .Values.kustomizeController.pdb.maxUnavailable ( not .Values.kustomizeController.pdb.minAvailable ) }} + maxUnavailable: {{ .Values.kustomizeController.pdb.maxUnavailable | default 1 }} {{- end }} {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.kustomizeController.podLabels .Values.commonLabels ) "context" . ) }} selector: diff --git a/bitnami/flux/templates/notification-controller/pdb.yaml b/bitnami/flux/templates/notification-controller/pdb.yaml index 9322f969c5..c685443443 100644 --- a/bitnami/flux/templates/notification-controller/pdb.yaml +++ b/bitnami/flux/templates/notification-controller/pdb.yaml @@ -21,8 +21,8 @@ spec: {{- if .Values.notificationController.pdb.minAvailable }} minAvailable: {{ .Values.notificationController.pdb.minAvailable }} {{- end }} - {{- if .Values.notificationController.pdb.maxUnavailable }} - maxUnavailable: {{ .Values.notificationController.pdb.maxUnavailable }} + {{- if or .Values.notificationController.pdb.maxUnavailable ( not .Values.notificationController.pdb.minAvailable ) }} + maxUnavailable: {{ .Values.notificationController.pdb.maxUnavailable | default 1 }} {{- end }} {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.notificationController.podLabels .Values.commonLabels ) "context" . ) }} selector: diff --git a/bitnami/flux/templates/source-controller/pdb.yaml b/bitnami/flux/templates/source-controller/pdb.yaml index a16fc0269f..9c208ae880 100644 --- a/bitnami/flux/templates/source-controller/pdb.yaml +++ b/bitnami/flux/templates/source-controller/pdb.yaml @@ -21,8 +21,8 @@ spec: {{- if .Values.sourceController.pdb.minAvailable }} minAvailable: {{ .Values.sourceController.pdb.minAvailable }} {{- end }} - {{- if .Values.sourceController.pdb.maxUnavailable }} - maxUnavailable: {{ .Values.sourceController.pdb.maxUnavailable }} + {{- if or .Values.sourceController.pdb.maxUnavailable ( not .Values.sourceController.pdb.minAvailable ) }} + maxUnavailable: {{ .Values.sourceController.pdb.maxUnavailable | default 1 }} {{- end }} {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.sourceController.podLabels .Values.commonLabels ) "context" . ) }} selector: diff --git a/bitnami/flux/values.yaml b/bitnami/flux/values.yaml index 1f6b2f4c13..f122e09306 100644 --- a/bitnami/flux/values.yaml +++ b/bitnami/flux/values.yaml @@ -326,7 +326,7 @@ kustomizeController: ## pdb: create: true - minAvailable: 1 + minAvailable: "" maxUnavailable: "" ## Autoscaling configuration ## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ @@ -841,7 +841,7 @@ helmController: ## pdb: create: true - minAvailable: 1 + minAvailable: "" maxUnavailable: "" ## Autoscaling configuration ## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ @@ -1358,7 +1358,7 @@ sourceController: ## pdb: create: true - minAvailable: 1 + minAvailable: "" maxUnavailable: "" ## Autoscaling configuration ## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ @@ -1974,7 +1974,7 @@ notificationController: ## pdb: create: true - minAvailable: 1 + minAvailable: "" maxUnavailable: "" ## Autoscaling configuration ## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ @@ -2597,7 +2597,7 @@ imageAutomationController: ## pdb: create: true - minAvailable: 1 + minAvailable: "" maxUnavailable: "" ## Autoscaling configuration ## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ @@ -3112,7 +3112,7 @@ imageReflectorController: ## pdb: create: true - minAvailable: 1 + minAvailable: "" maxUnavailable: "" ## Autoscaling configuration ## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/