Commit Graph

713 Commits

Author SHA1 Message Date
Kevin Lingerfelt e377cf4214
Update CHANGES.md for the v18.7.1 release (#1342)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-17 11:08:57 -07:00
Kevin Lingerfelt 3357a06f09
Remove conduit references from proxy-init codebase (#1325)
* Remove conduit references from proxy-init codebase
* Removing linkerd.io link from long description

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-17 10:29:30 -07:00
Brian Smith 1b38310019
Remove executable bit from non-executable files. (#1335)
These files were created with the executable bit set accidentally due
to the way my network file system setup was configured.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-07-16 13:55:52 -10:00
Brian Smith 0fcfd2bffb
Stop using `installsuffix` when building Go code. (#1327)
* Stop using `installsuffix` when building Go code.

See https://plus.google.com/117192131596509381660/posts/eNnNePihYnK.
`-installsuffix cgo` isn't necessary as of Go 1.10 (where build caching
changed substantially) and it probably wasn't necessary earlier.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-07-16 13:48:50 -10:00
Thomas Rampelberg 7e1b4e3de4
Update readme to reference linkerd2 (#1328)
* Update readme to reference linkerd2

* Review updates
2018-07-16 15:38:54 -07:00
Franziska von der Goltz c7ac072acc
update grafana dashboards: conduit to linkerd (#1320)
* update grafana dashboards to remove conduit reference and replace with linkerd instances
* update test install fixtures to reflect changes

Fixes: #1315

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
2018-07-16 13:05:01 -07:00
Brian Smith 3c29356bad
Fix file permissions for bin/fast-build. (#1326)
Revert the file permission changes from
commit f79a40a3e1.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-07-13 15:58:45 -10:00
Brian Smith f79a40a3e1
Add flag that skips `dep ensure` to bin/fast-build (#1321)
* Add flag that skips `dep ensure` to bin/fast-build

bin/fast-build is supposed to be fast. `dep ensure -vendor-only` is too slow
to meet this goal. Add `LINKERD_SKIP_DEP` to allow skipping it. The default
behavior is kept as-is to reduce new users' confusion.

The difference in speed isn't too notable now because the bin/docker-build
step drowns out the win currently. But if/when the bin/docker-build step is
replaced, this matters a lot.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-07-13 14:58:35 -10:00
Kevin Lingerfelt e5cce1abaf
Rename CLI from conduit to linkerd (#1312)
* Rename CLI binary
* Update integration tests for new binary name
* Rename --conduit-namespace flag, change default ns
* Rename occurrences of conduit in rest of CLI
* Rename inject and install components
* Remove conduit occurrences in docker files
* Additional miscellaneous cleanup
* Move protobuf definitions to linkerd2 package
* Rename conduit.io labels to use linkerd.io
* Rename conduit-managed segment to linkerd-managed
* Fix conduit references in web project

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-12 17:14:07 -07:00
Risha Mars 0c2ea20a7e
Fix annoying flickering if image asset isn't present (#1305) 2018-07-12 11:51:41 -07:00
Kevin Lingerfelt 565c1dad10
Add docker builds and integration tests to CI (#1303)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-11 14:01:42 -07:00
Risha Mars cf0ee70689
Continue to remove conduit branding from /web (#1290)
This PR adjusts the colour of a popup in the sidebar, as well as removes 
references to conduit in the frontend test fixtures.

All that's left in the Web UI code now is a few references to the conduit sites / githubs, 
as well as the CLI name.

* Remove a touch of conduit blue from the sidebar popup
* Remove minor references to conduit throughout the web code
* Fully colour the sidebar in new bg colour
2018-07-10 17:57:27 -07:00
Andrew Seigner e18fa48135
Name ClusterRole objects to be namespace-specific (#1295)
The control-plane's `ClusterRole` and `ClusterRoleBinding` objects are
global. Because their names did not vary across multiple control-plane
deployments, it prevented multiple control-planes from coexisting (when
RBAC is enabled).

Modify the `ClusterRole` and `ClusterRoleBinding` objects to include the
control-plane's namespace in their names. Also modify the integration
test to first install two control-planes, and then perform its full
suite of tests, to prevent regression.

Fixes #1292.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-07-10 16:21:20 -07:00
Oliver Gould 40e1b53ea9
docker: Ensure that TLS is validated when fetching the proxy (#1300)
Previously the proxy was fetched without verifying the endpoint's
signature.

Now, the `ca-certificates` package is installed prior to fetching the
package.

Additionally, the produced image contains a file containing the version.
2018-07-10 16:15:57 -07:00
Kevin Lingerfelt 1624a4ba0f
Ensure destination service always sends pod metadata (#1291)
* Ensure destination service always sends pod metadata
* Fix test that relied on hash ordering
* Stop using protobuf structs as map keys, fix logging

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-10 15:08:59 -07:00
Oliver Gould dbb3270ec8
Adopt Linkerd's governance (#1301) 2018-07-10 15:06:59 -07:00
Oliver Gould 941cad4a9c
Migrate build infrastructure to linkerd2 (#1298)
This PR begins to migrate Conduit to Linkerd2:
* The proxy has been completely removed from this repo, and is now located at
  github.com/linkerd/linkerd2-proxy.
* A `Dockerfile-proxy` has been added to fetch the most-recently published proxy
  binary from build.l5d.io.
* Proxy-specific protobuf bindings have been moved to
  github.com/linkerd/linkerd2-proxy-api.
* All docker images now use the gcr.io/linkerd-io registry.
* `inject` now uses `LINKERD2_PROXY_` environment variables
* Go paths have been updated to reflect the new (future) repo location.
2018-07-09 15:38:38 -07:00
Thomas Rampelberg cc524ebc4b
Update for current CLI (#1297) 2018-07-09 10:19:22 -07:00
Kevin Lingerfelt 6f804d600c
Remove docker-compose / simulate-proxy environment (#1294)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-06 17:44:35 -07:00
Risha Mars 9050b2d312
Fix authority stat queries when a --from flag is used (#1289)
* Fix bug where we were using dst_authorities as a group by instead of authorities
* Add test to make sure we don't dst_authorities

Previously, we were only checking to make sure we didn't add 
dst_authorities in the query labels in promDstQueryLabels but we 
weren't checking the groupBy labels in promDstGroupByLabelNames - 
this caused us to try to query for dst_authorities when a --from 
query was sent. There are no dst_authorities, so there would be no 
named results.
2018-07-06 17:29:08 -07:00
Risha Mars 219b017c28
Change sidebar branding from Conduit to Linkerd (#1262)
Use Linkerd branding in the sidebar.

This PR deals with visuals only. See #1260 for word changes.
2018-07-05 18:24:32 -07:00
Kevin Lingerfelt 930d1658c1
Fix default SMTP port in docs (#1284)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-05 18:21:53 -07:00
Kevin Lingerfelt 9379bd548c
Additional doc updates regarding protocol support (#1279)
* Additional doc updates regarding protocol support
* Re-add information about server-speaks-first protocols

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-05 17:22:33 -07:00
Eliza Weisman d76be26d85
proxy: Add tls_config_last_reload_seconds metric (#1204)
Depends on #1141.

This PR adds a `tls_config_last_reload_seconds` Prometheus metric
that reports the last time the TLS configuration files were reloaded.

Proof that it works:

Started the proxy with no certs, then generated them:
```
➜ http GET localhost:4191/metrics
HTTP/1.1 200 OK
content-encoding: gzip
content-length: 323
content-type: text/plain
date: Mon, 25 Jun 2018 23:02:52 GMT

# HELP tls_config_reload_total Total number of times the proxy's TLS config files were reloaded.
# TYPE tls_config_reload_total counter
tls_config_reload_total{status="io_error",path="example-example.crt",error_code="2"} 9
tls_config_reload_total{status="reloaded"} 3
# HELP tls_config_last_reload_seconds Timestamp of when the TLS configuration files were last reloaded successfully (in seconds since the UNIX epoch)
# TYPE tls_config_last_reload_seconds gauge
tls_config_last_reload_seconds 1529967764
# HELP process_start_time_seconds Time that the process started (in seconds since the UNIX epoch)
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1529967754
```

Started the proxy with certs already present:
```
➜ http GET localhost:4191/metrics
HTTP/1.1 200 OK
content-encoding: gzip
content-length: 285
content-type: text/plain
date: Mon, 25 Jun 2018 23:04:39 GMT

# HELP tls_config_reload_total Total number of times the proxy's TLS config files were reloaded.
# TYPE tls_config_reload_total counter
tls_config_reload_total{status="reloaded"} 4
# HELP tls_config_last_reload_seconds Timestamp of when the TLS configuration files were last reloaded successfully (in seconds since the UNIX epoch)
# TYPE tls_config_last_reload_seconds gauge
tls_config_last_reload_seconds 1529967876
# HELP process_start_time_seconds Time that the process started (in seconds since the UNIX epoch)
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1529967874
```

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-07-05 16:23:57 -07:00
Kevin Lingerfelt fd1aecfa63
Unhide --tls flag in conduit CLI (#1278)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-05 15:49:19 -07:00
Kevin Lingerfelt 693acdbf26
Update ListPods endpoint to return all pod owner types (#1275)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-05 15:14:16 -07:00
Risha Mars 372e145fea
Start removing references to conduit in the web UI (#1260)
This PR starts removing all references to the word "Conduit" in the web UI.
In the interest of not making huge changes all at once, I'll gradually start moving away
from the usage of "conduit" in the Web UI. For example, there are a lot of components that
have conduit in their names but they don't need to.

This branch is mostly component / variable names. There should be no visible changes except 
the spinner is no longer a Conduit spinner.

See #1262 for visible branding changes.

- Rename ConduitLink to PrefixedLink
- Remove ConduitSpinner in favour of antd.Spin
- Remove css classnames that are conduit- centered
- Parameterize the current Product Name so that it's easier to change in the future

Tracking ticket: linkerd/linkerd#2018
2018-07-05 15:07:51 -07:00
Oliver Gould b3dccca525
Update CHANGES for v0.5.0 (#1273) 2018-07-05 14:09:02 -07:00
Oliver Gould dcdf4b36b3
Document Conduit's Automatic TLS feature (#1268) 2018-07-05 13:54:25 -07:00
Kevin Lingerfelt 76110601d4
Update test helpers to work with kubernetes 1.8 (#1267)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-05 12:34:38 -07:00
Kevin Lingerfelt d42d7cb035
Re-run install integration test w/TLS enabled (#1230)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-05 10:32:29 -07:00
Franziska von der Goltz 9bf549b5ff
doc update to remove extra configurations for websockets (#1180)
* doc update to remove extra configurations for websockets and HTTP tunneling:
- remove instructions from readme and docs to set extra configs for websockets and  HTTP tunneling, since proxy upgrades automatically

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
2018-07-05 10:20:35 -07:00
Eliza Weisman a17177f73d
proxy: Fix out-of-control inotify CPU use (#1263)
The `inotify-rs` library's `EventStream` implementation currently 
calls `task::current().notify()` in a hot loop when a poll returns
`WouldBlock`, causing the task to constantly burn CPU. 

This branch updates the `inotify-rs` dependency to point at a branch
of `inotify-rs` I had previously written. That branch  rewrites the 
`EventStream` to use `mio` to  register interest in the `inotify` file 
descriptor instead, fixing the out-of-control polling. 

When inotify-rs/inotify#105 is merged upstream, we can go back to 
depending on the master version of the library.

Fixes #1261

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-07-03 20:16:12 -07:00
Risha Mars ba2e13c731
Small tweaks to error modal, add Reason to api error response (#1246)
- Add Reason to the error data passed from the api
- Rewrite error logic in the UI to try to make it clearer
- Show 0/0 pods meshed instead of 0/0 pods meshed (N/A) if 0 pods are meshed
2018-07-03 17:14:27 -07:00
Oliver Gould 647b93d967
proxy: Handle connection close during TLS detection (#1256)
During protocol detection, we buffer data to detect a TLS Client Hello
message. If the client disconnects while this detection occurs, we do
not properly handle the disconnect, and the proxy may busy loop.

To fix this, we must handle the case where `read(2)` returns 0 by
creating a `Connection` with the already-closed socket.

While doing this, I've moved some of the implementation of
`ConditionallyUpgradeServerToTls::poll` into helpers on
`ConditionallyUpgradeServerToTlsInner` so that the poll method is easier
to read, hiding the inner details from the polling logic.
2018-07-03 15:36:48 -07:00
Eliza Weisman 1c5e9eeaa6
proxy: Add a Prometheus metric for reporting errors loading TLS configs (#1141)
This PR adds a Prometheus stat tracking the number of times
TLS config files have been reloaded, and the number of times
reloading those files has errored. 

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-07-03 15:24:20 -07:00
Risha Mars 2002a8ba50
Add more tests for the stat summary endpoint --from flags (#1237)
Also add dst_ labels in the metrics we mock, so we can do --from queries with results.
2018-07-03 14:30:15 -07:00
Kevin Lingerfelt f0ba8f3ee8
Fix owner types in TLS identity strings (#1257)
* Fix owner types in TLS identity strings
* Update documentation on TLSIdentity struct

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-03 14:20:24 -07:00
Eliza Weisman b4d1d43f9f
proxy: Add TLS label in `transparency::retry_reconnect_errors` test (#1258) 2018-07-03 12:27:08 -07:00
Risha Mars 83b982b25a
Change CLI and web TLS indicators from Secured to TLS (#1247)
Previously, we had "Secured" columns in the web and CLI for the percentage of traffic 
that is TLSed. Change this to "TLS"
2018-07-03 10:51:38 -07:00
Brian Smith 252a8d39d3
Generate an ephemeral CA at startup that distributes TLS credentials (#1245)
Create a ephemeral, in-memory TLS certificate authority and integrate it into the certificate distributor.

Remove the re-creation of deleted ConfigMaps; this will be added back later in #1248.

Signed-off-by: Brian Smith brian@briansmith.org
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-02 18:09:31 -10:00
Oliver Gould 20276b106e
tap: Support `tls` labeling (#1244)
The proxy's metrics are instrumented with a `tls` label that describes
the state of TLS for each connection and associated messges.

This same level of detail is useful to get in `tap` output as well.

This change updates Tap in the following ways:
* `TapEvent` protobuf updated:
  * Added `source_meta` field including source labels
  * `proxy_direction` enum indicates which proxy server was used.
* The proxy adds a `tls` label to both source and destination meta indicating the state of each peer's connection
* The CLI uses the `proxy_direction` field to determine which `tls` label should be rendered.
2018-07-02 17:19:20 -07:00
Oliver Gould 593c839862
proxy: Always inlcude `tls` label in metrics (#1243)
The `tls` label could sometimes be formatted incorrectly, without a
preceding comma.

To fix this, the `TlsStatus` type no longer formats commas so that they
must be provided in the context in which they are used (as is done
otherwise in this file).
2018-07-02 16:21:06 -07:00
Eliza Weisman e018050cf9
proxy: Fall back to plaintext communication when a TLS handshake fails (#1173)
This branch modifies the proxy's logic for opening a connection so
that when an attempted TLS handshake fails, the proxy will retry that
connection without TLS.

This is implemented by changing the `UpgradeToTls` case in the `Future`
implementation for `Connecting`, so that rather than simply wrapping
a poll to the TLS upgrade future with `try_ready!` (and thus failing
the future if the upgrade future fails), we reset the state of the
future to the `Plaintext` state and continue looping. The `tls_status`
field of the future is changed to `ReasonForNoTls::HandshakeFailed`,
and the `Plaintext` state is changed so that if its `tls_status` is
`HandshakeFailed`, it will no longer attempt to upgrade to TLS when the
plaintext connection is successfully established.

Closes #1084 

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-06-29 17:08:03 -07:00
Kevin Lingerfelt a685dba873
Use parent name instead of pod name in identity string (#1236)
* Use parent name instead of pod name in identity string
* Update protobuf comment

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-06-29 14:28:13 -07:00
Risha Mars 8ebc969d2f
Fix bug where we wouldn't run stat table assertions if we expected 0 results (#1235)
I realized that our stat summary expectation checker would only check the actual
proto responses against the expectations if the expectations were non-empty.

Problem
If we expected empty results and the api returned actual results, we never actually 
check those results against the expectations.

The bug can be reproduced by replacing any nonzero metric we expect in 
expectedResponse with expectedResponse: genEmptyResponse() 
The tests on master will still pass.

Solution
Remove this line and ensure we get the expected number of stat tables.
2018-06-29 14:23:14 -07:00
Brian Smith f989c56127
Proxy: Skip TLS for control plane loopback connections. (#1229)
If the controller address has a loopback host then don't use TLS to connect
to it. TLS isn't needed for security in that case. In mormal configurations
the proxy isn't terminating TLS for loopback connections anyway.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-06-28 17:24:09 -10:00
Risha Mars 5ed7fc563c
Add controller component pod uptimes to the ServiceMesh page (#1205)
- Return pod uptimes from the GetPods endpoint
- Adds filtering by namespace to api.GetPods
- Adds a --namespace filter to conduit get pods
- Adds pod uptimes to the controller component toolitps on the ServiceMesh page
- Moves the ServiceMesh page back to using /api/pods
2018-06-28 15:42:00 -07:00
Risha Mars 5963b2ac24
Better format empty errors (#1202) 2018-06-28 14:52:04 -07:00
Risha Mars 68586fe697
Add the ability to query stats by authority (#1181)
Adds the ability to query by a new non-kubernetes resource type, "authorities",
in the StatSummary api.

This includes an extensive refactor of stat_summary.go to deal with non-kubernetes 
resource types.

- Add documentation to Resource in the public api so we can use it for authority
- Handle non-k8s resource requests in the StatSummary endpoint
- Rewrite stat summary fetching and parsing to handle non-k8s resources
- keys stat summary metric handling by Resource instead of a generated string
- Adds authority to the CLI
- Adds /authorities to the Web UI
- Adds some more stat integration and unit tests
2018-06-28 14:31:44 -07:00