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
1b929bd4
Commit
1b929bd4
authored
Oct 29, 2016
by
Madhusudan.C.S
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Federation][init-03] Print the federation API server address on success.
parent
32bc46a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
init.go
federation/pkg/kubefed/init/init.go
+10
-1
No files found.
federation/pkg/kubefed/init/init.go
View file @
1b929bd4
...
...
@@ -15,6 +15,7 @@ limitations under the License.
*/
// TODO(madhusdancs):
// 1. Make printSuccess prepend protocol/scheme to the IPs/hostnames.
// 1. Add a dry-run support.
// 2. Make all the API object names customizable.
// Ex: federation-apiserver, federation-controller-manager, etc.
...
...
@@ -31,6 +32,7 @@ package init
import
(
"fmt"
"io"
"strings"
"time"
kubeadmutil
"k8s.io/kubernetes/cmd/kubeadm/app/util"
...
...
@@ -197,7 +199,8 @@ func initFederation(cmdOut io.Writer, config util.AdminConfig, cmd *cobra.Comman
if
err
!=
nil
{
return
err
}
return
nil
return
printSuccess
(
cmdOut
,
ips
,
hostnames
)
}
func
createNamespace
(
clientset
*
client
.
Clientset
,
namespace
string
)
(
*
api
.
Namespace
,
error
)
{
...
...
@@ -515,3 +518,9 @@ func createControllerManager(clientset *client.Clientset, namespace, name, kubec
return
clientset
.
Extensions
()
.
Deployments
(
namespace
)
.
Create
(
dep
)
}
func
printSuccess
(
cmdOut
io
.
Writer
,
ips
,
hostnames
[]
string
)
error
{
svcEndpoints
:=
append
(
ips
,
hostnames
...
)
_
,
err
:=
fmt
.
Fprintf
(
cmdOut
,
"Federation API server is running at: %s
\n
"
,
strings
.
Join
(
svcEndpoints
,
", "
))
return
err
}
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