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
0716df8f
Commit
0716df8f
authored
Jan 14, 2015
by
Dawn Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Event.Source for hostname_override case.
parent
1f210d49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
util.go
pkg/kubelet/util.go
+1
-2
standalone.go
pkg/standalone/standalone.go
+2
-3
No files found.
pkg/kubelet/util.go
View file @
0716df8f
...
...
@@ -82,9 +82,8 @@ func SetupLogging() {
record
.
StartLogging
(
glog
.
Infof
)
}
func
SetupEventSending
(
client
*
client
.
Client
)
{
func
SetupEventSending
(
client
*
client
.
Client
,
hostname
string
)
{
glog
.
Infof
(
"Sending events to api server."
)
hostname
:=
util
.
GetHostname
(
""
)
record
.
StartRecording
(
client
.
Events
(
""
),
api
.
EventSource
{
Component
:
"kubelet"
,
...
...
pkg/standalone/standalone.go
View file @
0716df8f
...
...
@@ -170,16 +170,15 @@ func SimpleRunKubelet(client *client.Client, etcdClient tools.EtcdClient, docker
// 3 Standalone 'kubernetes' binary
// Eventually, #2 will be replaced with instances of #3
func
RunKubelet
(
kcfg
*
KubeletConfig
)
{
kcfg
.
Hostname
=
util
.
GetHostname
(
kcfg
.
HostnameOverride
)
if
kcfg
.
KubeClient
!=
nil
{
kubelet
.
SetupEventSending
(
kcfg
.
KubeClient
)
kubelet
.
SetupEventSending
(
kcfg
.
KubeClient
,
kcfg
.
Hostname
)
}
else
{
glog
.
Infof
(
"No api server defined - no events will be sent."
)
}
kubelet
.
SetupLogging
()
kubelet
.
SetupCapabilities
(
kcfg
.
AllowPrivileged
)
kcfg
.
Hostname
=
util
.
GetHostname
(
kcfg
.
HostnameOverride
)
cfg
:=
makePodSourceConfig
(
kcfg
)
k
,
err
:=
createAndInitKubelet
(
kcfg
,
cfg
)
if
err
!=
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