mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Add NodeName to EndpointAddress object
This commit is contained in:
parent
ceb75699dd
commit
c60ba61fe7
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"`
|
||||||
}
|
}
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user