Skip to content

Commit

Permalink
Prepare 1.25 support (#73)
Browse files Browse the repository at this point in the history
* substitute upstream psp condition with our own

* fix path
  • Loading branch information
vxav authored Feb 27, 2024
1 parent 2497c55 commit caba1b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions hack/custom-patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ ${YQ} e '.spec.template.spec.securityContext.remove-this-key="'"
"'"' ${f} > ${f}.tmp
cat ${f}.tmp | grep -v 'remove-this-key' > ${f}
rm -rf ${f}.tmp

# Replace the upstream psp condition with our own.

cpi_psp_file="helm/cloud-provider-vsphere/charts/cloud-provider-for-vsphere/templates/podsecuritypolicy.yaml"

sed -i 's/{{- if \.Values\.podSecurityPolicy\.enabled }}/{{- if not .Values.global.podSecurityStandards.enforced }}/g' "$cpi_psp_file"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.podSecurityPolicy.enabled }}
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down

0 comments on commit caba1b9

Please sign in to comment.