From 52351399e9d9035dbf3a519306d4ee45eb8a8adf Mon Sep 17 00:00:00 2001 From: Fran Mulero Date: Wed, 15 May 2024 14:37:56 +0200 Subject: [PATCH] [bitnami/etcd] PDB review (#25896) Signed-off-by: Fran Mulero --- bitnami/etcd/Chart.yaml | 2 +- bitnami/etcd/templates/pdb.yaml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bitnami/etcd/Chart.yaml b/bitnami/etcd/Chart.yaml index 19700225689dc8..1577198e82cee2 100644 --- a/bitnami/etcd/Chart.yaml +++ b/bitnami/etcd/Chart.yaml @@ -32,4 +32,4 @@ maintainers: name: etcd sources: - https://github.com/bitnami/charts/tree/main/bitnami/etcd -version: 10.0.8 +version: 10.0.9 diff --git a/bitnami/etcd/templates/pdb.yaml b/bitnami/etcd/templates/pdb.yaml index 52b23be6258bf1..edf61869a9e492 100644 --- a/bitnami/etcd/templates/pdb.yaml +++ b/bitnami/etcd/templates/pdb.yaml @@ -3,12 +3,13 @@ Copyright Broadcom, Inc. All Rights Reserved. SPDX-License-Identifier: APACHE-2.0 */}} -{{- if .Values.pdb.create }} +{{- $replicaCount := int .Values.replicaCount }} +{{- if and .Values.pdb.create (gt $replicaCount 1) }} apiVersion: {{ include "common.capabilities.policy.apiVersion" . }} kind: PodDisruptionBudget metadata: name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: etcd {{- if .Values.commonAnnotations }}