Add standalone R3 RIC platform helm charts and deployment scripts.
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / templates / controller-pdb.yaml
diff --git a/helm/infrastructure/subcharts/kong/templates/controller-pdb.yaml b/helm/infrastructure/subcharts/kong/templates/controller-pdb.yaml
new file mode 100755 (executable)
index 0000000..d032781
--- /dev/null
@@ -0,0 +1,20 @@
+{{- if and .Values.ingressController.enabled .Values.ingressController.podDisruptionBudget.enabled }}
+apiVersion: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+  name: "{{ template "kong.fullname" . }}-controller"
+  labels:
+    app: "{{ template "kong.name" . }}"
+spec:
+  {{- if .Values.ingressController.podDisruptionBudget.minAvailable }}
+  minAvailable: {{ .Values.ingressController.podDisruptionBudget.minAvailable }}
+  {{- end  }}
+  {{- if .Values.ingressController.podDisruptionBudget.maxUnavailable }}
+  maxUnavailable: {{ .Values.ingressController.podDisruptionBudget.maxUnavailable }}
+  {{- end  }}
+  selector:
+    matchLabels:
+      app: {{ template "kong.name" . }}
+      release: {{ .Release.Name }}
+      component: controller
+{{- end }}
\ No newline at end of file