From e0f6c572fc9e0501b9653ed82b8a199915946c88 Mon Sep 17 00:00:00 2001 From: Paulo Sousa Date: Mon, 24 Jun 2024 16:34:58 -0300 Subject: [PATCH] acl-api: add pdb entry --- charts/acl-api/templates/poddirruptionbudget.yaml | 13 +++++++++++++ charts/acl-api/values.yaml | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 charts/acl-api/templates/poddirruptionbudget.yaml diff --git a/charts/acl-api/templates/poddirruptionbudget.yaml b/charts/acl-api/templates/poddirruptionbudget.yaml new file mode 100644 index 0000000..7819315 --- /dev/null +++ b/charts/acl-api/templates/poddirruptionbudget.yaml @@ -0,0 +1,13 @@ +{{- if .Values.podDisruptionBudget.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "acl-api.fullname" . }} + labels: + {{- include "acl-api.labels" . | nindent 4 }} +spec: + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + selector: + matchLabels: + {{- include "acl-api.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/acl-api/values.yaml b/charts/acl-api/values.yaml index 720ff0b..643acad 100644 --- a/charts/acl-api/values.yaml +++ b/charts/acl-api/values.yaml @@ -92,6 +92,10 @@ instances: serviceName: "" serviceAnnotations: {} +podDisruptionBudget: + enabled: false + maxUnavailable: "10%" + api: secretName: acl-api # name of the secret that contains api username, password, mongo credentials and Tsuru token engines: "acl-operator"