diff --git a/templates/poddisruptionbudget.yaml b/templates/poddisruptionbudget.yaml index f526e63..5a551d3 100644 --- a/templates/poddisruptionbudget.yaml +++ b/templates/poddisruptionbudget.yaml @@ -1,5 +1,9 @@ {{- if .Values.podDisruptionBudget -}} +{{- if .Capabilities.APIVersions.Has "policy/v1" -}} apiVersion: policy/v1 +{{- else}} +apiVersion: policy/v1beta1 +{{- end }} kind: PodDisruptionBudget metadata: name: {{ template "docker-registry.fullname" . }}