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
56d83077
Commit
56d83077
authored
Sep 12, 2017
by
fabriziopandini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Kubeadm phase addon
parent
108ee220
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
addons.go
cmd/kubeadm/app/cmd/phases/addons.go
+2
-3
No files found.
cmd/kubeadm/app/cmd/phases/addons.go
View file @
56d83077
...
...
@@ -99,7 +99,7 @@ func getAddonsSubCommands() []*cobra.Command {
cmd
:=
&
cobra
.
Command
{
Use
:
properties
.
use
,
Short
:
properties
.
short
,
Run
:
runAddonsCmdFunc
(
properties
.
cmdFunc
,
cfg
,
cfgPath
),
Run
:
runAddonsCmdFunc
(
properties
.
cmdFunc
,
cfg
,
kubeConfigFile
,
cfgPath
),
}
// Add flags to the command
...
...
@@ -124,7 +124,7 @@ func getAddonsSubCommands() []*cobra.Command {
}
// runAddonsCmdFunc creates a cobra.Command Run function, by composing the call to the given cmdFunc with necessary additional steps (e.g preparation of input parameters)
func
runAddonsCmdFunc
(
cmdFunc
func
(
cfg
*
kubeadmapi
.
MasterConfiguration
,
client
clientset
.
Interface
)
error
,
cfg
*
kubeadmapiext
.
MasterConfiguration
,
cfgPath
string
)
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
func
runAddonsCmdFunc
(
cmdFunc
func
(
cfg
*
kubeadmapi
.
MasterConfiguration
,
client
clientset
.
Interface
)
error
,
cfg
*
kubeadmapiext
.
MasterConfiguration
,
kubeConfigFile
string
,
cfgPath
string
)
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
// the following statement build a clousure that wraps a call to a cmdFunc, binding
// the function itself with the specific parameters of each sub command.
...
...
@@ -136,7 +136,6 @@ func runAddonsCmdFunc(cmdFunc func(cfg *kubeadmapi.MasterConfiguration, client c
kubeadmutil
.
CheckErr
(
err
)
}
var
kubeConfigFile
string
internalcfg
:=
&
kubeadmapi
.
MasterConfiguration
{}
api
.
Scheme
.
Convert
(
cfg
,
internalcfg
,
nil
)
client
,
err
:=
kubeconfigutil
.
ClientSetFromFile
(
kubeConfigFile
)
...
...
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