The following example demonstrates a Gateway CR with two listeners, one for HTTP and one for HTTPS. For detailed descriptions of the listener fields, see Gateway listener configuration reference.
kind: Gateway
apiVersion: gateway.networking.k8s.io/v1
metadata:
name: <example_gateway>
namespace: openshift-ingress
spec:
gatewayClassName: openshift-default
listeners:
- protocol: HTTP
port: 80
name: http
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
env: "dev"
- protocol: HTTPS
port: 443
name: https
hostname: "*.<example_domain.tld>"
tls:
mode: Terminate
certificateRefs:
- name: <listener_cert>
kind: Secret
allowedRoutes:
namespaces:
from: All