Skip to content
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

Make (cluster-local) DNS work out of the box by default. #1687

Closed
wants to merge 1 commit into from

Conversation

tcnghia
Copy link
Contributor

@tcnghia tcnghia commented Jul 25, 2018

Originally proposed by @evankanderson in #1609. Related to #1598

Proposed Changes

  • Change the default out-of-the-box domain to svc.cluster.local, which:
    1. Documents that the name only works locally until the cluster is further configured.
    2. Makes spec.domain be a DNS-resolvable name by default, in case we want to implement Consider having Route not become Ready until DNS resolves #1598
  • Change the k8s Service created as the public route endpoint to be an ExternalName to the knative gateway in the ingress. This makes pods launched without the istio sidecar still able to call knative. (Tested by hand.)
  • Fix a bug in managing the VirtualService where the same domain could be added to the VirtualService twice if the cluster's domain suffix were set to svc.cluster.local. This causes Istio to fail internal configuration propagation checks and route updates to not be applied.
  • Fix a bug in the VirtualService where match headers are added twice when suffix is svc.cluster.local.

Release Note

Change the default out-of-the-box domain to `svc.cluster.local`, to provide local no-DNS-setup installation of knative/serving.
Changes the route.ns.svc.cluster.local DNS name to point to the istio ingress to enable non-instio-injected pods to call knative.

@google-prow-robot google-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 25, 2018
@tcnghia
Copy link
Contributor Author

tcnghia commented Jul 25, 2018

/cc @evankanderson

Port: PortNumber,
}},
Type: corev1.ServiceTypeExternalName,
ExternalName: "knative-ingressgateway.istio-system.svc.cluster.local",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer using K8sGatewayServiceFullname here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@tcnghia tcnghia force-pushed the domain-local branch 2 times, most recently from 62ac6ac to 68d9d9a Compare August 2, 2018 00:29
@google-prow-robot google-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 2, 2018
@tcnghia
Copy link
Contributor Author

tcnghia commented Aug 2, 2018

@ZhiminXiang PTAL

Assign @mattmoor for approval
/assign @mattmoor

@tcnghia
Copy link
Contributor Author

tcnghia commented Aug 2, 2018

/test pull-knative-serving-unit-tests

@ZhiminXiang
Copy link

/lgtm
/approve

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 2, 2018
This keeps existing behavior with `cluster.local` domain, but allow
Pods without sidecar to access the same.
@google-prow-robot
Copy link

New changes are detected. LGTM label has been removed.

@google-prow-robot google-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 3, 2018
@tcnghia tcnghia closed this Aug 3, 2018
@google-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tcnghia, ZhiminXiang

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-prow-robot google-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2018
@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to run the coverage report again

File Old Coverage New Coverage Delta
pkg/reconciler/v1alpha1/route/resources/service.go Do not exist 100.0%
pkg/reconciler/v1alpha1/route/resources/names/names.go Do not exist 100.0%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants