Uploaded image for project: 'Knative Serving'
  1. Knative Serving
  2. SRVKS-984

[DOC] Configuring domain names based on labels

XMLWordPrintable

      Routers are discussed here: https://cloud.redhat.com/blog/openshift-router-sharding-for-production-and-development-traffic

      Users need to be able to change a domain like:

      svl-poc-serverless-poc-dev.apps.nopro.ocp.customername.net to

      svl-poc-serverless-poc-dev.dev.nopro.ocp.customername.net in order to use the "dev" or some other router.

      Solutions:

      a) Use a custom domain. You can configure the domain in KativeServing CR like

      spec:
        config:
          domain:
            dev.nopro.ocp.customername.net: |
              selector:
                router: dev
            prod.nopro.ocp.customername.net: |
              selector:
                router: prod
      
      

      Then, the Ksvc which has the label "router: dev" can have the domain as <serice name>-<service namespace>.dev.nopro.ocp.customername.net.

      The label "router: dev" needs to be propagated to the OCP route. For adding the label to the OpenShift Route, you can add it to your Knative service, then the label is propagated into the OpenShift Route.

      b) Use DomainMapping rather than the custom domain. Regarding the OCP route label that needs to be propagated you can still add the label into DomainMapping and the label is also propagted into the OpenShift Route.

       

      DRAFT DOCS: https://openshift-knative.github.io/docs/docs/latest/serverless/serving/serving-with-ingress-sharding.html

      Related discussion: https://mail.google.com/chat/u/0/#chat/space/AAAAv98Y644/pRY12C0WMBs

      cc rhn-support-knakayam

              msvistun@redhat.com Maxim Svistunov
              skontopo@redhat.com Stavros Kontopoulos (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: