Ultralight, security-first service mesh for Kubernetes. Main repo for Linkerd 2.x.
Go to file
Eliza Weisman fac845bdcd
proxy: Add a lazy version of ThreadRng (#936)
This is in preparation for landing the Tokio upgrade. 

In order to be generic over Tokio's current thread and threadpool executors,
a number of types in Conduit which were not previously `Send` are now required
to be `Send`. A majority of this work will be done in the main Tokio upgrade
PR, as it is in many cases not possible to make these types `Send` _without_
using the new Tokio API (in order to remove `Handle`s, etc.); however, I'm
factoring out everything possible and trying to land it in separate PRs.

The p2c load balancer constructed in `Outbound` is currently parameterized
over a random number generator. We currently construct it by getting the 
thread-local RNG, and passing it to the load balancer constructor. However,
the thread-local RNG is not `Send`. I've fixed this issue by creating a new
zero-sized empty struct type which implements `rand::Rng` simply by calling
`thread_rng()` every time its' called, and passing that to 
`choose::power_of_two_choices` instead. Since this is an empty type which 
contains no data, and the correct thread-local RNG is accessed whenever
the methods are called, this new type can trivially be `Send`. According to
the `rand` crate's documentation, this is the correct way to use `ThreadRng`
anyway:
> Retrieve the lazily-initialized thread-local random number generator, seeded
> by the system. Intended to be used in method chaining style, e.g. 
> `thread_rng().gen::<i32>()`.
> (from https://docs.rs/rand/0.4.2/rand/fn.thread_rng.html)

This shouldn't lead to any functional changes.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-05-11 17:26:23 -07:00
.github Add a newline to dco.yml (#254) 2018-02-01 15:16:02 -08:00
bin Reuse the proxy's build stage across CI runs (#891) 2018-05-09 09:11:58 -07:00
cli Modify the Stat API to handle requests for resource type "all" (#928) 2018-05-11 14:35:37 -07:00
controller Modify the Stat API to handle requests for resource type "all" (#928) 2018-05-11 14:35:37 -07:00
doc Adding statefulsets to inject. Fixes #907 (#910) 2018-05-10 09:00:36 -05:00
grafana Introduce Grafana, K8s, and Prom dashboards (#904) 2018-05-08 23:11:43 +02:00
pkg Modify the Stat API to handle requests for resource type "all" (#928) 2018-05-11 14:35:37 -07:00
proto Modify the Stat endpoint to also return the number of failed conduit pods (#895) 2018-05-08 10:35:21 -07:00
proxy proxy: Add a lazy version of ThreadRng (#936) 2018-05-11 17:26:23 -07:00
proxy-init Remove special support for ExternalName services (#764) 2018-04-25 11:53:33 -10:00
test Implement ListPods in public-api (#743) 2018-04-11 17:53:57 -07:00
testutil Add tests/utils/scripts for running integration tests (#608) 2018-03-27 15:06:55 -07:00
web Upgrade React to 16.3.2 (#927) 2018-05-10 15:15:29 -07:00
.dockerignore Link to Grafana from Conduit Dashboard (#678) 2018-04-06 10:56:42 -07:00
.editorconfig Add links to each deployment name in the Conduit dashboard (#44) 2017-12-19 15:40:24 -08:00
.gcp.json.enc Fix docker-build stage in CI (#21) 2017-12-08 00:52:06 -06:00
.gitattributes Stop collapsing Cargo.lock in GitHub PR reviews. (#551) 2018-03-13 10:17:33 -07:00
.gitignore Link to Grafana from Conduit Dashboard (#678) 2018-04-06 10:56:42 -07:00
.prometheus.dev.yml Remove the telemetry service (#757) 2018-04-13 11:21:29 -07:00
.travis.yml Fix syntax of travis.yml (#932) 2018-05-10 13:57:58 -07:00
BUILD.md Do not run tests in proxy Dockerfile (#882) 2018-05-01 11:54:02 -07:00
CHANGES.md Release Notes for 0.4.1 release. (#839) 2018-04-26 13:32:41 -07:00
CONTRIBUTING.md Add contributing doc and DCO file (#88) 2017-12-22 14:54:27 -08:00
Cargo.lock proxy: Parse units with duration configurations (#909) 2018-05-08 13:54:12 -07:00
Cargo.toml proxy: improve graceful shutdown process (#684) 2018-04-10 14:15:37 -07:00
DCO Add contributing doc and DCO file (#88) 2017-12-22 14:54:27 -08:00
Dockerfile-base Introducing Conduit, the ultralight service mesh 2017-12-05 00:24:55 +00:00
Dockerfile-go-deps Use Go 1.10.1 to build all Go code. (#650) 2018-04-02 14:58:30 -10:00
Gopkg.lock Remove special support for ExternalName services (#764) 2018-04-25 11:53:33 -10:00
Gopkg.toml Optimize Prometheus queries (#298) 2018-02-09 10:55:07 -08:00
LICENSE Introducing Conduit, the ultralight service mesh 2017-12-05 00:24:55 +00:00
README.md update readme: experimental -> alpha, and minor tweaks (#391) 2018-02-19 15:41:04 -08:00
TEST.md Add tests/utils/scripts for running integration tests (#608) 2018-03-27 15:06:55 -07:00
docker-compose.yml Upgrade Prometheus from 2.1.0 to 2.2.1 (#816) 2018-04-19 18:00:53 -07:00

README.md

conduit

Build Status GitHub license Slack Status

🎈 Welcome to Conduit! 👋

Conduit is an ultralight service mesh for Kubernetes. It features a minimalist control plane written in Go, and a native proxy data plane written in Rust that boasts the performance of C without the heartbleed.

Conduit is alpha. It is capable of proxying all TCP traffic, and reporting top-line metrics (success rates, latencies, etc) for all HTTP, HTTP/2, and gRPC traffic. It currently does not work with websockets or with HTTP tunneling--see the --skip-outbound-ports flag for how to exclude these types of traffic.

Get involved

Documentation

View Conduit docs for more a more comprehensive guide to getting started, or view the full Conduit roadmap.

Getting started with Conduit

  1. Install the Conduit CLI with curl https://run.conduit.io/install | sh .

  2. Add $HOME/.conduit/bin to your PATH.

  3. Install Conduit into your Kubernetes cluster with: conduit install | kubectl apply -f -.

  4. Verify that the installation succeeded with conduit check.

  5. Explore the Conduit controller with conduit dashboard.

  6. Optionally, install a demo application to run with Conduit.

  7. Add your own service to the Conduit mesh!

Working in this repo

BUILD.md includes general information on how to work in this repo.

Code of conduct

This project is for everyone. We ask that our users and contributors take a few minutes to review our code of conduct.

License

Conduit is copyright 2018 Buoyant, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.