Skip to content

Commit

Permalink
fix: issue with apiVersion not being set for psp
Browse files Browse the repository at this point in the history
make sure to use `apiVersion: policy/v1beta1` for PodSecurityPolicy when kubernetes version is above 1.10.
This fix will work (with a deprecation warning) for cluster version below 1.25 when psp is removed.
  • Loading branch information
ViktorCollin committed Feb 13, 2023
1 parent a484713 commit e06d6a8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion charts/cluster-autoscaler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ name: cluster-autoscaler
sources:
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
type: application
version: 9.23.1
version: 9.23.2
2 changes: 0 additions & 2 deletions charts/cluster-autoscaler/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ Return the appropriate apiVersion for podsecuritypolicy.
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if semverCompare "<1.10-0" $kubeTargetVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else if semverCompare ">1.21-0" $kubeTargetVersion -}}
{{- print "policy/v1" -}}
{{- else -}}
{{- print "policy/v1beta1" -}}
{{- end -}}
Expand Down

0 comments on commit e06d6a8

Please sign in to comment.