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
96a2a74e
Commit
96a2a74e
authored
Feb 26, 2019
by
Erik Wilson
Committed by
Darren Shepherd
Feb 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make systemd notify optional in generic api server
To properly notify systemd that the k3s server is ready we need to prevent the current k8s notification and add one to the k3s cli.
parent
e6179612
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
genericapiserver.go
staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go
+11
-5
No files found.
staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go
View file @
96a2a74e
...
@@ -44,6 +44,10 @@ import (
...
@@ -44,6 +44,10 @@ import (
restclient
"k8s.io/client-go/rest"
restclient
"k8s.io/client-go/rest"
)
)
var
(
NotifySystemD
=
true
)
// Info about an API group.
// Info about an API group.
type
APIGroupInfo
struct
{
type
APIGroupInfo
struct
{
PrioritizedVersions
[]
schema
.
GroupVersion
PrioritizedVersions
[]
schema
.
GroupVersion
...
@@ -292,8 +296,10 @@ func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}) error {
...
@@ -292,8 +296,10 @@ func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}) error {
s
.
RunPostStartHooks
(
stopCh
)
s
.
RunPostStartHooks
(
stopCh
)
if
_
,
err
:=
systemd
.
SdNotify
(
true
,
"READY=1
\n
"
);
err
!=
nil
{
if
NotifySystemD
{
klog
.
Errorf
(
"Unable to send systemd daemon successful start message: %v
\n
"
,
err
)
if
_
,
err
:=
systemd
.
SdNotify
(
true
,
"READY=1
\n
"
);
err
!=
nil
{
klog
.
Errorf
(
"Unable to send systemd daemon successful start message: %v
\n
"
,
err
)
}
}
}
return
nil
return
nil
...
@@ -405,9 +411,9 @@ func (s *GenericAPIServer) newAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupV
...
@@ -405,9 +411,9 @@ func (s *GenericAPIServer) newAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupV
Typer
:
apiGroupInfo
.
Scheme
,
Typer
:
apiGroupInfo
.
Scheme
,
Linker
:
runtime
.
SelfLinker
(
meta
.
NewAccessor
()),
Linker
:
runtime
.
SelfLinker
(
meta
.
NewAccessor
()),
Admit
:
s
.
admissionControl
,
Admit
:
s
.
admissionControl
,
MinRequestTimeout
:
s
.
minRequestTimeout
,
MinRequestTimeout
:
s
.
minRequestTimeout
,
Authorizer
:
s
.
Authorizer
,
Authorizer
:
s
.
Authorizer
,
}
}
}
}
...
...
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