Skip to content

Commit d5ea2f1

Browse files
authored
Merge pull request kubernetes#87234 from KobayashiD27/fix-golint
fix golint error in plugin/pkg/auth/authorizer/rbac/bootstrappolicy
2 parents ed0d6ee + 0c3112f commit d5ea2f1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

hack/.golint_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ plugin/pkg/admission/resourcequota/apis/resourcequota/v1alpha1
223223
plugin/pkg/admission/resourcequota/apis/resourcequota/v1beta1
224224
plugin/pkg/auth/authorizer/node
225225
plugin/pkg/auth/authorizer/rbac
226-
plugin/pkg/auth/authorizer/rbac/bootstrappolicy
227226
staging/src/k8s.io/api/admission/v1
228227
staging/src/k8s.io/api/admission/v1beta1
229228
staging/src/k8s.io/api/admissionregistration/v1

plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ import (
2727
"k8s.io/kubernetes/pkg/features"
2828
)
2929

30+
// Write and other vars are slices of the allowed verbs.
31+
// Label and Annotation are default maps of bootstrappolicy.
3032
var (
3133
Write = []string{"create", "update", "patch", "delete", "deletecollection"}
3234
ReadWrite = []string{"get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"}
@@ -97,6 +99,7 @@ func addClusterRoleBindingLabel(rolebindings []rbacv1.ClusterRoleBinding) {
9799
return
98100
}
99101

102+
// NodeRules returns node policy rules, it is slice of rbacv1.PolicyRule.
100103
func NodeRules() []rbacv1.PolicyRule {
101104
nodePolicyRules := []rbacv1.PolicyRule{
102105
// Needed to check API access. These creates are non-mutating
@@ -539,6 +542,7 @@ func ClusterRoleBindings() []rbacv1.ClusterRoleBinding {
539542
return rolebindings
540543
}
541544

545+
// ClusterRolesToAggregate maps from previous clusterrole name to the new clusterrole name
542546
func ClusterRolesToAggregate() map[string]string {
543547
return map[string]string{
544548
"admin": "system:aggregate-to-admin",

0 commit comments

Comments
 (0)