Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@esbie
Copy link
Contributor

@esbie esbie commented Aug 24, 2017

Default backends are now only applied after searching through all ingress resources for available matches. Ports in the host header field are now stripped.

Fixes #1553
Fixes #1566

@esbie esbie self-assigned this Aug 24, 2017
val matchingPath = IngressCache.getMatchingPath(Some("unknown host"), "/path", Seq(resource1, resource2))
assert(matchingPath.get.svc == "fallback")
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we consider the case where no default backend exists?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! I will add a test

.flatMap(_.getMatchingPath(hostHeader, requestPath))
.flatMap(fn(_))
.take(1)
.toSeq.headOption
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I might be missing something, but is this basically the same as Iterator#find()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with you, not sure why I'm tiptoeing around toIterator like a sacred cow

Copy link
Contributor Author

@esbie esbie Aug 25, 2017

Choose a reason for hiding this comment

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

Oh figured it out, we need to return the path that matches, not the whole matching spec. We could do it in 2 phases, but we'd like to be as efficient as possible on the request path.

Copy link
Member

@adleong adleong left a comment

Choose a reason for hiding this comment

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

⭐ Je pense que c'est bien


def matchPath(hostHeader: Option[String], requestPath: String): Future[Option[IngressPath]] =
def matchPath(hostHeader: Option[String], requestPath: String): Future[Option[IngressPath]] = {
val hostHeaderSansPort = hostHeader.map {
Copy link
Member

Choose a reason for hiding this comment

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

Peut-être "without" au lieu de "sans"

Copy link
Contributor

@hawkw hawkw Aug 28, 2017

Choose a reason for hiding this comment

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

:) 🇫🇷

@esbie esbie merged commit 83b10c3 into master Aug 28, 2017
@esbie esbie deleted the esbie/ingress-mini-fixes branch August 28, 2017 19:36
hawkw pushed a commit that referenced this pull request Aug 31, 2017
* Update default backend behavior and strip host ports

* add no matches ingress cache test
@hawkw hawkw mentioned this pull request Aug 31, 2017
hawkw added a commit that referenced this pull request Aug 31, 2017
+ Kubernetes
  - Update default backend behavior and strip host ports (#1607)
+ H2
  - Ensure frames are released after classification timeout (#1598)
  - Fix memory leak in long-running H2 streams (#1613)
pcalcado pushed a commit that referenced this pull request Sep 6, 2017
+ Kubernetes
  - Update default backend behavior and strip host ports (#1607)
+ H2
  - Ensure frames are released after classification timeout (#1598)
  - Fix memory leak in long-running H2 streams (#1613)
@hawkw hawkw mentioned this pull request Sep 7, 2017
hawkw added a commit that referenced this pull request Sep 7, 2017
## 1.2.0 2017-09-07

* **Breaking Change**: `io.l5d.mesh`, `io.l5d.thriftNameInterpreter`, linkerd
  admin, and namerd admin now serve on 127.0.0.1 by default (instead of
  0.0.0.0).
* **Breaking Change**: Removed support for PKCS#1-formatted keys. PKCS#1 formatted keys must be converted to PKCS#8 format.
* Added experimental `io.l5d.dnssrv` namer for DNS SRV records (#1611)
* Kubernetes
  * Added an experimental `io.l5d.k8s.configMap` interpreter for reading dtabs from a Kubernetes ConfigMap (#1603). This interpreter will respond to changes in the ConfigMap, allowing for dynamic dtab updates without the need to run Namerd.
  * Made ingress controller's ingress class annotation configurable (#1584).
  * Fixed an issue where Linkerd would continue routing traffic to endpoints of a service after that service was removed (#1622).
  * Major refactoring and performance improvements to `io.l5d.k8s` and `io.l5d.k8s.ns` namers (#1603).
  * Ingress controller now checks all available ingress resources before using a default backend (#1607).
  * Ingress controller now correctly routes requests with host headers that contain ports (#1607).
* HTTP/2
  * Fixed an issue where long-running H2 streams would eventually hang (#1598).
  * Fixed a memory leak on long-running H2 streams (#1598)
  * Added a user-friendly error message when a HTTP/2 router receives a HTTP/1 request (#1618)
* HTTP/1
  * Removed spurious `ReaderDiscarded` exception logged on HTTP/1 retries (#1609)
* Consul
  * Added support for querying Consul by specific service health states (#1601)
  * Consul namers and Dtab store now fall back to a last known good state on Consul observation errors (#1597)
  * Improved log messages for Consul observation errors (#1597)
* TLS
  * Removed support for PKCS#1 keys (#1590)
  * Added validation to prevent incompatible `disableValidation: true` and `clientAuth` settings in TLS client configurations (#1621)
* Changed `io.l5d.mesh`, `io.l5d.thriftNameInterpreter`, linkerd
  admin, and namerd admin to serve on 127.0.0.1 by default (instead of
  0.0.0.0) (#1366)
* Deprecated `io.l5d.statsd` telemeter.
Tim-Brooks pushed a commit to Tim-Brooks/linkerd that referenced this pull request Dec 20, 2018
* Add version check to Grafana dashboard

The web dashboard checks the local Linkerd version against the latest
release, and informs the user if an update is available. Grafana was not
doing this.

Modify the Grafana dashboard to perform a version check, and prompt the
user to update if needed.

Fixes linkerd#1607

Signed-off-by: Andrew Seigner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants