From 3707d97332637a0aa80e479db260f3d0ac7c6ca4 Mon Sep 17 00:00:00 2001 From: vardhaman Date: Thu, 15 Dec 2022 12:26:50 +0530 Subject: [PATCH] psp related fixes for prom2teams chart --- .../generated-changes/overlay/templates/psp.yaml | 2 ++ .../generated-changes/overlay/templates/role.yaml | 2 ++ .../generated-changes/overlay/templates/rolebinding.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml index d1578a430..12295889b 100644 --- a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml +++ b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/psp.yaml @@ -1,3 +1,4 @@ +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: @@ -27,3 +28,4 @@ spec: volumes: - 'configMap' - 'secret' +{{- end }} diff --git a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/role.yaml b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/role.yaml index 25391d588..99ca0f990 100644 --- a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/role.yaml +++ b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/role.yaml @@ -1,3 +1,4 @@ +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -13,3 +14,4 @@ rules: - podsecuritypolicies verbs: - use +{{- end }} diff --git a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/rolebinding.yaml b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/rolebinding.yaml index 3ca8bc252..d32273e0a 100644 --- a/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/rolebinding.yaml +++ b/packages/rancher-alerting/rancher-prom2teams/generated-changes/overlay/templates/rolebinding.yaml @@ -1,3 +1,4 @@ +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: @@ -11,3 +12,4 @@ roleRef: subjects: - kind: ServiceAccount name: {{ include "prom2teams.fullname" . }} +{{- end }}