rancher / cluster-template-examples

Apache License 2.0
43 stars 128 forks source link

Fix clusterrolestemplatebinding #32

Open kkedbi opened 8 months ago

kkedbi commented 8 months ago

The clusterroletemplatebinding need the management cluster name which is generated in the source code of Rancher. The lookup will directly fetch the management cluster name.

The if condition is to skip the creation on the first deployment of the App (rke2 cluster template) as the management cluster name and namespace are not created yet by Rancher.

Also adding $member.roleTemplateName to the name of ClusterRoleTemplateBinding to allow assignments of multiples roles to the same user.