Commit Graph

18 Commits

Author SHA1 Message Date
Eliza Weisman 67d4b56253
Remove `AsciiExt` import (#104)
Since the methods on this trait were moved to direct implementations on the
implementing types, this produces an unused import warning with the latest
(1.23) Rust standard library. As we set `deny(warnings)`, this breaks the build.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-01-04 10:49:13 -08:00
Brian Smith 02176d8d16
Remove default controller URL from proxy. (#48)
Previously there was a default controller URL in the proxy. This
default was never used for any proxy injected by `conduit inject` and
it was the wrong default when using the proxy outside of Kubernetes.
Also more generally this is such an important setting in terms of
correctness and security that it was dangerous to let it be implied in
any context.

Remove the default, requiring that it be set in order for the proxy to
start.
2018-01-02 08:44:27 -10:00
Sky Ao 238c54414b correct typo: Enviroment -> Environment (#100)
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
2017-12-29 10:14:48 -08:00
Sean McArthur 8e2dd66bfa
disable push promises in proxy (#70) 2017-12-21 14:41:17 -08:00
Kevin Lingerfelt a8e75115ab
Prepare the repo for the v0.1.1 release (#75)
* Prepare the repo for the v0.1.1 release

* Add changelog

* Changelog updates, wrap at 100 characters
2017-12-20 10:51:53 -08:00
Brian Smith 8385a7a8c1
Proxy: Map unqualified/partially-qualified names to FQDN (#59)
* Proxy: Map unqualified/partially-qualified names to FQDN

Previously we required the service to fully qualify all service names
for outbound traffic. Many services are written assuming that
Kubernetes will complete names using its DNS search path, and those
services weren't working with Conduit.

Now add an option, used by default, to fully-qualify the domain names.
Currently only Kubernetes-like name completion for services is
supported, but the configuration syntax is open-ended to allow for
alternatives in the future. Also, the auto-completion can be disabled
for applications that prefer to ensure they're always using unambiguous
names. Once routing is implemented then it is likely that (default)
routing rules will replace these hard-coded rules.

Unit tests for the name completion logic are included.

Part of the solution for #9. The changes to `conduit inject` to
actually use this facility will be in another PR.
2017-12-19 11:59:26 -10:00
Brian Smith 4fa4891694
Use `connection::Connection` for outbound connections (#51)
Previously `connection::Connection` was only being used for inbound
connections, not outbound connections. This led to some duplicate
logic and also made it difficult to adapt that code to enable TLS.

Now outbound connections use `connection::Connection` too. This will
allow the upcoming TLS logic to guarantee that `TCP_NODELAY` is
enabled at the right time, and the TLS logic also control access to
the underlying plaintext socket for security reasons.
2017-12-15 12:44:25 -10:00
Brian Smith 40d50f0f4a
Encapsulate listening port connection acceptance logic (#46)
Previously every use of `BoundPort` repeated a bunch of logic.

Move the repeated logic to `BoundPort` itself. Just remove the no-op
handshaking logic; new handshaking logic will be added to `BoundPort`
when TLS is added.
2017-12-14 13:19:05 -10:00
Brian Smith 81fb0fea5f
Move default private connect timeout to `Config` (#42)
Previously the default value of this setting was in lib.rs instead of
being automatically set in `Config` like all the other defaults, which
was inconsistent and confusing.

Fix this by moving the defaulting logic to `Config`.

Validated by running the test suite.
2017-12-13 21:15:21 -06:00
Brian Smith 0c2aa0e185
Centralize and clarify TCP port binding (#43)
Previously the logic related to listening for incoming TCP connections
was duplicated in several places.

Begin centralizing this logic. Future commits will centralize it
further.

No validation was done other than running the test suite.
2017-12-13 19:45:15 -06:00
Brian Smith 0185522821
Proxy: Parse environment variables in one place (#26)
Previously `Process` did its own environment variable parsing and did
not benefit from the improved error handling that `config` now has.
Additionally, future changes will need access to these same environment
variables in other parts of the proxy.

Move `Process`'s environment variable parsing to `config` to address
both of these issues. Now there are no uses of `env::var` outside of
`config` except for logging, which is the final desired state.

I validated this manually.
2017-12-13 19:33:37 -06:00
Brian Smith 559f4a76fb
Proxy: Use production config parsing in tests (#25)
* Proxy: Use production config parsing in tests

Previosuly the testing code for the proxy was sensitive to the values
of environment variables unintentionally, because `Config` looked at
the environment variables. Also, the tests were largely avoiding
testing the production configuration parsing code since they were
doing their own parsing.

Now the tests avoid looking at environment variables other than
`ENV_LOG`, which makes them more resilient. Also the tests now parse
the settings using the same code as production use uses.

I validated this manually.
2017-12-13 19:27:50 -06:00
Brian Smith 0ebc20c013
Proxy: Parse all environment variables before aborting (#24)
Previously, as soon as we would encounter one environment variable with
an invalid value we would exit. This is frustrating behavior when
deploying to Kubernetes and there are multiple problems because the
edit-compile-test cycle is so slow.

Fix this by parsing all the environment variables and logging error
messages before exiting.

I validated this manually.
2017-12-13 18:56:14 -06:00
Eliza Weisman 2fdb859dff
Add timeout to in-flight telemetry reports (#12)
This PR adds a configurable timeout duration after which in-flight telemetry reports are dropped, cancelling the corresponding RPC request to the control plane.

I've also made the `Timeout` implementation used in `TimeoutConnect` generic, and reused it in multiple places, including the timeout for in-flight reports.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2017-12-13 15:07:36 -08:00
Brian Smith e29a02d63b
Proxy: Improve error reporting for invalid environment variables (#23)
* Proxy: Improve error reporting for invalid environment variables

Previously when an environment variable had an invalid value the
process would exit with an error that did not mention which
environment variable is invalid.

Start fixing this by routing environment variable parsing through
functions that always know the name of the environment variable when
they report errors.

I validated this change manually.

* Proxy: Improve configuration URL parsing

Previously there was a bit of duplicated logic between parsing `Addr`
and `HostAndPort` values.

Factor out the common logic. In the process, improve the error
reporting in the cases where parsing fails.
2017-12-08 12:32:43 -06:00
Oliver Gould bff3efea3f
Prepare for v0.1.0 (#1)
Update versions in code.

Use default docker tag of v0.1.0
2017-12-04 19:55:56 -08:00
Oliver Gould 980f85963d apply rustffmt on proxy, remove rustfmt.toml for now 2017-12-05 00:44:16 +00:00
Oliver Gould b104bd0676 Introducing Conduit, the ultralight service mesh
We’ve built Conduit from the ground up to be the fastest, lightest,
simplest, and most secure service mesh in the world. It features an
incredibly fast and safe data plane written in Rust, a simple yet
powerful control plane written in Go, and a design that’s focused on
performance, security, and usability. Most importantly, Conduit
incorporates the many lessons we’ve learned from over 18 months of
production service mesh experience with Linkerd.

This repository contains a few tightly-related components:
- `proxy` -- an HTTP/2 proxy written in Rust;
- `controller` -- a control plane written in Go with gRPC;
- `web` -- a UI written in React, served by Go.
2017-12-05 00:24:55 +00:00