[rancher-pushprox] Replace implicit capabilities check with .Values.global.cattle.psp.enabled and bump major version

pull/2375/head
Arvind Iyengar 2023-01-27 16:22:05 -08:00
parent 71f20e3e17
commit 9c264011a5
No known key found for this signature in database
GPG Key ID: A8DD9BFD6C811498
5 changed files with 10 additions and 7 deletions

View File

@ -6,7 +6,7 @@ metadata:
name: {{ template "pushProxy.client.name" . }}
labels: {{ include "pushProxy.client.labels" . | nindent 4 }}
rules:
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
{{- if .Values.global.cattle.psp.enabled }}
- apiGroups: ['policy']
resources: ['podsecuritypolicies']
verbs: ['use']
@ -42,7 +42,7 @@ metadata:
namespace: {{ include "pushprox.namespace" . }}
labels: {{ include "pushProxy.client.labels" . | nindent 4 }}
---
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
{{- if .Values.global.cattle.psp.enabled }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:

View File

@ -6,13 +6,13 @@ metadata:
name: {{ template "pushProxy.proxy.name" . }}
labels: {{ include "pushProxy.proxy.labels" . | nindent 4 }}
rules:
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
{{- if .Values.global.cattle.psp.enabled }}
- apiGroups: ['policy']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- {{ template "pushProxy.proxy.name" . }}
{{- end }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
@ -35,7 +35,7 @@ metadata:
namespace: {{ include "pushprox.namespace" . }}
labels: {{ include "pushProxy.proxy.labels" . | nindent 4 }}
---
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicies" }}
{{- if .Values.global.cattle.psp.enabled }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:

View File

@ -9,6 +9,8 @@
global:
cattle:
psp:
enabled: false
systemDefaultRegistry: ""
seLinux:
enabled: false

View File

@ -1,3 +1,2 @@
url: local
version: 101.0.1
doNotRelease: true
version: 102.0.0

View File

@ -66,6 +66,8 @@ rancher-monitoring-crd:
- 101.1.0+up40.1.2
rancher-project-monitoring:
- 1.1.0+up0.2.0-rc1
rancher-pushprox:
- 102.0.0
rancher-vsphere-cpi:
- 101.1.0+up1.4.1
rancher-vsphere-csi: