Ultralight, security-first service mesh for Kubernetes. Main repo for Linkerd 2.x.
Go to file
Matei David a0e51fdfb5
Change injector proxy version annotation (#5338) (#5469)
### What

When overriding the proxy version using annotations, the respective annotation displays the wrong information (`linkerd.io/proxy-version`). This is a simple fix to display the correct version for the annotation; instead of using the proxy image from the config for the annotation's value, we take it from the overriden values instead.

Based on the discussion from #5338 I understood that when the image is updated it is reflected in the container image version but not the annotation. Alex's proposed fix seems to work like a charm so I can't really take credit for anything. I have attached below some before/after snippets of the deployments & pods. If there any additional changes required (or if I misunderstood anything) let me know and I'll gladly get it sorted :) 

#### Tests
---

Didn't add any new tests, I built the images and just tested the annotation displays the correct version. 

To test:
* I first injected an emojivoto-web deployment, its respective pod had the proxy version set to `dev-...`;
* I then re-injected the same deployment using a different proxy version and restarted the pods, its respective pod displayed the expected annotation value `stable-2.9.0` (whereas before it would have still been `dev-...`)

`Before`
```
# Deployment
apiVersion: apps/v1
kind: Deployment
...
   template:
    metadata:
      annotations:
        kubectl.kubernetes.io/restartedAt: "2021-01-04T12:41:47Z"
        linkerd.io/inject: enabled

# Pod
apiVersion: v1
kind: Pod
metadata:
  annotations:
    kubectl.kubernetes.io/restartedAt: "2021-01-04T12:41:47Z"
    linkerd.io/created-by: linkerd/proxy-injector dev-8d506317-madavid
    linkerd.io/identity-mode: default
    linkerd.io/inject: enabled
    linkerd.io/proxy-version: dev-8d506317-madavid
```
 
`After`
```sh
$ linkerd inject --proxy-version stable-2.9.0 - | kubectl apply -f -  

# Deployment
apiVersion: apps/v1
kind: Deployment
...
  template:
    metadata:
      annotations:
        config.linkerd.io/proxy-version: stable-2.9.0
        
# Pod
apiVersion: v1
kind: Pod
metadata:
  annotations:
    config.linkerd.io/proxy-version: stable-2.9.0
    kubectl.kubernetes.io/restartedAt: "2021-01-04T12:41:47Z"
    linkerd.io/created-by: linkerd/proxy-injector dev-8d506317-madavid
    linkerd.io/identity-mode: default
    linkerd.io/inject: enabled
    linkerd.io/proxy-version: stable-2.9.0

# linkerd.io/proxy-version changed after injection and now matches the config (and the proxy img)
```

Fixes #5338

Signed-off-by: Matei David <matei.david.35@gmail.com>
2021-01-06 11:13:11 -05:00
.github Build jaeger-webhook in release CI (#5381) 2020-12-14 11:42:51 -05:00
bin viz: move some components into linkerd-viz (#5340) 2020-12-23 20:17:31 +05:30
charts Add PodDisruptionBudgets to control plane (#5398) (#5406) 2021-01-06 09:19:15 -05:00
cli Add PodDisruptionBudgets to control plane (#5398) (#5406) 2021-01-06 09:19:15 -05:00
cni-plugin Updated debian image tags (#5249) 2020-11-18 10:51:15 -05:00
controller remove prom check for public-api self-check (#5436) 2021-01-05 17:22:39 -05:00
grafana Fixed multicluster Grafana chart (#5114) 2020-10-21 10:06:37 -05:00
jaeger viz: move some components into linkerd-viz (#5340) 2020-12-23 20:17:31 +05:30
multicluster Add mulitcluster check command (#5410) 2020-12-21 15:50:17 -05:00
pkg Change injector proxy version annotation (#5338) (#5469) 2021-01-06 11:13:11 -05:00
proto Remove dependency of linkerd-config for control plane components (#4915) 2020-10-06 22:19:18 +05:30
proxy-identity Improve comments in proxy-identity (#5420) 2020-12-23 08:28:41 -08:00
test remove prom check for public-api self-check (#5436) 2021-01-05 17:22:39 -05:00
testutil viz: move some components into linkerd-viz (#5340) 2020-12-23 20:17:31 +05:30
viz viz: move some components into linkerd-viz (#5340) 2020-12-23 20:17:31 +05:30
web build(deps): bump ini from 1.3.5 to 1.3.7 in /web/app (#5370) 2020-12-14 09:39:30 -05:00
.dockerignore Migrate CI to docker buildx and other improvements (#4765) 2020-07-22 14:27:45 -05:00
.editorconfig Add PodDisruptionBudgets to control plane (#5398) (#5406) 2021-01-06 09:19:15 -05: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 tracing: new jaeger independent helm chart (#5275) 2020-11-24 09:45:16 -08:00
.golangci.yml Upgrade golangci-lint to v1.23.8 (#4181) 2020-03-18 09:13:19 -05:00
.helmdocsignore Add automatic readme generation for charts (#5316) 2020-12-02 14:37:45 -05:00
.markdownlint.yaml Lint all markdown files in CI (#4402) 2020-05-19 23:03:50 -07:00
.proxy-version proxy: v2.126.0 (#5432) 2020-12-23 08:40:33 -08:00
ADOPTERS.md Add PlexTrac to ADOPTERS.md (#5439) 2021-01-05 15:39:57 -08:00
BUILD.md Add automatic readme generation for charts (#5316) 2020-12-02 14:37:45 -05:00
CHANGES.md add release notes for edge-20.12.4 (#5409) 2020-12-18 13:04:01 -08: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 Updated debian image tags (#5249) 2020-11-18 10:51:15 -05:00
Dockerfile-proxy Updated debian image tags (#5249) 2020-11-18 10:51:15 -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 Spelling (#4872) 2020-08-12 21:59:50 -07:00
SECURITY.md Spelling (#4872) 2020-08-12 21:59:50 -07:00
SECURITY_AUDIT.pdf Add security audit (#3008) 2019-06-28 16:04:41 -07:00
TEST.md Consolidate integration tests under k3d (#5245) 2020-11-18 14:33:16 -05:00
go.mod Add OpaqueTransport field to destination protocol hints (#5421) 2020-12-23 11:06:39 -05:00
go.sum Add OpaqueTransport field to destination protocol hints (#5421) 2020-12-23 11:06:39 -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.