diff --git a/internal/ingress/types_equals.go b/internal/ingress/types_equals.go index c179426b4..8e19f0881 100644 --- a/internal/ingress/types_equals.go +++ b/internal/ingress/types_equals.go @@ -524,6 +524,9 @@ func (l4b1 *L4Backend) Equal(l4b2 *L4Backend) bool { if l4b1.Protocol != l4b2.Protocol { return false } + if l4b1.ProxyProtocol != l4b2.ProxyProtocol { + return false + } return true } diff --git a/internal/ingress/types_equals_test.go b/internal/ingress/types_equals_test.go index 8a078b6ae..273a4acdd 100644 --- a/internal/ingress/types_equals_test.go +++ b/internal/ingress/types_equals_test.go @@ -94,6 +94,24 @@ func TestL4ServiceElementsMatch(t *testing.T) { {Port: 80, Endpoints: []Endpoint{{Address: "1.1.1.2"}, {Address: "1.1.1.1"}}}}, true, }, + { + []L4Service{ + {Port: 80, Backend: L4Backend{Name: "test", Namespace: "default", Protocol: "TCP", ProxyProtocol: ProxyProtocol{Decode: false, Encode: false}}}, + }, + []L4Service{ + {Port: 80, Backend: L4Backend{Name: "test", Namespace: "default", Protocol: "TCP", ProxyProtocol: ProxyProtocol{Decode: false, Encode: false}}}, + }, + true, + }, + { + []L4Service{ + {Port: 80, Backend: L4Backend{Name: "test", Namespace: "default", Protocol: "TCP", ProxyProtocol: ProxyProtocol{Decode: false, Encode: false}}}, + }, + []L4Service{ + {Port: 80, Backend: L4Backend{Name: "test", Namespace: "default", Protocol: "TCP", ProxyProtocol: ProxyProtocol{Decode: false, Encode: true}}}, + }, + false, + }, } for _, testCase := range testCases {