Serving: Support Vanity Domains

Created on 13 Jun 2018  路  17Comments  路  Source: knative/serving

/area networking
/kind dev

Expected Behavior

Knative defaults to default namespace in addition to the current ingress host name mappings.

primer-ingress   primer.default.thingz.io,*.primer.default.thingz.io,*.primer.thingz.io   35.203.180.104... 

Actual Behavior

Knative prepends namespace name to all hosts in ingress

arenetworking enhancement kinfeature

Most helpful comment

Update: I wrote a blog post explaining the motivation & the domainTemplate-based solution:
https://bsideup.github.io/posts/knative_custom_domains/

FYI I am also open to contribute it as a default domainTemplate if you decide that this approach is good enough.

All 17 comments

I don't quite understand what's expected here.

/assign @tcnghia for networking as well.

That aside, I believe the namespace default you are seeing is the namespace given to the Route. If we create a Route in a different namespace it will show in the domain name.

The domain name format is {route-name}.{route-ns}.{domain-suffix}, in which the first two parts come from the Route and the last part comes from a cluster-wide config map that allows specifying different domain suffices (https://github.com/knative/serving/blob/master/install/CONFIG.md).

@tcnghia @ZhiminXiang we should think about whether we need additional CRDs as part of our public API surface for this soon.

@mattmoor we've built some CRDs for routing to boost this functionality and would love to help fill out a requirements doc.

Issues go stale after 90 days of inactivity.
Mark the issue as fresh by adding the comment /remove-lifecycle stale.
Stale issues rot after an additional 30 days of inactivity and eventually close.
If this issue is safe to close now please do so by adding the comment /close.

Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

/lifecycle stale

Stale issues rot after 30 days of inactivity.
Mark the issue as fresh by adding the comment /remove-lifecycle rotten.
Rotten issues close after an additional 30 days of inactivity.
If this issue is safe to close now please do so by adding the comment /close.

Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

/lifecycle rotten

/lifecycle rotten

This would actually be a great feature to start running through our process for expanding the networking abstractions that @tcnghia is putting together. This isn't really a "good first issue", but I think it probably is a "good first project" for some of our budding community members that have gotten some changes under their belt. I'd be happy to help someone navigate the waters (process) here, if they are up for undertaking this.

Just to level set on my (rough) expectations of work involved:

  • KIngress needs to support Host rewrites, and we need KIngress conformance tests that the various implementations are encouraged to adopt (per the principles @tcnghia is working on),
  • I think we need a new CRD for associating a "vanity" domain with an Addressable, which means figuring out an Alpha/Beta/GA plan, including testing, documentation, auto-TLS support (talk to @ZhiminXiang), and engaging with the CLI team on integration.

We will need to discuss all of this because I think some folks will find another CRD contentious (vs. just adding to spec or an annotation), but I think we can "have our cake and eat it too" if we also decide to shoot for a bonus task of auto-trigger-like integration (Hi @n3wscott ), where annotated Addressables automatically have a CRD generated for the vanity Domain.

cc @duglin who I know is interested in this.

Here's an important note when implementing this: https://github.com/knative/serving/issues/4029

Rotten issues close after 30 days of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh by adding the comment /remove-lifecycle rotten.

Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

/close

@knative-housekeeping-robot: Closing this issue.

In response to this:

Rotten issues close after 30 days of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh by adding the comment /remove-lifecycle rotten.

Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/reopen
/remove-lifecycle rotten

@mattmoor: Reopened this issue.

In response to this:

/reopen
/remove-lifecycle rotten

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

I would also be interested in configuring api.example.com domain that points to "example-api" Knative service in "default" namespace (currently it is mapped to "example-api.default.example.com")

For now, hacked with the following:

domainTemplate: '{{if index .Annotations "subdomain"}}{{ index .Annotations "subdomain"}}{{else}}{{.Name}}.{{.Namespace}}{{end}}.{{.Domain}}'

Update: I wrote a blog post explaining the motivation & the domainTemplate-based solution:
https://bsideup.github.io/posts/knative_custom_domains/

FYI I am also open to contribute it as a default domainTemplate if you decide that this approach is good enough.

Added in the docs :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexnederlof picture alexnederlof  路  5Comments

vagababov picture vagababov  路  3Comments

ahmetb picture ahmetb  路  5Comments

ysjjovo picture ysjjovo  路  5Comments

josephburnett picture josephburnett  路  6Comments