Merge pull request #48263 from CaoShuFeng/useless_argument

Automatic merge from submit-queue

remove useless argument "name"

**Release note**:

```
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-08-18 05:41:45 -07:00 committed by GitHub
commit c3a39f763e
3 changed files with 4 additions and 4 deletions

View File

@ -28,7 +28,7 @@ func UserInfo(namespace, name, uid string) user.Info {
return &user.DefaultInfo{
Name: apiserverserviceaccount.MakeUsername(namespace, name),
UID: uid,
Groups: apiserverserviceaccount.MakeGroupNames(namespace, name),
Groups: apiserverserviceaccount.MakeGroupNames(namespace),
}
}

View File

@ -59,8 +59,8 @@ func SplitUsername(username string) (string, string, error) {
return namespace, name, nil
}
// MakeGroupNames generates service account group names for the given namespace and ServiceAccount name
func MakeGroupNames(namespace, name string) []string {
// MakeGroupNames generates service account group names for the given namespace
func MakeGroupNames(namespace string) []string {
return []string{
AllServiceAccountsGroup,
MakeNamespaceGroupName(namespace),

View File

@ -85,7 +85,7 @@ func WithImpersonation(handler http.Handler, requestContextMapper request.Reques
username = serviceaccount.MakeUsername(impersonationRequest.Namespace, impersonationRequest.Name)
if !groupsSpecified {
// if groups aren't specified for a service account, we know the groups because its a fixed mapping. Add them
groups = serviceaccount.MakeGroupNames(impersonationRequest.Namespace, impersonationRequest.Name)
groups = serviceaccount.MakeGroupNames(impersonationRequest.Namespace)
}
case v1.SchemeGroupVersion.WithKind("User").GroupKind():