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
8a7709de
Commit
8a7709de
authored
Aug 14, 2017
by
Irfan Ur Rehman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Federation] Kubefed doc fix
parent
7477e184
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
kubefed.go
federation/pkg/kubefed/kubefed.go
+16
-2
No files found.
federation/pkg/kubefed/kubefed.go
View file @
8a7709de
...
...
@@ -26,10 +26,20 @@ import (
kubectl
"k8s.io/kubernetes/pkg/kubectl/cmd"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/util/i18n"
"github.com/spf13/cobra"
)
var
(
kubefedVersionExample
=
templates
.
Examples
(
i18n
.
T
(
`
# Print the client and server versions for the current context
kubefed version`
))
kubefedOptionsExample
=
templates
.
Examples
(
i18n
.
T
(
`
# Print flags inherited by all commands
kubefed options`
))
)
// NewKubeFedCommand creates the `kubefed` command and its nested children.
func
NewKubeFedCommand
(
f
cmdutil
.
Factory
,
in
io
.
Reader
,
out
,
err
io
.
Writer
,
defaultServerImage
,
defaultEtcdImage
string
)
*
cobra
.
Command
{
// Parent command to which all subcommands are added.
...
...
@@ -66,8 +76,12 @@ func NewKubeFedCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer, defa
}
templates
.
ActsAsRootCommand
(
cmds
,
filters
,
groups
...
)
cmds
.
AddCommand
(
kubectl
.
NewCmdVersion
(
f
,
out
))
cmds
.
AddCommand
(
kubectl
.
NewCmdOptions
(
out
))
cmdVersion
:=
kubectl
.
NewCmdVersion
(
f
,
out
)
cmdVersion
.
Example
=
kubefedVersionExample
cmds
.
AddCommand
(
cmdVersion
)
cmdOptions
:=
kubectl
.
NewCmdOptions
(
out
)
cmdOptions
.
Example
=
kubefedOptionsExample
cmds
.
AddCommand
(
cmdOptions
)
return
cmds
}
...
...
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