mirror of https://git.rancher.io/charts
100 lines
2.0 KiB
YAML
100 lines
2.0 KiB
YAML
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: Role
|
||
|
metadata:
|
||
|
name: {{ .Chart.Name }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
labels:
|
||
|
app: {{ .Chart.Name }}
|
||
|
rules:
|
||
|
- apiGroups: [""]
|
||
|
resources: ["configmaps"]
|
||
|
verbs: ["*"]
|
||
|
---
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: RoleBinding
|
||
|
metadata:
|
||
|
name: {{ .Chart.Name }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
labels:
|
||
|
app: {{ .Chart.Name }}
|
||
|
roleRef:
|
||
|
apiGroup: rbac.authorization.k8s.io
|
||
|
kind: Role
|
||
|
name: {{ .Chart.Name }}
|
||
|
subjects:
|
||
|
- kind: ServiceAccount
|
||
|
name: {{ .Chart.Name }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
---
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: ClusterRole
|
||
|
metadata:
|
||
|
name: {{ .Chart.Name }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
labels:
|
||
|
app: {{ .Chart.Name }}
|
||
|
rules:
|
||
|
- apiGroups: ["catalog.cattle.io"]
|
||
|
resources:
|
||
|
- uiplugins
|
||
|
- uiplugins/status
|
||
|
verbs: ["*"]
|
||
|
- apiGroups: ["coordination.k8s.io"]
|
||
|
resources:
|
||
|
- leases
|
||
|
verbs: ["*"]
|
||
|
---
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: ClusterRoleBinding
|
||
|
metadata:
|
||
|
name: {{ .Chart.Name }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
labels:
|
||
|
app: {{ .Chart.Name }}
|
||
|
roleRef:
|
||
|
apiGroup: rbac.authorization.k8s.io
|
||
|
kind: ClusterRole
|
||
|
name: {{ .Chart.Name }}
|
||
|
subjects:
|
||
|
- kind: ServiceAccount
|
||
|
name: {{ .Chart.Name }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ServiceAccount
|
||
|
metadata:
|
||
|
name: {{ .Chart.Name }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
labels:
|
||
|
app: {{ .Chart.Name }}
|
||
|
---
|
||
|
apiVersion: policy/v1beta1
|
||
|
kind: PodSecurityPolicy
|
||
|
metadata:
|
||
|
name: {{ .Chart.Name }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
labels:
|
||
|
app: {{ .Chart.Name }}
|
||
|
spec:
|
||
|
privileged: 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:
|
||
|
- 'secret'
|