Refactor cluster registration
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-02 22:36:23 +02:00
parent 3f9fc4b7aa
commit 89cf69adc7
5 changed files with 34 additions and 22 deletions

View File

@ -0,0 +1,27 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ _template.account.name }}
namespace: {{ _template.account.namespace }}
---
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
---
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