mirror of https://git.rancher.io/charts
[rancher-prom2teams] Move role+rolebinding for PSPs to psp.yaml
parent
d8c28a415e
commit
14fc295077
|
@ -28,4 +28,34 @@ spec:
|
||||||
volumes:
|
volumes:
|
||||||
- 'configMap'
|
- 'configMap'
|
||||||
- 'secret'
|
- 'secret'
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ include "prom2teams.fullname" . }}-psp
|
||||||
|
namespace: {{ include "prom2teams.namespace" . }}
|
||||||
|
labels: {{ include "prom2teams.labels" . | nindent 4 }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- policy
|
||||||
|
resourceNames:
|
||||||
|
- {{ include "prom2teams.fullname" . }}-psp
|
||||||
|
resources:
|
||||||
|
- podsecuritypolicies
|
||||||
|
verbs:
|
||||||
|
- use
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "prom2teams.fullname" . }}-psp
|
||||||
|
namespace: {{ include "prom2teams.namespace" . }}
|
||||||
|
labels: {{ include "prom2teams.labels" . | nindent 4 }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ include "prom2teams.fullname" . }}-psp
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "prom2teams.fullname" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: Role
|
|
||||||
metadata:
|
|
||||||
name: {{ include "prom2teams.fullname" . }}-psp
|
|
||||||
namespace: {{ include "prom2teams.namespace" . }}
|
|
||||||
labels: {{ include "prom2teams.labels" . | nindent 4 }}
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- policy
|
|
||||||
resourceNames:
|
|
||||||
- {{ include "prom2teams.fullname" . }}-psp
|
|
||||||
resources:
|
|
||||||
- podsecuritypolicies
|
|
||||||
verbs:
|
|
||||||
- use
|
|
||||||
{{- end }}
|
|
|
@ -1,15 +0,0 @@
|
||||||
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: {{ include "prom2teams.fullname" . }}-psp
|
|
||||||
namespace: {{ include "prom2teams.namespace" . }}
|
|
||||||
labels: {{ include "prom2teams.labels" . | nindent 4 }}
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: {{ include "prom2teams.fullname" . }}-psp
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: {{ include "prom2teams.fullname" . }}
|
|
||||||
{{- end }}
|
|
Loading…
Reference in New Issue