2023-01-05 15:42:20 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: {{ _template.account.name }}
|
|
|
|
namespace: {{ _template.account.namespace }}
|
|
|
|
---
|
2023-03-08 16:07:44 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: {{ _template.account.name }}-secret
|
|
|
|
namespace: {{ _template.account.namespace }}
|
|
|
|
annotations:
|
|
|
|
kubernetes.io/service-account.name: {{ _template.account.name }}
|
|
|
|
type: kubernetes.io/service-account-token
|
|
|
|
---
|
2023-01-05 15:42:20 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: {{ _template.clusterrolebinding.name }}
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: {{ _template.account.name }}
|
|
|
|
namespace: {{ _template.account.namespace }}
|
|
|
|
roleRef:
|
|
|
|
kind: ClusterRole
|
|
|
|
name: cluster-admin
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|