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
36f19f77
Commit
36f19f77
authored
Feb 21, 2015
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add PortalIP to Service describe
parent
86a0193f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
describe.go
pkg/kubectl/describe.go
+6
-0
resource_printer.go
pkg/kubectl/resource_printer.go
+1
-1
No files found.
pkg/kubectl/describe.go
View file @
36f19f77
...
@@ -268,8 +268,14 @@ func (d *ServiceDescriber) Describe(namespace, name string) (string, error) {
...
@@ -268,8 +268,14 @@ func (d *ServiceDescriber) Describe(namespace, name string) (string, error) {
fmt
.
Fprintf
(
out
,
"Name:
\t
%s
\n
"
,
service
.
Name
)
fmt
.
Fprintf
(
out
,
"Name:
\t
%s
\n
"
,
service
.
Name
)
fmt
.
Fprintf
(
out
,
"Labels:
\t
%s
\n
"
,
formatLabels
(
service
.
Labels
))
fmt
.
Fprintf
(
out
,
"Labels:
\t
%s
\n
"
,
formatLabels
(
service
.
Labels
))
fmt
.
Fprintf
(
out
,
"Selector:
\t
%s
\n
"
,
formatLabels
(
service
.
Spec
.
Selector
))
fmt
.
Fprintf
(
out
,
"Selector:
\t
%s
\n
"
,
formatLabels
(
service
.
Spec
.
Selector
))
fmt
.
Fprintf
(
out
,
"IP:
\t
%s
\n
"
,
service
.
Spec
.
PortalIP
)
if
len
(
service
.
Spec
.
PublicIPs
)
>
0
{
list
:=
strings
.
Join
(
service
.
Spec
.
PublicIPs
,
", "
)
fmt
.
Fprintf
(
out
,
"Public IPs:
\t
%s
\n
"
,
list
)
}
fmt
.
Fprintf
(
out
,
"Port:
\t
%d
\n
"
,
service
.
Spec
.
Port
)
fmt
.
Fprintf
(
out
,
"Port:
\t
%d
\n
"
,
service
.
Spec
.
Port
)
fmt
.
Fprintf
(
out
,
"Endpoints:
\t
%s
\n
"
,
formatEndpoints
(
endpoints
.
Endpoints
))
fmt
.
Fprintf
(
out
,
"Endpoints:
\t
%s
\n
"
,
formatEndpoints
(
endpoints
.
Endpoints
))
fmt
.
Fprintf
(
out
,
"Session Affinity:
\t
%s
\n
"
,
service
.
Spec
.
SessionAffinity
)
if
events
!=
nil
{
if
events
!=
nil
{
describeEvents
(
events
,
out
)
describeEvents
(
events
,
out
)
}
}
...
...
pkg/kubectl/resource_printer.go
View file @
36f19f77
...
@@ -267,7 +267,7 @@ func (h *HumanReadablePrinter) printHeader(columnNames []string, w io.Writer) er
...
@@ -267,7 +267,7 @@ func (h *HumanReadablePrinter) printHeader(columnNames []string, w io.Writer) er
func
formatEndpoints
(
endpoints
[]
api
.
Endpoint
)
string
{
func
formatEndpoints
(
endpoints
[]
api
.
Endpoint
)
string
{
if
len
(
endpoints
)
==
0
{
if
len
(
endpoints
)
==
0
{
return
"<
empty
>"
return
"<
none
>"
}
}
list
:=
[]
string
{}
list
:=
[]
string
{}
for
i
:=
range
endpoints
{
for
i
:=
range
endpoints
{
...
...
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