mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/fluent-bit] Determine correct PodSecurityPolicy ApiGroup (#15355)
* Determine correct PodSecurityPolicy ApiGroup PodSecurityPolicy API Group changed between Kubernetes version 1.13 (extensions) and 1.14 (policy) Signed-off-by: Tim Hobbs <timothy.hobbs@ic-consult.com> * Bump version Signed-off-by: Tim Hobbs <timothy.hobbs@ic-consult.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
9baed0405e
commit
b8bf0dd11c
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: fluent-bit
|
||||
version: 2.4.1
|
||||
version: 2.4.2
|
||||
appVersion: 1.2.1
|
||||
description: Fast and Lightweight Log/Data Forwarder for Linux, BSD and OSX
|
||||
keywords:
|
||||
|
||||
@@ -55,3 +55,13 @@ Create the name of the service account to use
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiGroup for PodSecurityPolicy.
|
||||
*/}}
|
||||
{{- define "rbac.pspApiGroup" -}}
|
||||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "extensions" -}}
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "policy" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -17,7 +17,7 @@ rules:
|
||||
- get
|
||||
{{- if .Values.rbac.pspEnabled }}
|
||||
- apiGroups:
|
||||
- policy
|
||||
- {{ template "rbac.pspApiGroup" . }}
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
resourceNames:
|
||||
|
||||
Reference in New Issue
Block a user