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
ef61b031
Commit
ef61b031
authored
Jun 04, 2015
by
Chao Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make v1 enabled by default
parent
02f3142f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
8 additions
and
20 deletions
+8
-20
integration.go
cmd/integration/integration.go
+0
-1
server.go
cmd/kube-apiserver/app/server.go
+5
-3
master.go
pkg/master/master.go
+3
-3
auth_test.go
test/integration/auth_test.go
+0
-8
master_utils.go
test/integration/framework/master_utils.go
+0
-1
scheduler_test.go
test/integration/scheduler_test.go
+0
-1
secret_test.go
test/integration/secret_test.go
+0
-1
service_account_test.go
test/integration/service_account_test.go
+0
-1
utils.go
test/integration/utils.go
+0
-1
No files found.
cmd/integration/integration.go
View file @
ef61b031
...
@@ -164,7 +164,6 @@ func startComponents(firstManifestURL, secondManifestURL, apiVersion string) (st
...
@@ -164,7 +164,6 @@ func startComponents(firstManifestURL, secondManifestURL, apiVersion string) (st
ReadWritePort
:
portNumber
,
ReadWritePort
:
portNumber
,
PublicAddress
:
publicAddress
,
PublicAddress
:
publicAddress
,
CacheTimeout
:
2
*
time
.
Second
,
CacheTimeout
:
2
*
time
.
Second
,
EnableV1
:
true
,
})
})
handler
.
delegate
=
m
.
Handler
handler
.
delegate
=
m
.
Handler
...
...
cmd/kube-apiserver/app/server.go
View file @
ef61b031
...
@@ -282,8 +282,10 @@ func (s *APIServer) Run(_ []string) error {
...
@@ -282,8 +282,10 @@ func (s *APIServer) Run(_ []string) error {
disableV1beta3
:=
disableAllAPIs
disableV1beta3
:=
disableAllAPIs
disableV1beta3
=
!
s
.
getRuntimeConfigValue
(
"api/v1beta3"
,
!
disableV1beta3
)
disableV1beta3
=
!
s
.
getRuntimeConfigValue
(
"api/v1beta3"
,
!
disableV1beta3
)
// V1 is disabled by default. Users can enable it using "api/v1={true}".
// "api/v1={true|false} allows users to enable/disable v1 API.
_
,
enableV1
:=
s
.
RuntimeConfig
[
"api/v1"
]
// This takes preference over api/all and api/legacy, if specified.
disableV1
:=
disableAllAPIs
disableV1
=
!
s
.
getRuntimeConfigValue
(
"api/v1"
,
!
disableV1
)
// TODO: expose same flags as client.BindClientConfigFlags but for a server
// TODO: expose same flags as client.BindClientConfigFlags but for a server
clientConfig
:=
&
client
.
Config
{
clientConfig
:=
&
client
.
Config
{
...
@@ -371,7 +373,7 @@ func (s *APIServer) Run(_ []string) error {
...
@@ -371,7 +373,7 @@ func (s *APIServer) Run(_ []string) error {
Authorizer
:
authorizer
,
Authorizer
:
authorizer
,
AdmissionControl
:
admissionController
,
AdmissionControl
:
admissionController
,
DisableV1Beta3
:
disableV1beta3
,
DisableV1Beta3
:
disableV1beta3
,
EnableV1
:
en
ableV1
,
DisableV1
:
dis
ableV1
,
MasterServiceNamespace
:
s
.
MasterServiceNamespace
,
MasterServiceNamespace
:
s
.
MasterServiceNamespace
,
ClusterName
:
s
.
ClusterName
,
ClusterName
:
s
.
ClusterName
,
ExternalHost
:
s
.
ExternalHost
,
ExternalHost
:
s
.
ExternalHost
,
...
...
pkg/master/master.go
View file @
ef61b031
...
@@ -91,8 +91,8 @@ type Config struct {
...
@@ -91,8 +91,8 @@ type Config struct {
EnableSwaggerSupport
bool
EnableSwaggerSupport
bool
// allow v1beta3 to be conditionally disabled
// allow v1beta3 to be conditionally disabled
DisableV1Beta3
bool
DisableV1Beta3
bool
// allow v1 to be conditionally
en
abled
// allow v1 to be conditionally
dis
abled
En
ableV1
bool
Dis
ableV1
bool
// allow downstream consumers to disable the index route
// allow downstream consumers to disable the index route
EnableIndex
bool
EnableIndex
bool
EnableProfiling
bool
EnableProfiling
bool
...
@@ -313,7 +313,7 @@ func New(c *Config) *Master {
...
@@ -313,7 +313,7 @@ func New(c *Config) *Master {
authorizer
:
c
.
Authorizer
,
authorizer
:
c
.
Authorizer
,
admissionControl
:
c
.
AdmissionControl
,
admissionControl
:
c
.
AdmissionControl
,
v1beta3
:
!
c
.
DisableV1Beta3
,
v1beta3
:
!
c
.
DisableV1Beta3
,
v1
:
c
.
En
ableV1
,
v1
:
!
c
.
Dis
ableV1
,
requestContextMapper
:
c
.
RequestContextMapper
,
requestContextMapper
:
c
.
RequestContextMapper
,
cacheTimeout
:
c
.
CacheTimeout
,
cacheTimeout
:
c
.
CacheTimeout
,
...
...
test/integration/auth_test.go
View file @
ef61b031
...
@@ -397,7 +397,6 @@ func TestAuthModeAlwaysAllow(t *testing.T) {
...
@@ -397,7 +397,6 @@ func TestAuthModeAlwaysAllow(t *testing.T) {
APIPrefix
:
"/api"
,
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
transport
:=
http
.
DefaultTransport
transport
:=
http
.
DefaultTransport
...
@@ -538,7 +537,6 @@ func TestAuthModeAlwaysDeny(t *testing.T) {
...
@@ -538,7 +537,6 @@ func TestAuthModeAlwaysDeny(t *testing.T) {
APIPrefix
:
"/api"
,
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysDenyAuthorizer
(),
Authorizer
:
apiserver
.
NewAlwaysDenyAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
transport
:=
http
.
DefaultTransport
transport
:=
http
.
DefaultTransport
...
@@ -607,7 +605,6 @@ func TestAliceNotForbiddenOrUnauthorized(t *testing.T) {
...
@@ -607,7 +605,6 @@ func TestAliceNotForbiddenOrUnauthorized(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
allowAliceAuthorizer
{},
Authorizer
:
allowAliceAuthorizer
{},
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
previousResourceVersion
:=
make
(
map
[
string
]
float64
)
previousResourceVersion
:=
make
(
map
[
string
]
float64
)
...
@@ -695,7 +692,6 @@ func TestBobIsForbidden(t *testing.T) {
...
@@ -695,7 +692,6 @@ func TestBobIsForbidden(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
allowAliceAuthorizer
{},
Authorizer
:
allowAliceAuthorizer
{},
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
transport
:=
http
.
DefaultTransport
transport
:=
http
.
DefaultTransport
...
@@ -757,7 +753,6 @@ func TestUnknownUserIsUnauthorized(t *testing.T) {
...
@@ -757,7 +753,6 @@ func TestUnknownUserIsUnauthorized(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
allowAliceAuthorizer
{},
Authorizer
:
allowAliceAuthorizer
{},
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
transport
:=
http
.
DefaultTransport
transport
:=
http
.
DefaultTransport
...
@@ -838,7 +833,6 @@ func TestNamespaceAuthorization(t *testing.T) {
...
@@ -838,7 +833,6 @@ func TestNamespaceAuthorization(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
a
,
Authorizer
:
a
,
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
previousResourceVersion
:=
make
(
map
[
string
]
float64
)
previousResourceVersion
:=
make
(
map
[
string
]
float64
)
...
@@ -954,7 +948,6 @@ func TestKindAuthorization(t *testing.T) {
...
@@ -954,7 +948,6 @@ func TestKindAuthorization(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
a
,
Authorizer
:
a
,
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
previousResourceVersion
:=
make
(
map
[
string
]
float64
)
previousResourceVersion
:=
make
(
map
[
string
]
float64
)
...
@@ -1057,7 +1050,6 @@ func TestReadOnlyAuthorization(t *testing.T) {
...
@@ -1057,7 +1050,6 @@ func TestReadOnlyAuthorization(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
a
,
Authorizer
:
a
,
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
transport
:=
http
.
DefaultTransport
transport
:=
http
.
DefaultTransport
...
...
test/integration/framework/master_utils.go
View file @
ef61b031
...
@@ -272,7 +272,6 @@ func RunAMaster(t *testing.T) (*master.Master, *httptest.Server) {
...
@@ -272,7 +272,6 @@ func RunAMaster(t *testing.T) (*master.Master, *httptest.Server) {
APIPrefix
:
"/api"
,
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
...
...
test/integration/scheduler_test.go
View file @
ef61b031
...
@@ -75,7 +75,6 @@ func TestUnschedulableNodes(t *testing.T) {
...
@@ -75,7 +75,6 @@ func TestUnschedulableNodes(t *testing.T) {
APIPrefix
:
"/api"
,
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
restClient
:=
client
.
NewOrDie
(
&
client
.
Config
{
Host
:
s
.
URL
,
Version
:
testapi
.
Version
()})
restClient
:=
client
.
NewOrDie
(
&
client
.
Config
{
Host
:
s
.
URL
,
Version
:
testapi
.
Version
()})
...
...
test/integration/secret_test.go
View file @
ef61b031
...
@@ -68,7 +68,6 @@ func TestSecrets(t *testing.T) {
...
@@ -68,7 +68,6 @@ func TestSecrets(t *testing.T) {
APIPrefix
:
"/api"
,
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
framework
.
DeleteAllEtcdKeys
()
framework
.
DeleteAllEtcdKeys
()
...
...
test/integration/service_account_test.go
View file @
ef61b031
...
@@ -419,7 +419,6 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config,
...
@@ -419,7 +419,6 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config,
Authenticator
:
authenticator
,
Authenticator
:
authenticator
,
Authorizer
:
authorizer
,
Authorizer
:
authorizer
,
AdmissionControl
:
serviceAccountAdmission
,
AdmissionControl
:
serviceAccountAdmission
,
EnableV1
:
true
,
})
})
// Start the service account and service account token controllers
// Start the service account and service account token controllers
...
...
test/integration/utils.go
View file @
ef61b031
...
@@ -82,7 +82,6 @@ func runAMaster(t *testing.T) (*master.Master, *httptest.Server) {
...
@@ -82,7 +82,6 @@ func runAMaster(t *testing.T) (*master.Master, *httptest.Server) {
APIPrefix
:
"/api"
,
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
})
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
...
...
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