apiVersion: v1
kind: ConfigMap
metadata:
  name: config-network
  namespace: knative-serving
data:
  # Use Kourier for the networking layer
  ingress.class: kourier.ingress.networking.knative.dev
  # Enable AutoTLS
  autoTLS: Enabled
  # Redirect HTTP requests to HTTPS
  httpProtocol: Redirected
  # If there exists an annotation `func.subdomain` on the service,
  # use it instead of the default name.namespace
  domainTemplate: |-
    {{if index .Annotations "func.subdomain" -}}
      {{- index .Annotations "func.subdomain" -}}
    {{else -}}
      {{- .Name}}.{{.Namespace -}}
    {{end -}}
    .{{.Domain}}
