diff --git a/deploy/role.yaml b/deploy/role.yaml index d6e7aaa1..17a37f79 100644 --- a/deploy/role.yaml +++ b/deploy/role.yaml @@ -39,6 +39,7 @@ rules: verbs: - create - update + - list - apiGroups: - "" resources: diff --git a/test/e2e/jenkins.go b/test/e2e/jenkins.go index 594699c3..cc197e56 100644 --- a/test/e2e/jenkins.go +++ b/test/e2e/jenkins.go @@ -145,13 +145,13 @@ func createJenkinsCR(t *testing.T, name, namespace string, seedJob *[]v1alpha2.S Type: corev1.ServiceTypeNodePort, Port: constants.DefaultHTTPPortInt32, }, - Roles: []rbacv1.RoleRef{ - { - APIGroup: "rbac.authorization.k8s.io", - Kind: "ClusterRole", - Name: "view", - }, - }, + }, + } + jenkins.Spec.Roles = []rbacv1.RoleRef{ + { + APIGroup: "rbac.authorization.k8s.io", + Kind: "Role", + Name: resources.GetResourceName(jenkins), }, }