Skip to content

Commit

Permalink
use PodDisruptionBudget API policy/v1 if available
Browse files Browse the repository at this point in the history
  • Loading branch information
bdols committed Aug 11, 2023
1 parent eee3607 commit 77b811c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/flagger/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if .Values.podDisruptionBudget.enabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1" -}}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "flagger.name" . }}
Expand Down
4 changes: 4 additions & 0 deletions charts/loadtester/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if .Values.podDisruptionBudget.enabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1" -}}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ include "loadtester.fullname" . }}
Expand Down

0 comments on commit 77b811c

Please sign in to comment.