Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return reference to object providing Endpoint #1043

Merged
merged 1 commit into from
Aug 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/pkg/ingress/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,7 @@ func (ic *GenericController) getEndpoints(
Port: fmt.Sprintf("%v", targetPort),
MaxFails: hz.MaxFails,
FailTimeout: hz.FailTimeout,
Target: epAddress.TargetRef,
}
upsServers = append(upsServers, ups)
adus[ep] = true
Expand Down
2 changes: 2 additions & 0 deletions core/pkg/ingress/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ type Endpoint struct {
// of unsuccessful attempts to communicate with the server should happen
// to consider the endpoint unavailable
FailTimeout int `json:"failTimeout"`
// Target returns a reference to the object providing the endpoint
Target *api.ObjectReference `json:"target"`
}

// Server describes a website
Expand Down
3 changes: 3 additions & 0 deletions core/pkg/ingress/types_equals.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ func (e1 *Endpoint) Equal(e2 *Endpoint) bool {
if e1.FailTimeout != e2.FailTimeout {
return false
}
if e1.Target != e2.Target {
return false
}

return true
}
Expand Down