Skip to content

Commit

Permalink
fix: just check for the base api version.
Browse files Browse the repository at this point in the history
`helm template` uses the `chartutil.DefaultCapabilities` in the `.Capabilities.APIVersions` check. This is limited to the Kubernetes group/version and omits the kind. For the purpose of making the sure the PDB is being installed with the correct policy version, just checking if `policy/v1` exists in the cluster should be enough.

Addresses: helm/helm#11809
Signed-off-by: Noah Krause <krausenoah@gmail.com>
  • Loading branch information
iNoahNothing committed Aug 8, 2023
1 parent a19e079 commit f086313
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }}
{{- if not (.Capabilities.APIVersions.Has "policy/v1") }}
apiVersion: policy/v1beta1
{{- else }}
apiVersion: policy/v1
Expand Down

0 comments on commit f086313

Please sign in to comment.