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
4c3ec907
Unverified
Commit
4c3ec907
authored
Sep 04, 2020
by
Brian Downs
Committed by
GitHub
Sep 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove k8s daemon config from setup hook in favor of specific fields from the config (#2206)
Signed-off-by:
Brian Downs
<
brian.downs@gmail.com
>
parent
289ba8df
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
server.go
pkg/cli/cmds/server.go
+1
-2
server.go
pkg/server/server.go
+1
-1
types.go
pkg/server/types.go
+1
-1
No files found.
pkg/cli/cmds/server.go
View file @
4c3ec907
...
@@ -3,7 +3,6 @@ package cmds
...
@@ -3,7 +3,6 @@ package cmds
import
(
import
(
"context"
"context"
"github.com/rancher/k3s/pkg/daemons/config"
"github.com/rancher/k3s/pkg/version"
"github.com/rancher/k3s/pkg/version"
"github.com/urfave/cli"
"github.com/urfave/cli"
)
)
...
@@ -60,7 +59,7 @@ type Server struct {
...
@@ -60,7 +59,7 @@ type Server struct {
ClusterReset
bool
ClusterReset
bool
ClusterResetRestorePath
string
ClusterResetRestorePath
string
EncryptSecrets
bool
EncryptSecrets
bool
StartupHooks
[]
func
(
context
.
Context
,
config
.
Control
)
error
StartupHooks
[]
func
(
context
.
Context
,
<-
chan
struct
{},
string
)
error
EtcdDisableSnapshots
bool
EtcdDisableSnapshots
bool
EtcdSnapshotDir
string
EtcdSnapshotDir
string
EtcdSnapshotCron
string
EtcdSnapshotCron
string
...
...
pkg/server/server.go
View file @
4c3ec907
...
@@ -61,7 +61,7 @@ func StartServer(ctx context.Context, config *Config) error {
...
@@ -61,7 +61,7 @@ func StartServer(ctx context.Context, config *Config) error {
}
}
for
_
,
hook
:=
range
config
.
StartupHooks
{
for
_
,
hook
:=
range
config
.
StartupHooks
{
if
err
:=
hook
(
ctx
,
config
.
ControlConfig
);
err
!=
nil
{
if
err
:=
hook
(
ctx
,
config
.
ControlConfig
.
Runtime
.
APIServerReady
,
config
.
ControlConfig
.
Runtime
.
KubeConfigAdmin
);
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"startup hook"
)
return
errors
.
Wrap
(
err
,
"startup hook"
)
}
}
}
}
...
...
pkg/server/types.go
View file @
4c3ec907
...
@@ -12,5 +12,5 @@ type Config struct {
...
@@ -12,5 +12,5 @@ type Config struct {
ControlConfig
config
.
Control
ControlConfig
config
.
Control
Rootless
bool
Rootless
bool
SupervisorPort
int
SupervisorPort
int
StartupHooks
[]
func
(
context
.
Context
,
config
.
Control
)
error
StartupHooks
[]
func
(
context
.
Context
,
<-
chan
struct
{},
string
)
error
}
}
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