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
c60ba61f
Commit
c60ba61f
authored
Aug 11, 2016
by
Girish Kalele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add NodeName to EndpointAddress object
parent
ceb75699
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
types.go
pkg/api/types.go
+2
-0
types.go
pkg/api/v1/types.go
+2
-0
endpoints_controller.go
pkg/controller/endpoint/endpoints_controller.go
+2
-1
No files found.
pkg/api/types.go
View file @
c60ba61f
...
@@ -1889,6 +1889,8 @@ type EndpointAddress struct {
...
@@ -1889,6 +1889,8 @@ type EndpointAddress struct {
// Optional: Hostname of this endpoint
// Optional: Hostname of this endpoint
// Meant to be used by DNS servers etc.
// Meant to be used by DNS servers etc.
Hostname
string
`json:"hostname,omitempty"`
Hostname
string
`json:"hostname,omitempty"`
// Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
NodeName
*
string
`json:"nodeName,omitempty"`
// Optional: The kubernetes object related to the entry point.
// Optional: The kubernetes object related to the entry point.
TargetRef
*
ObjectReference
TargetRef
*
ObjectReference
}
}
...
...
pkg/api/v1/types.go
View file @
c60ba61f
...
@@ -2279,6 +2279,8 @@ type EndpointAddress struct {
...
@@ -2279,6 +2279,8 @@ type EndpointAddress struct {
IP
string
`json:"ip" protobuf:"bytes,1,opt,name=ip"`
IP
string
`json:"ip" protobuf:"bytes,1,opt,name=ip"`
// The Hostname of this endpoint
// The Hostname of this endpoint
Hostname
string
`json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"`
Hostname
string
`json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"`
// Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
NodeName
*
string
`json:"nodeName,omitempty" protobuf:"bytes,4,opt,name=nodeName"`
// Reference to object providing the endpoint.
// Reference to object providing the endpoint.
TargetRef
*
ObjectReference
`json:"targetRef,omitempty" protobuf:"bytes,2,opt,name=targetRef"`
TargetRef
*
ObjectReference
`json:"targetRef,omitempty" protobuf:"bytes,2,opt,name=targetRef"`
}
}
...
...
pkg/controller/endpoint/endpoints_controller.go
View file @
c60ba61f
...
@@ -404,7 +404,8 @@ func (e *EndpointController) syncService(key string) {
...
@@ -404,7 +404,8 @@ func (e *EndpointController) syncService(key string) {
epp
:=
api
.
EndpointPort
{
Name
:
portName
,
Port
:
int32
(
portNum
),
Protocol
:
portProto
}
epp
:=
api
.
EndpointPort
{
Name
:
portName
,
Port
:
int32
(
portNum
),
Protocol
:
portProto
}
epa
:=
api
.
EndpointAddress
{
epa
:=
api
.
EndpointAddress
{
IP
:
pod
.
Status
.
PodIP
,
IP
:
pod
.
Status
.
PodIP
,
NodeName
:
pod
.
Spec
.
NodeName
,
TargetRef
:
&
api
.
ObjectReference
{
TargetRef
:
&
api
.
ObjectReference
{
Kind
:
"Pod"
,
Kind
:
"Pod"
,
Namespace
:
pod
.
ObjectMeta
.
Namespace
,
Namespace
:
pod
.
ObjectMeta
.
Namespace
,
...
...
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