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
4e3b4bd1
Commit
4e3b4bd1
authored
Apr 13, 2015
by
Victor Marmol
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6731 from xiang90/util-kubulet
pkg/kubelet: kill a TODO in util.go
parents
86091eea
cea38a2f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
server.go
cmd/kubelet/app/server.go
+2
-1
capabilities.go
pkg/capabilities/capabilities.go
+8
-0
util.go
pkg/kubelet/util.go
+0
-9
No files found.
cmd/kubelet/app/server.go
View file @
4e3b4bd1
...
...
@@ -29,6 +29,7 @@ import (
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
"github.com/GoogleCloudPlatform/kubernetes/pkg/clientauth"
...
...
@@ -406,7 +407,7 @@ func RunKubelet(kcfg *KubeletConfig, builder KubeletBuilder) {
}
else
{
glog
.
Infof
(
"No api server defined - no events will be sent to API server."
)
}
kubelet
.
SetupCapabilities
(
kcfg
.
AllowPrivileged
,
kcfg
.
HostNetworkSources
)
capabilities
.
Setup
(
kcfg
.
AllowPrivileged
,
kcfg
.
HostNetworkSources
)
credentialprovider
.
SetPreferredDockercfgPath
(
kcfg
.
RootDirectory
)
...
...
pkg/capabilities/capabilities.go
View file @
4e3b4bd1
...
...
@@ -40,6 +40,14 @@ func Initialize(c Capabilities) {
})
}
// Setup the capability set. It wraps Initialize for improving usibility.
func
Setup
(
allowPrivileged
bool
,
hostNetworkSources
[]
string
)
{
Initialize
(
Capabilities
{
AllowPrivileged
:
allowPrivileged
,
HostNetworkSources
:
hostNetworkSources
,
})
}
// SetCapabilitiesForTests. Convenience method for testing. This should only be called from tests.
func
SetForTests
(
c
Capabilities
)
{
capabilities
=
&
c
...
...
pkg/kubelet/util.go
View file @
4e3b4bd1
...
...
@@ -19,18 +19,9 @@ package kubelet
import
(
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource"
"github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities"
cadvisorApi
"github.com/google/cadvisor/info/v1"
)
// TODO: move this into pkg/capabilities
func
SetupCapabilities
(
allowPrivileged
bool
,
hostNetworkSources
[]
string
)
{
capabilities
.
Initialize
(
capabilities
.
Capabilities
{
AllowPrivileged
:
allowPrivileged
,
HostNetworkSources
:
hostNetworkSources
,
})
}
func
CapacityFromMachineInfo
(
info
*
cadvisorApi
.
MachineInfo
)
api
.
ResourceList
{
c
:=
api
.
ResourceList
{
api
.
ResourceCPU
:
*
resource
.
NewMilliQuantity
(
...
...
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