-
Notifications
You must be signed in to change notification settings - Fork 216
/
gateway-pdb.yaml
26 lines (26 loc) · 954 Bytes
/
gateway-pdb.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
{{- if and .Values.gateway.podDisruptionBudget.enabled (gt .Values.gateway.replicaCount 1.0) -}}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "ditto.fullname" . }}-gateway
labels:
app.kubernetes.io/name: {{ include "ditto.name" . }}-gateway
{{ include "ditto.labels" . | indent 4 }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "ditto.name" . }}-gateway
app.kubernetes.io/instance: {{ .Release.Name }}
minAvailable: {{ .Values.gateway.podDisruptionBudget.minAvailable }}
{{- end }}