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
1f5b4b88
Commit
1f5b4b88
authored
Mar 24, 2016
by
Brendan Burns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address comments.
parent
87a1635c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
master.go
pkg/master/master.go
+3
-6
master_test.go
pkg/master/master_test.go
+6
-3
No files found.
pkg/master/master.go
View file @
1f5b4b88
...
@@ -702,16 +702,13 @@ func (m *Master) getExtensionResources(c *Config) map[string]rest.Storage {
...
@@ -702,16 +702,13 @@ func (m *Master) getExtensionResources(c *Config) map[string]rest.Storage {
master
:
m
,
master
:
m
,
thirdPartyResourceRegistry
:
thirdPartyResourceStorage
,
thirdPartyResourceRegistry
:
thirdPartyResourceStorage
,
}
}
go
func
()
{
if
!
m
.
disableThirdPartyControllerForTesting
{
wait
.
Forever
(
func
()
{
go
wait
.
Forever
(
func
()
{
if
m
.
disableThirdPartyControllerForTesting
{
return
}
if
err
:=
thirdPartyControl
.
SyncResources
();
err
!=
nil
{
if
err
:=
thirdPartyControl
.
SyncResources
();
err
!=
nil
{
glog
.
Warningf
(
"third party resource sync failed: %v"
,
err
)
glog
.
Warningf
(
"third party resource sync failed: %v"
,
err
)
}
}
},
10
*
time
.
Second
)
},
10
*
time
.
Second
)
}
()
}
storage
[
"thirdpartyresources"
]
=
thirdPartyResourceStorage
storage
[
"thirdpartyresources"
]
=
thirdPartyResourceStorage
}
}
...
...
pkg/master/master_test.go
View file @
1f5b4b88
...
@@ -97,8 +97,12 @@ func newMaster(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *ass
...
@@ -97,8 +97,12 @@ func newMaster(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *ass
config
.
ProxyDialer
=
func
(
network
,
addr
string
)
(
net
.
Conn
,
error
)
{
return
nil
,
nil
}
config
.
ProxyDialer
=
func
(
network
,
addr
string
)
(
net
.
Conn
,
error
)
{
return
nil
,
nil
}
config
.
ProxyTLSClientConfig
=
&
tls
.
Config
{}
config
.
ProxyTLSClientConfig
=
&
tls
.
Config
{}
// TODO: this is kind of hacky, make testing flakes go away even with
// TODO: this is kind of hacky. The trouble is that the sync loop
// the sync loop running.
// runs in a go-routine and there is no way to validate in the test
// that the sync routine has actually run. The right answer here
// is probably to add some sort of callback that we can register
// to validate that it's actually been run, but for now we don't
// run the sync routine and register types manually.
config
.
disableThirdPartyControllerForTesting
=
true
config
.
disableThirdPartyControllerForTesting
=
true
master
,
err
:=
New
(
&
config
)
master
,
err
:=
New
(
&
config
)
...
@@ -484,7 +488,6 @@ func initThirdParty(t *testing.T, version string) (*Master, *etcdtesting.EtcdTes
...
@@ -484,7 +488,6 @@ func initThirdParty(t *testing.T, version string) (*Master, *etcdtesting.EtcdTes
},
},
},
},
}
}
// master.thirdPartyStorage = etcdstorage.NewEtcdStorage(etcdserver.Client, testapi.Extensions.Codec(), etcdtest.PathPrefix(), false)
_
,
master
.
ServiceClusterIPRange
,
_
=
net
.
ParseCIDR
(
"10.0.0.0/24"
)
_
,
master
.
ServiceClusterIPRange
,
_
=
net
.
ParseCIDR
(
"10.0.0.0/24"
)
if
!
assert
.
NoError
(
master
.
InstallThirdPartyResource
(
api
))
{
if
!
assert
.
NoError
(
master
.
InstallThirdPartyResource
(
api
))
{
...
...
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