In order to support an HA mode for the service-mirror component, some form of synchronization should be used to coordinate between replicas of the service-mirror controller. Although in practice most of the updates done by the replicas are idempotent (and have benign effects on correctness), there are some downsides, such as: resource usage implications from setting-up multiple watches, log pollution, errors associated with writes on resources that out of date, and increased difficulty in debugging. This change adds coordination between the replicas through leader election. To achieve leader election, client-go's `coordination` package is used. The change refactors the existing code; the previous nested loops now reside in a closure (to capture the necessary configuration), and the closure is run when a leader is elected. Leader election functions as part of a loop: a lease resource is created (if it does not exist), and the controller blocks until it has acquired the lease. The loop is terminated only on shutdown from an interrupt signal. If the lease is lost, it is released, watchers are cleaned-up, and the controller returns to blocking until it acquires the lease once again. Shutdown logic has been changed to rely on context cancellation propagation so that the watchers may be ended either by the leader elector (when claim is lost) or by the main routine when an interrupt is handled. --------- Signed-off-by: Matei David <matei@buoyant.io> Co-authored-by: Alejandro Pedraza <alejandro@buoyant.io> |
||
---|---|---|
.devcontainer | ||
.github | ||
audits | ||
bin | ||
charts | ||
cli | ||
cni-plugin | ||
controller | ||
grafana | ||
jaeger | ||
multicluster | ||
pkg | ||
policy-controller | ||
policy-test | ||
proto | ||
proxy-identity | ||
test | ||
testutil | ||
viz | ||
web | ||
.dockerignore | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.golangci.yml | ||
.helmdocsignore | ||
.markdownlint.yaml | ||
.proxy-version | ||
ADOPTERS.md | ||
BUILD.md | ||
CHANGES.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
Cargo.lock | ||
Cargo.toml | ||
DCO | ||
Dockerfile-debug | ||
Dockerfile-proxy | ||
EXTENSIONS.md | ||
GOVERNANCE.md | ||
LICENSE | ||
MAINTAINERS.md | ||
README.md | ||
RELEASE.md | ||
ROADMAP.md | ||
SECURITY.md | ||
STEERING.md | ||
TEST.md | ||
deny.toml | ||
go.mod | ||
go.sum | ||
justfile | ||
rust-toolchain | ||
tools.go |
README.md
Linkerd
🎈 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:
- linkerd2: Main Linkerd 2.x repo, including control plane and CLI
- linkerd2-proxy: Linkerd 2.x data plane proxy
- linkerd2-proxy-api: Linkerd 2.x gRPC API bindings
- linkerd: Linkerd 1.x
- website: linkerd.io website (including docs for 1.x and 2.x)
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
- Join Linkerd's user mailing list, developer mailing list, and announcements mailing list.
- Follow @Linkerd on Twitter.
- Join the Linkerd Slack.
- Join us in the regular online community meetings!
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 Thursday of the month at 9am Pacific / 4pm UTC.
We're a friendly group, so please feel free to join us!
Steering Committee meetings
We host regular online meetings for the Linkerd Steering Committee. All are welcome to attend, but audio and video participation is limited to Steering Committee members and maintainers. These meetings are currently scheduled on an ad-hoc basis and announced on the linkerd-users mailing list.
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
See SECURITY.md for our security policy, including how to report vulnerabilities.
Linkerd undergoes periodic third-party security audits and we publish the results here.
License
Copyright 2023 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.