Merge R3 into master
[it/dep.git] / ric-aux / helm / infrastructure / subcharts / kong / templates / pdb.yaml
diff --git a/ric-aux/helm/infrastructure/subcharts/kong/templates/pdb.yaml b/ric-aux/helm/infrastructure/subcharts/kong/templates/pdb.yaml
new file mode 100755 (executable)
index 0000000..39b3b77
--- /dev/null
@@ -0,0 +1,18 @@
+{{- if .Values.podDisruptionBudget.enabled }}
+apiVersion: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ template "kong.fullname" . }}
+  labels:
+    {{- include "kong.metaLabels" . | nindent 4 }}
+spec:
+  {{- if .Values.podDisruptionBudget.minAvailable }}
+  minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
+  {{- end  }}
+  {{- if .Values.podDisruptionBudget.maxUnavailable }}
+  maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
+  {{- end  }}
+  selector:
+    matchLabels:
+      {{- include "kong.metaLabels" . | nindent 6 }}
+{{- end }}