I'd like to setup a route that will pass both 80 and 443 traffic to the same service in OpenShift. When I try to create a second route it errors out. I want this to be in a yaml like would be used with oc create -f route.yaml
so I can submit it to our IaC code repo.
-
Could you add the logging?– 030Mar 14, 2020 at 10:11
1 Answer
You'll want to be sure your spec.tls section has the following two items to tell the router you want both secure and insecure traffic allowed in the edge.
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: my-app-ui
namespace: my-namespace
spec:
host: my-host
port:
targetPort: http
tls:
insecureEdgeTerminationPolicy: Allow
termination: edge
to:
kind: Service
name: my-app-ui
weight: 100
wildcardPolicy: None