Ultralight, security-first service mesh for Kubernetes. Main repo for Linkerd 2.x.
Go to file
Alex Leong 381f237f69
Add multicluster unlink command (#4802)
Fixes #4707 

In order to remove a multicluster link, we add a `linkerd multicluster unlink` command which produces the yaml necessary to delete all of the resources associated with a `linkerd multicluster link`.  These are:
* the link resource
* the service mirror controller deployment
* the service mirror controller's RBAC
* the probe gateway mirror for this link
* all mirror services for this link

This command follows the same pattern as the `linkerd uninstall` command in that its output is expected to be piped to `kubectl delete`.  The typical usage of this command is:

```
linkerd --context=source multicluster unlink --cluster-name=foo | kubectl --context=source delete -f -
```

This change also fixes the shutdown lifecycle of the service mirror controller by properly having it listen for the shutdown signal and exit its main loop.

A few alternative designs were considered:

I investigated using owner references as suggested [here](https://github.com/linkerd/linkerd2/issues/4707#issuecomment-653494591) but it turns out that owner references must refer to resources in the same namespace (or to cluster scoped resources).  This was not feasible here because a service mirror controller can create mirror services in many different namespaces.

I also considered having the service mirror controller delete the mirror services that it created during its own shutdown.  However, this could lead to scenarios where the controller is killed before it finishes deleting the services that it created.  It seemed more reliable to have all the deletions happen from `kubectl delete`.  Since this is the case, we avoid having the service mirror controller delete mirror services, even when the link is deleted, to avoid the race condition where the controller and CLI both attempt to delete the same mirror services and one of them fails with a potentially alarming error message.

Signed-off-by: Alex Leong <alex@buoyant.io>
2020-08-04 16:21:59 -07:00
.github Reenable `upgrade-edge` integration test (#4821) 2020-07-31 12:11:32 -05:00
bin Reenable `upgrade-edge` integration test (#4821) 2020-07-31 12:11:32 -05:00
charts Update to proxy-init v1.3.4 (#4815) 2020-07-30 15:58:58 -05:00
cli Add multicluster unlink command (#4802) 2020-08-04 16:21:59 -07:00
cni-plugin CI: Remove Base image (#4782) 2020-07-23 17:00:12 -05:00
controller Add multicluster unlink command (#4802) 2020-08-04 16:21:59 -07:00
grafana Fix spelling mistakes using codespell (#4700) 2020-07-07 17:07:22 -05:00
pkg Update to proxy-init v1.3.4 (#4815) 2020-07-30 15:58:58 -05:00
proto support overriding inbound and outbound connect timeouts. (#4759) 2020-07-27 13:56:21 -07:00
proxy-identity Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
test conformance validation: move `tap_test.go` test helpers to `testutil` (#4800) 2020-07-28 13:12:25 -07:00
testutil conformance validation: move `tap_test.go` test helpers to `testutil` (#4800) 2020-07-28 13:12:25 -07:00
web Fix security vulnerabilities in yarn packages (#4826) 2020-08-03 08:43:51 -07:00
.dockerignore Migrate CI to docker buildx and other improvements (#4765) 2020-07-22 14:27:45 -05:00
.editorconfig Add protobuf files to .editorconfig (#1042) 2018-05-30 15:09:38 -07:00
.gcp.json.enc Add docker builds and integration tests to CI (#1303) 2018-07-11 14:01:42 -07:00
.gitattributes remove the duplicate word (#3385) 2019-09-04 20:13:55 -07:00
.gitignore Add i18n library to Linkerd dashboard (#4803) 2020-07-30 09:09:59 -07:00
.golangci.yml Upgrade golangci-lint to v1.23.8 (#4181) 2020-03-18 09:13:19 -05:00
.markdownlint.yaml Lint all markdown files in CI (#4402) 2020-05-19 23:03:50 -07:00
.proxy-version proxy: v2.105.0 (#4814) 2020-07-30 13:09:36 -07:00
ADOPTERS.md Update ADOPTERS.md (#4731) 2020-07-08 21:53:44 -07:00
BUILD.md CI: Remove Base image (#4782) 2020-07-23 17:00:12 -05:00
CHANGES.md Change notes for edge-20.7.5 (#4816) 2020-07-30 17:15:22 -05:00
CODE_OF_CONDUCT.md Lint all markdown files (#4403) 2020-05-19 09:59:26 -07:00
CONTRIBUTING.md Update CI and docs to reference `main` branch (#4662) 2020-06-24 12:39:22 -07:00
DCO Add contributing doc and DCO file (#88) 2017-12-22 14:54:27 -08:00
Dockerfile-debug CI: Remove Base image (#4782) 2020-07-23 17:00:12 -05:00
Dockerfile-proxy Migrate CI to docker buildx and other improvements (#4765) 2020-07-22 14:27:45 -05:00
GOVERNANCE.md Lint all markdown files (#4403) 2020-05-19 09:59:26 -07:00
LICENSE Introducing Conduit, the ultralight service mesh 2017-12-05 00:24:55 +00:00
MAINTAINERS.md Lint all markdown files (#4403) 2020-05-19 09:59:26 -07:00
README.md Fix build status badge in README (#4769) 2020-07-20 17:18:12 -07:00
SECURITY.md Lint all markdown files (#4403) 2020-05-19 09:59:26 -07:00
SECURITY_AUDIT.pdf Add security audit (#3008) 2019-06-28 16:04:41 -07:00
TEST.md Fix spelling mistakes using codespell (#4700) 2020-07-07 17:07:22 -05:00
go.mod Update to proxy-init v1.3.4 (#4815) 2020-07-30 15:58:58 -05:00
go.sum Update to proxy-init v1.3.4 (#4815) 2020-07-30 15:58:58 -05:00
tools.go Upgrade to client-go 0.17.4 and smi-sdk-go 0.3.0 (#4221) 2020-04-01 10:07:23 -07:00

README.md

Linkerd

Linkerd

GitHub Actions Status GitHub license Go Report Card Slack Status

🎈 Welcome to Linkerd! 👋

Linkerd is an ultralight, security-first service mesh for Kubernetes. Linkerd adds critical security, observability, and reliability features to your Kubernetes stack with no code change required.

Linkerd is a Cloud Native Computing Foundation (CNCF) project.

Repo layout

This is the primary repo for the Linkerd 2.x line of development.

The complete list of Linkerd repos is:

Quickstart and documentation

You can run Linkerd on any modern Kubernetes cluster in a matter of seconds. See the Linkerd Getting Started Guide for how.

For more comprehensive documentation, start with the Linkerd docs. (The doc source code is available in the website repo.)

Working in this repo

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

We ❤️ pull requests! See CONTRIBUTING.md for info on contributing changes.

Get involved

Community meetings

We host regular online meetings for contributors, adopters, maintainers, and anyone else interested to connect in a synchronous fashion. These meetings usually take place the last Wednesday of the month at 9am Pacific / 4pm UTC.

We're a friendly group, so please feel free to join us!

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.

Security

Security Audit

A third party security audit was performed by Cure53. You can see the full report here.

License

Copyright 2020 the Linkerd Authors. 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.