kyma-project / cli

Simple set of commands to manage a Kyma installation
Apache License 2.0
111 stars 118 forks source link

Allow defining cluster owner when provisioning managed kyma instance #2024

Closed kwiatekus closed 3 months ago

kwiatekus commented 3 months ago

Description

Provide additional, mandatory --owner flag to kyma provisioning command. Pass it on to the provisioning backens API so that initial cluster admin role is created:

kyma provision --credentials-path={path} --region={region} --plan={plan} --owner=john.doe@sap.com

The owner should be referenced in the resulting cluster role binding on the freshly created cluster

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: administrator0
...
subjects:
  - kind: User
    apiGroup: rbac.authorization.k8s.io
    name: john.doe@sap.com
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin

Reason Provisioning via CLI should include cluster owner information so that initial cluster role bindings could be created to ensure initial access