mirror of https://git.rancher.io/charts
77 lines
1.6 KiB
YAML
77 lines
1.6 KiB
YAML
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: {{ .Chart.Name }}-manager
|
|
labels:
|
|
app: {{ .Chart.Name }}-manager
|
|
rules:
|
|
- apiGroups:
|
|
- apiextensions.k8s.io
|
|
resources:
|
|
- customresourcedefinitions
|
|
verbs: ['create', 'get', 'patch', 'delete']
|
|
{{- if .Values.global.cattle.psp.enabled }}
|
|
- apiGroups: ['policy']
|
|
resources: ['podsecuritypolicies']
|
|
verbs: ['use']
|
|
resourceNames:
|
|
- {{ .Chart.Name }}-manager
|
|
{{- end }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: {{ .Chart.Name }}-manager
|
|
labels:
|
|
app: {{ .Chart.Name }}-manager
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: {{ .Chart.Name }}-manager
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ .Chart.Name }}-manager
|
|
namespace: {{ .Release.Namespace }}
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: {{ .Chart.Name }}-manager
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
app: {{ .Chart.Name }}-manager
|
|
---
|
|
{{- if .Values.global.cattle.psp.enabled }}
|
|
apiVersion: policy/v1beta1
|
|
kind: PodSecurityPolicy
|
|
metadata:
|
|
name: {{ .Chart.Name }}-manager
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
app: {{ .Chart.Name }}-manager
|
|
spec:
|
|
privileged: false
|
|
allowPrivilegeEscalation: false
|
|
hostNetwork: false
|
|
hostIPC: false
|
|
hostPID: false
|
|
runAsUser:
|
|
rule: 'MustRunAsNonRoot'
|
|
seLinux:
|
|
rule: 'RunAsAny'
|
|
supplementalGroups:
|
|
rule: 'MustRunAs'
|
|
ranges:
|
|
- min: 1
|
|
max: 65535
|
|
fsGroup:
|
|
rule: 'MustRunAs'
|
|
ranges:
|
|
- min: 1
|
|
max: 65535
|
|
readOnlyRootFilesystem: false
|
|
volumes:
|
|
- 'configMap'
|
|
- 'secret'
|
|
{{- end }}
|