-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add DomainMapping docs #3017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DomainMapping docs #3017
Conversation
You meant to say v0.19 ? |
|
||
If the Domain Mapping feature is installed, you can serve | ||
custom domains backed by Knative Services. For example, if you | ||
own the "MyDomain.com" domain name, you can point DNS at your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe using lower case is better “mydomain.com”
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d'oh, thanks, fixed
I did. And as one of the release managers for 0.19: oops 😂 . |
type: "docs" | ||
--- | ||
|
||
If the Domain Mapping feature is installed, you can serve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence sounds like the user needs to install an optional components when installing knative..
Is this true or you mean that user use a knative 0.19+ that contains this CRD and that the state of the feature is alpha and we want feedback early
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the user does need to install an additional component -- it's not installed by default in this release (there's an extra yaml file, much like installing the monitoring bundle or HPA autoscaler). I'll PR an update to install docs separately with that optional step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a reference and link here you don’t have to put the actual steps here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will when I've added that step to the docs :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add to this doc the limitations, that not all net ingress support this feature, you can list them here, or mention in the install doc and point there from here.
apiVersion: serving.knative.dev/v1alpha1 | ||
kind: DomainMapping | ||
metadata: | ||
name: mydomain.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a spec.domain field? Because I would be very disappointed if the actual domain value is the name of the CR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's intentionally the name of the DM to prevent collisions. Here's one of the conversations in the design doc where we decided this: https://docs.google.com/document/d/1yXSuKpQqZM5tczBFpPG8TGQoWSkvmoA17nPwDd1UxEI/edit?disco=AAAAG2yt488.
To create a mapping from a custom domain to a Knative Service, you need to | ||
create a YAML file that defines a Domain Mapping. | ||
This YAML file specifies the domain name to map and the Knative Service to use | ||
to service requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put some reference to the example “mydomain.com” explain if using this value would cover all sub domains ? *.mydomain.com or it needs to a specific domain ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added an extra para here, ptal
metadata: | ||
name: mydomain.com | ||
namespace: default | ||
spec: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spec.domain missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, see above
linkTitle: "Creating Domain Mappings (Alpha)" | ||
weight: 64 | ||
type: "docs" | ||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intro needs some use case if not would very confusing for the end user on why she would need this feature.
You can put something like
knative by default offeres a comfigmap “config-domain” in the control plane namespace (Ie knative-serving”) that allow an admin with write access to the namespace edit the comfigmap to configure domain names including a selector to be use which services corresponds to a domain name..
But in some cases the admin would not want this ConfigMap to be edited and would prefer users to define the domain name mapping to be fine by users in the namespace where the knative service is deploy.
This feature would allow to define the mapping in their namespace by creating a Kubernetes resource DomainMapping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just "Knative Services are automatically given a default domain name based on the cluster configuration. You can also map a single custom domain name that you own to a specific Knative Service using the Domain Mapping feature."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
/hold so I can link to the install instructions in the first sentence (once I PR that step to them :)). |
@julz is this one ready for docs review / merge? |
Question: is this related to #1964? Might it close that issue? |
/unhold should be ready for review now @abrennan89 |
I think it might @abrennan89. This documents the feature that - iiuc - @ahmetb was expecting the other doc to be about. Hopefully @ahmetb can confirm if so |
Correct. That issue asks for this PR. |
## Before you begin | ||
|
||
1. You need to enable the DomainMapping feature (and a supported Knative | ||
Ingress implementation) to use it. See [the Install instructions](../install/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where on that page should people look? I didn't see anything covering this topic. Perhaps we could point to the exact page of interest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julz It seems mydomain.com is already used by some organization in the real world so should we change the example domain like mydomain.example.org which is listed in RFC2606 - 3. Reserved Example Second Level Domain Names?
oops - thanks @nak3, will update! |
Ready for another look @abrennan89 @nak3 |
/lgtm |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: csantanapr, julz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
/cherrypick release-0.20 |
@nak3: new pull request created: #3183 In response to this:
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. |
/cherrypick release-0.19 |
@nak3: new pull request created: #3184 In response to this:
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. |
* Add DomainMapping docs * x * My oh my * Add paragraph about wildcard (lack of) behaviour * Update description and link to install docs * Update link, use example.org domain, and elaborate contract for Ref
Documents the DomainMapping feature which will be added in alpha in v0.19.
This probably needs lots of work @abrennan89 @mpetason, but opening as a first version, anyway.
In particular looking for guidance on how best to call out that this is an Alpha feature etc.