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
456fd386
Commit
456fd386
authored
Mar 09, 2018
by
David Eads
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update metrics to true like it is for kube-apiserver
parent
1b6b2ee7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
19 deletions
+11
-19
server.go
cmd/kube-apiserver/app/server.go
+0
-1
master.go
pkg/master/master.go
+0
-3
master_test.go
pkg/master/master_test.go
+0
-1
config.go
staging/src/k8s.io/apiserver/pkg/server/config.go
+1
-0
config_test.go
staging/src/k8s.io/apiserver/pkg/server/config_test.go
+1
-0
defaulttolerationseconds_test.go
...defaulttolerationseconds/defaulttolerationseconds_test.go
+0
-1
master_utils.go
test/integration/framework/master_utils.go
+9
-13
No files found.
cmd/kube-apiserver/app/server.go
View file @
456fd386
...
...
@@ -419,7 +419,6 @@ func BuildGenericConfig(s *options.ServerRunOptions, proxyTransport *http.Transp
genericConfig
.
OpenAPIConfig
.
PostProcessSpec
=
postProcessOpenAPISpecForBackwardCompatibility
genericConfig
.
OpenAPIConfig
.
Info
.
Title
=
"Kubernetes"
genericConfig
.
SwaggerConfig
=
genericapiserver
.
DefaultSwaggerConfig
()
genericConfig
.
EnableMetrics
=
true
genericConfig
.
LongRunningFunc
=
filters
.
BasicLongRunningRequestCheck
(
sets
.
NewString
(
"watch"
,
"proxy"
),
sets
.
NewString
(
"attach"
,
"exec"
,
"proxy"
,
"log"
,
"portforward"
),
...
...
pkg/master/master.go
View file @
456fd386
...
...
@@ -284,9 +284,6 @@ func (cfg *Config) Complete(informers informers.SharedInformerFactory) Completed
c
.
ExtraConfig
.
EndpointReconcilerConfig
.
Reconciler
=
cfg
.
createEndpointReconciler
()
}
// this has always been hardcoded true in the past
c
.
GenericConfig
.
EnableMetrics
=
true
return
CompletedConfig
{
&
c
}
}
...
...
pkg/master/master_test.go
View file @
456fd386
...
...
@@ -108,7 +108,6 @@ func setUp(t *testing.T) (*etcdtesting.EtcdTestServer, Config, informers.SharedI
config
.
GenericConfig
.
LegacyAPIGroupPrefixes
=
sets
.
NewString
(
"/api"
)
config
.
GenericConfig
.
RequestContextMapper
=
genericapirequest
.
NewRequestContextMapper
()
config
.
GenericConfig
.
LoopbackClientConfig
=
&
restclient
.
Config
{
APIPath
:
"/api"
,
ContentConfig
:
restclient
.
ContentConfig
{
NegotiatedSerializer
:
legacyscheme
.
Codecs
}}
config
.
GenericConfig
.
EnableMetrics
=
true
config
.
ExtraConfig
.
EnableCoreControllers
=
false
config
.
ExtraConfig
.
KubeletClientConfig
=
kubeletclient
.
KubeletClientConfig
{
Port
:
10250
}
config
.
ExtraConfig
.
ProxyTransport
=
utilnet
.
SetTransportDefaults
(
&
http
.
Transport
{
...
...
staging/src/k8s.io/apiserver/pkg/server/config.go
View file @
456fd386
...
...
@@ -262,6 +262,7 @@ func NewConfig(codecs serializer.CodecFactory) *Config {
EnableIndex
:
true
,
EnableDiscovery
:
true
,
EnableProfiling
:
true
,
EnableMetrics
:
true
,
MaxRequestsInFlight
:
400
,
MaxMutatingRequestsInFlight
:
200
,
RequestTimeout
:
time
.
Duration
(
60
)
*
time
.
Second
,
...
...
staging/src/k8s.io/apiserver/pkg/server/config_test.go
View file @
456fd386
...
...
@@ -109,6 +109,7 @@ func TestNewWithDelegate(t *testing.T) {
"/healthz/poststarthook/generic-apiserver-start-informers",
"/healthz/poststarthook/wrapping-post-start-hook",
"/healthz/wrapping-health",
"/metrics",
"/swaggerapi"
]
}`
,
t
)
...
...
test/integration/defaulttolerationseconds/defaulttolerationseconds_test.go
View file @
456fd386
...
...
@@ -33,7 +33,6 @@ import (
func
TestAdmission
(
t
*
testing
.
T
)
{
masterConfig
:=
framework
.
NewMasterConfig
()
masterConfig
.
GenericConfig
.
EnableProfiling
=
true
masterConfig
.
GenericConfig
.
EnableMetrics
=
true
masterConfig
.
GenericConfig
.
AdmissionControl
=
defaulttolerationseconds
.
NewDefaultTolerationSeconds
()
_
,
s
,
closeFn
:=
framework
.
RunAMaster
(
masterConfig
)
defer
closeFn
()
...
...
test/integration/framework/master_utils.go
View file @
456fd386
...
...
@@ -124,8 +124,6 @@ func startMasterOrDie(masterConfig *master.Config, incomingServer *httptest.Serv
if
masterConfig
==
nil
{
masterConfig
=
NewMasterConfig
()
masterConfig
.
GenericConfig
.
EnableProfiling
=
true
masterConfig
.
GenericConfig
.
EnableMetrics
=
true
masterConfig
.
GenericConfig
.
OpenAPIConfig
=
genericapiserver
.
DefaultOpenAPIConfig
(
openapi
.
GetOpenAPIDefinitions
,
legacyscheme
.
Scheme
)
masterConfig
.
GenericConfig
.
OpenAPIConfig
.
Info
=
&
spec
.
Info
{
InfoProps
:
spec
.
InfoProps
{
...
...
@@ -218,6 +216,15 @@ func startMasterOrDie(masterConfig *master.Config, incomingServer *httptest.Serv
return
m
,
s
,
closeFn
}
// Returns the master config appropriate for most integration tests.
func
NewIntegrationTestMasterConfig
()
*
master
.
Config
{
masterConfig
:=
NewMasterConfig
()
masterConfig
.
ExtraConfig
.
EnableCoreControllers
=
true
masterConfig
.
GenericConfig
.
PublicAddress
=
net
.
ParseIP
(
"192.168.10.4"
)
masterConfig
.
ExtraConfig
.
APIResourceConfigSource
=
master
.
DefaultAPIResourceConfigSource
()
return
masterConfig
}
// Returns a basic master config.
func
NewMasterConfig
()
*
master
.
Config
{
// This causes the integration tests to exercise the etcd
...
...
@@ -280,7 +287,6 @@ func NewMasterConfig() *master.Config {
kubeVersion
:=
version
.
Get
()
genericConfig
.
Version
=
&
kubeVersion
genericConfig
.
Authorization
.
Authorizer
=
authorizerfactory
.
NewAlwaysAllowAuthorizer
()
genericConfig
.
EnableMetrics
=
true
err
:=
etcdOptions
.
ApplyWithStorageFactoryTo
(
storageFactory
,
genericConfig
)
if
err
!=
nil
{
...
...
@@ -300,15 +306,6 @@ func NewMasterConfig() *master.Config {
}
}
// Returns the master config appropriate for most integration tests.
func
NewIntegrationTestMasterConfig
()
*
master
.
Config
{
masterConfig
:=
NewMasterConfig
()
masterConfig
.
ExtraConfig
.
EnableCoreControllers
=
true
masterConfig
.
GenericConfig
.
PublicAddress
=
net
.
ParseIP
(
"192.168.10.4"
)
masterConfig
.
ExtraConfig
.
APIResourceConfigSource
=
master
.
DefaultAPIResourceConfigSource
()
return
masterConfig
}
// CloseFunc can be called to cleanup the master
type
CloseFunc
func
()
...
...
@@ -316,7 +313,6 @@ func RunAMaster(masterConfig *master.Config) (*master.Master, *httptest.Server,
if
masterConfig
==
nil
{
masterConfig
=
NewMasterConfig
()
masterConfig
.
GenericConfig
.
EnableProfiling
=
true
masterConfig
.
GenericConfig
.
EnableMetrics
=
true
}
return
startMasterOrDie
(
masterConfig
,
nil
,
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