mirror of https://git.rancher.io/charts
30 lines
839 B
YAML
30 lines
839 B
YAML
{{- if and .Values.rbac .Values.leastPrivilege -}}
|
|
{{- $oc4 := and .Values.openshift (semverCompare ">=1.12-0" (substr 1 -1 .Capabilities.KubeVersion.GitVersion)) -}}
|
|
{{- $oc3 := and .Values.openshift (not $oc4) (semverCompare ">=1.9-0" (substr 1 -1 .Capabilities.KubeVersion.GitVersion)) -}}
|
|
{{- if $oc3 }}
|
|
apiVersion: authorization.openshift.io/v1
|
|
{{- else if (semverCompare ">=1.8-0" (substr 1 -1 .Capabilities.KubeVersion.GitVersion)) }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
{{- else }}
|
|
apiVersion: v1
|
|
{{- end }}
|
|
kind: Role
|
|
metadata:
|
|
name: neuvector-binding-scanner
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
chart: {{ template "neuvector.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: Helm
|
|
rules:
|
|
- apiGroups:
|
|
- apps
|
|
resources:
|
|
- deployments
|
|
verbs:
|
|
- get
|
|
- watch
|
|
- patch
|
|
- update
|
|
{{- end }}
|