Skip to content

Commit

Permalink
Update PodDisruptionBudget to support policy/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
trihoangvo committed Apr 9, 2024
1 parent 30cf0ae commit 5969769
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/server-disruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{{- if (and .Values.server.disruptionBudget.enabled (or (and (ne (.Values.server.enabled | toString) "-") .Values.server.enabled) (and (eq (.Values.server.enabled | toString) "-") .Values.global.enabled))) }}
# PodDisruptionBudget to prevent degrading the server cluster through
# voluntary cluster changes.
{{- if .Capabilities.APIVersions.Has "policy/v1" }}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "consul.fullname" . }}-server
Expand Down

0 comments on commit 5969769

Please sign in to comment.