apiVersion: v1
kind: Route
metadata:
{% if annotations is defined %}
  annotations:
    {{ annotations | to_nice_yaml | indent(4) }}
{% endif %}
  name: {{ routename }}
  labels:
    app: {{ app }}
spec:
{% if host is defined %}
  host: {{ host }}
{% endif %}
  port:
    targetPort: {{ serviceport }}
  to:
    kind: Service
    name: {{ servicename }}
  tls:
    termination: edge
    insecureEdgeTerminationPolicy: Redirect
