From fb81b0ba41619c2d75b936a6cdfe5cee33deecc5 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Fri, 27 Jan 2023 12:17:38 -0800 Subject: [PATCH] [rancher-alerting-drivers] Use global.cattle.psp.enabled field and bump major version --- .../rancher-alerting-drivers/charts/templates/hardened.yaml | 4 ++-- .../rancher-alerting-drivers/charts/values.yaml | 2 ++ .../rancher-alerting/rancher-alerting-drivers/package.yaml | 2 +- release.yaml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml b/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml index 5a5bc247f..be1ddc12a 100644 --- a/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml +++ b/packages/rancher-alerting/rancher-alerting-drivers/charts/templates/hardened.yaml @@ -52,7 +52,7 @@ rules: - apiGroups: [""] resources: ["serviceaccounts"] verbs: ["get", "patch"] - {{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} + {{- if .Values.global.cattle.psp.enabled }} - apiGroups: ["policy"] resources: ["podsecuritypolicies"] verbs: ["use"] @@ -77,7 +77,7 @@ subjects: name: {{ include "drivers.fullname" . }}-patch-sa namespace: {{ .Release.Namespace }} --- -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} +{{- if .Values.global.cattle.psp.enabled }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: diff --git a/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml b/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml index 48b77ef94..13b1589cd 100644 --- a/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml +++ b/packages/rancher-alerting/rancher-alerting-drivers/charts/values.yaml @@ -4,6 +4,8 @@ global: cattle: + psp: + enabled: false # the registry where all images will be pulled from systemDefaultRegistry: "" kubectl: diff --git a/packages/rancher-alerting/rancher-alerting-drivers/package.yaml b/packages/rancher-alerting/rancher-alerting-drivers/package.yaml index fb2b3008a..265d05981 100644 --- a/packages/rancher-alerting/rancher-alerting-drivers/package.yaml +++ b/packages/rancher-alerting/rancher-alerting-drivers/package.yaml @@ -1,2 +1,2 @@ url: local -version: 101.0.1 +version: 102.0.0 diff --git a/release.yaml b/release.yaml index 6794c461e..f9d075892 100644 --- a/release.yaml +++ b/release.yaml @@ -23,7 +23,7 @@ rancher-aks-operator: rancher-aks-operator-crd: - 101.0.1+up1.1.0-rc2 rancher-alerting-drivers: -- 101.0.1 +- 102.0.0 rancher-backup: - 3.0.1-rc4 rancher-backup-crd: