Skip to content

Commit fb8212f

Browse files
committed
Fix HTTPS edge route
Issue: Every other http POST request failed with 404 and error message "Client sent an HTTP request to an HTTPS server". Root Cause: There are 2 ports present in hw-event-proxy-service, http port 9087 and https port 8443. When a POST request arrives, HAProxy does round robin between the two endpoints. The one landed on port 8443 caused the error message. Solution: Removed the extra https port in hw-event-proxy-service. Add targetPort:9087 in the edge route to prevent issues from happending in the future if more ports were added. Add annotation to disable cookie as it is not really used in webhook. Signed-off-by: Jack Ding <[email protected]>
1 parent 6ad6e19 commit fb8212f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

manifests/base/route.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: route.openshift.io/v1
22

33
kind: Route
44
metadata:
5+
annotations:
6+
haproxy.router.openshift.io/disable_cookies: true
57
name: hw-event-proxy
68
namespace: cloud-native-events
79
spec:
@@ -10,3 +12,5 @@ spec:
1012
name: hw-event-proxy-service
1113
tls:
1214
termination: edge
15+
port:
16+
targetPort: 9087

manifests/base/service.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ spec:
1313
- name: hw-event
1414
port: 9087
1515
targetPort: 9087
16-
- name: https
17-
port: 8443
18-
targetPort: https
1916
selector:
2017
app: hw-event-proxy
2118
type: ClusterIP

0 commit comments

Comments
 (0)