Add condition for applying PSPs in DaemonSets.

pull/2272/head
Mauren Berti 2022-12-15 10:56:00 -05:00
parent 026c7c6b30
commit fc922c4724
No known key found for this signature in database
GPG Key ID: 777EC11C23B91E1E
3 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ kind: ServiceAccount
metadata:
name: "{{ .Release.Name }}-k3s-journald-aggregator"
namespace: "{{ .Release.Namespace }}"
{{- if .Values.global.psp.enabled }}
{{- if and .Values.global.psp.enabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role

View File

@ -62,7 +62,7 @@ kind: ServiceAccount
metadata:
name: "{{ .Release.Name }}-rke-aggregator"
namespace: "{{ .Release.Namespace }}"
{{- if .Values.global.psp.enabled }}
{{- if and .Values.global.psp.enabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role

View File

@ -63,7 +63,7 @@ kind: ServiceAccount
metadata:
name: "{{ .Release.Name }}-rke2-journald-aggregator"
namespace: "{{ .Release.Namespace }}"
{{- if .Values.global.psp.enabled }}
{{- if and .Values.global.psp.enabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role