mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #87234 from KobayashiD27/fix-golint
fix golint error in plugin/pkg/auth/authorizer/rbac/bootstrappolicy
This commit is contained in:
commit
d5ea2f15b5
@ -223,7 +223,6 @@ plugin/pkg/admission/resourcequota/apis/resourcequota/v1alpha1
|
|||||||
plugin/pkg/admission/resourcequota/apis/resourcequota/v1beta1
|
plugin/pkg/admission/resourcequota/apis/resourcequota/v1beta1
|
||||||
plugin/pkg/auth/authorizer/node
|
plugin/pkg/auth/authorizer/node
|
||||||
plugin/pkg/auth/authorizer/rbac
|
plugin/pkg/auth/authorizer/rbac
|
||||||
plugin/pkg/auth/authorizer/rbac/bootstrappolicy
|
|
||||||
staging/src/k8s.io/api/admission/v1
|
staging/src/k8s.io/api/admission/v1
|
||||||
staging/src/k8s.io/api/admission/v1beta1
|
staging/src/k8s.io/api/admission/v1beta1
|
||||||
staging/src/k8s.io/api/admissionregistration/v1
|
staging/src/k8s.io/api/admissionregistration/v1
|
||||||
|
@ -27,6 +27,8 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/features"
|
"k8s.io/kubernetes/pkg/features"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Write and other vars are slices of the allowed verbs.
|
||||||
|
// Label and Annotation are default maps of bootstrappolicy.
|
||||||
var (
|
var (
|
||||||
Write = []string{"create", "update", "patch", "delete", "deletecollection"}
|
Write = []string{"create", "update", "patch", "delete", "deletecollection"}
|
||||||
ReadWrite = []string{"get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"}
|
ReadWrite = []string{"get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"}
|
||||||
@ -97,6 +99,7 @@ func addClusterRoleBindingLabel(rolebindings []rbacv1.ClusterRoleBinding) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NodeRules returns node policy rules, it is slice of rbacv1.PolicyRule.
|
||||||
func NodeRules() []rbacv1.PolicyRule {
|
func NodeRules() []rbacv1.PolicyRule {
|
||||||
nodePolicyRules := []rbacv1.PolicyRule{
|
nodePolicyRules := []rbacv1.PolicyRule{
|
||||||
// Needed to check API access. These creates are non-mutating
|
// Needed to check API access. These creates are non-mutating
|
||||||
@ -539,6 +542,7 @@ func ClusterRoleBindings() []rbacv1.ClusterRoleBinding {
|
|||||||
return rolebindings
|
return rolebindings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ClusterRolesToAggregate maps from previous clusterrole name to the new clusterrole name
|
||||||
func ClusterRolesToAggregate() map[string]string {
|
func ClusterRolesToAggregate() map[string]string {
|
||||||
return map[string]string{
|
return map[string]string{
|
||||||
"admin": "system:aggregate-to-admin",
|
"admin": "system:aggregate-to-admin",
|
||||||
|
Loading…
Reference in New Issue
Block a user