kubeasz/roles/deploy/templates/crb.yaml.j2

17 lines
344 B
Django/Jinja

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: crb-{{ USER_NAME }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
{% if USER_TYPE == 'admin' %}
name: cluster-admin
{% else %}
name: view
{% endif %}
subjects:
- kind: User
name: {{ USER_NAME }}
apiGroup: rbac.authorization.k8s.io