All checks were successful
Build and Publish TechDocs / build-and-publish (push) Successful in 1m15s
Change-Id: I2e2564a72b6be9af536235fc3795fd788fd9257b
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
{{/*
|
|
Copyright 2019 HAProxy Technologies LLC
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
|
|
{{- if .Values.PodDisruptionBudget.enable }}
|
|
{{- if .Capabilities.APIVersions.Has "policy/v1" }}
|
|
apiVersion: policy/v1
|
|
{{- else if .Capabilities.APIVersions.Has "policy/v1beta1" }}
|
|
apiVersion: policy/v1beta1
|
|
{{- else }}
|
|
{{- fail "ERROR: You must have policy/v1 or policy/v1 to use PodDisruptionBudget" }}
|
|
{{- end }}
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
name: {{ include "haproxy.fullname" . }}
|
|
namespace: {{ include "haproxy.namespace" . }}
|
|
labels:
|
|
{{- include "haproxy.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if .Values.PodDisruptionBudget.maxUnavailable }}
|
|
maxUnavailable: {{ .Values.PodDisruptionBudget.maxUnavailable }}
|
|
{{- end }}
|
|
{{- if .Values.PodDisruptionBudget.minAvailable }}
|
|
minAvailable: {{ .Values.PodDisruptionBudget.minAvailable }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "haproxy.selectorLabels" . | nindent 6 }}
|
|
{{- end }}
|