From 71c96ae72e6926291c49b61350c117406aeca5e3 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Wed, 23 Nov 2022 14:27:20 +0800 Subject: [PATCH] fix: only install PodSecurityPolicy if the API is available --- charts/logging-operator/templates/psp.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/logging-operator/templates/psp.yaml b/charts/logging-operator/templates/psp.yaml index 46b2071ef..81b65f2e2 100644 --- a/charts/logging-operator/templates/psp.yaml +++ b/charts/logging-operator/templates/psp.yaml @@ -1,4 +1,4 @@ -{{ if and .Values.rbac.enabled .Values.rbac.psp.enabled }} +{{ if and .Values.rbac.enabled .Values.rbac.psp.enabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: