update rolebinding name

Signed-off-by: liuwei <liuweixa@redhat.com>
This commit is contained in:
liuwei
2021-03-11 09:05:03 +08:00
parent cc4f6687b6
commit 2006c4ed4b
4 changed files with 5 additions and 5 deletions

View File

@@ -150,7 +150,7 @@ func pkgHubManagedclusterManifestsManagedclusterNamespaceYaml() (*asset, error)
var _pkgHubManagedclusterManifestsManagedclusterRegistrationRolebindingYaml = []byte(`apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .ManagedClusterName }}:managed-cluster-registration
name: open-cluster-management:managedcluster:{{ .ManagedClusterName }}:registration
namespace: {{ .ManagedClusterName }}
roleRef:
apiGroup: rbac.authorization.k8s.io
@@ -182,7 +182,7 @@ func pkgHubManagedclusterManifestsManagedclusterRegistrationRolebindingYaml() (*
var _pkgHubManagedclusterManifestsManagedclusterWorkRolebindingYaml = []byte(`apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .ManagedClusterName }}:managed-cluster-work
name: open-cluster-management:managedcluster:{{ .ManagedClusterName }}:work
namespace: {{ .ManagedClusterName }}
finalizers:
- cluster.open-cluster-management.io/manifest-work-cleanup

View File

@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .ManagedClusterName }}:managed-cluster-registration
name: open-cluster-management:managedcluster:{{ .ManagedClusterName }}:registration
namespace: {{ .ManagedClusterName }}
roleRef:
apiGroup: rbac.authorization.k8s.io

View File

@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .ManagedClusterName }}:managed-cluster-work
name: open-cluster-management:managedcluster:{{ .ManagedClusterName }}:work
namespace: {{ .ManagedClusterName }}
finalizers:
- cluster.open-cluster-management.io/manifest-work-cleanup

View File

@@ -48,7 +48,7 @@ var _ = ginkgo.Describe("Cluster deleting", func() {
err = clusterClient.ClusterV1().ManagedClusters().Delete(context.Background(), managedCluster.Name, metav1.DeleteOptions{})
gomega.Expect(err).NotTo(gomega.HaveOccurred())
roleBindingName := fmt.Sprintf("%s:managed-cluster-work", managedCluster.Name)
roleBindingName := fmt.Sprintf("open-cluster-management:managedcluster:%s:work", managedCluster.Name)
err = kubeClient.RbacV1().RoleBindings(managedCluster.Name).Delete(context.Background(), roleBindingName, metav1.DeleteOptions{})
gomega.Expect(err).NotTo(gomega.HaveOccurred())