Check RoleBindings for specified single namespace only (#2142)

Previously, we were doing the creation checks for both Roles/RoleBindings and
ClusterRoles/ClusterRoleBindings for all namespaces, but in --single-namespace
mode, we only need to check that these can be created in the control plane
namespace.
This commit is contained in:
Risha Mars 2019-01-23 18:04:15 -08:00 committed by GitHub
parent c9ac77cd7c
commit e7556d7edc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -297,14 +297,14 @@ func (hc *HealthChecker) allCategories() []category {
description: "can create Roles",
hintURL: "https://linkerd.io/2/getting-started/#step-0-setup",
check: func() error {
return hc.checkCanCreate("", "rbac.authorization.k8s.io", "v1beta1", "Role")
return hc.checkCanCreate(hc.ControlPlaneNamespace, "rbac.authorization.k8s.io", "v1beta1", "Role")
},
},
{
description: "can create RoleBindings",
hintURL: "https://linkerd.io/2/getting-started/#step-0-setup",
check: func() error {
return hc.checkCanCreate("", "rbac.authorization.k8s.io", "v1beta1", "RoleBinding")
return hc.checkCanCreate(hc.ControlPlaneNamespace, "rbac.authorization.k8s.io", "v1beta1", "RoleBinding")
},
},
},