Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
b26e9dce
Commit
b26e9dce
authored
Jan 10, 2017
by
deads2k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove API to server library dependency
parent
958466f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
BUILD
pkg/apis/rbac/v1alpha1/BUILD
+0
-1
conversion.go
pkg/apis/rbac/v1alpha1/conversion.go
+5
-2
No files found.
pkg/apis/rbac/v1alpha1/BUILD
View file @
b26e9dce
...
@@ -35,7 +35,6 @@ go_library(
...
@@ -35,7 +35,6 @@ go_library(
"//pkg/types:go_default_library",
"//pkg/types:go_default_library",
"//vendor:github.com/gogo/protobuf/proto",
"//vendor:github.com/gogo/protobuf/proto",
"//vendor:github.com/ugorji/go/codec",
"//vendor:github.com/ugorji/go/codec",
"//vendor:k8s.io/apiserver/pkg/authentication/user",
],
],
)
)
...
...
pkg/apis/rbac/v1alpha1/conversion.go
View file @
b26e9dce
...
@@ -17,11 +17,14 @@ limitations under the License.
...
@@ -17,11 +17,14 @@ limitations under the License.
package
v1alpha1
package
v1alpha1
import
(
import
(
"k8s.io/apiserver/pkg/authentication/user"
api
"k8s.io/kubernetes/pkg/apis/rbac"
api
"k8s.io/kubernetes/pkg/apis/rbac"
"k8s.io/kubernetes/pkg/conversion"
"k8s.io/kubernetes/pkg/conversion"
)
)
// allAuthenticated matches k8s.io/apiserver/pkg/authentication/user.AllAuthenticated,
// but we don't want an client library (which must include types), depending on a server library
const
allAuthenticated
=
"system:authenticated"
func
Convert_v1alpha1_Subject_To_rbac_Subject
(
in
*
Subject
,
out
*
api
.
Subject
,
s
conversion
.
Scope
)
error
{
func
Convert_v1alpha1_Subject_To_rbac_Subject
(
in
*
Subject
,
out
*
api
.
Subject
,
s
conversion
.
Scope
)
error
{
if
err
:=
autoConvert_v1alpha1_Subject_To_rbac_Subject
(
in
,
out
,
s
);
err
!=
nil
{
if
err
:=
autoConvert_v1alpha1_Subject_To_rbac_Subject
(
in
,
out
,
s
);
err
!=
nil
{
return
err
return
err
...
@@ -32,7 +35,7 @@ func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *api.Subject, s c
...
@@ -32,7 +35,7 @@ func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *api.Subject, s c
// Special treatment for * should not be included in v1beta1
// Special treatment for * should not be included in v1beta1
if
out
.
Kind
==
UserKind
&&
out
.
Name
==
"*"
{
if
out
.
Kind
==
UserKind
&&
out
.
Name
==
"*"
{
out
.
Kind
=
GroupKind
out
.
Kind
=
GroupKind
out
.
Name
=
user
.
A
llAuthenticated
out
.
Name
=
a
llAuthenticated
}
}
return
nil
return
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment