Skip to content

Enable identity by default for all benchmarks#2

Merged
olix0r merged 5 commits intoolix0r:mainfrom
kleimkuhler:kleimkuhler/mock-identity
Aug 18, 2020
Merged

Enable identity by default for all benchmarks#2
olix0r merged 5 commits intoolix0r:mainfrom
kleimkuhler:kleimkuhler/mock-identity

Conversation

@kleimkuhler
Copy link
Contributor

@kleimkuhler kleimkuhler commented Aug 10, 2020

Summary

Identity can now be enabled in bechmarks using the CSR, key, and signed
certificate generated by gen-certs.sh.

By default, this creates the
foo.ns1.serviceaccount.identity.linkerd.cluster.local identity and it's files
are located in identity/.

This must be run with with a proxy built from the changes introduced by
linkerd/linkerd2-proxy#624. You can use
kevinlbuoyant/l2-proxy:proxy-identity-v1 until that merges in main.

With identity being enabled by default, running the high concurrency tests is
done with:

env PROXY_IMAGE=kevinlbuoyant/l2-proxy:proxy-identity-v1 ./high-concurrency

Identity can be disabled by setting the PROXY_IDENTITY_DISABLED env variable:

env PROXY_IMAGE=kevinlbuoyant/l2-proxy:proxy-identity-v1 PROXY_IDENTITY_DISABLED=1 ./high-concurrency

If you make changes to the identity created by gen-certs.sh, you can specify
the identity that the single proxy for use with the PROXY_IDENTITY_LOCAL_NAME
env variable.

Signed-off-by: Kevin Leimkuhler kevin@kleimkuhler.com

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler kleimkuhler force-pushed the kleimkuhler/mock-identity branch from 95389b4 to 74948a3 Compare August 14, 2020 21:15
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler kleimkuhler marked this pull request as ready for review August 14, 2020 23:04
kleimkuhler added a commit to linkerd/linkerd2-proxy that referenced this pull request Aug 17, 2020
## Motivation

The proxy identity-initializing wrapper is responsible for generating a CSR and
key for the proxy upon startup. These files (located in `end-entity/`) are used
by the proxy for establishing identity.

When mocking identity, we'd like to be able to provide a pre-generated CSR and
key so that we can expect certain certificates in the Signed certificate
request.

Therefore, when building a proxy to be used with mock identity there should be a
way to remove this wrapper so that the identity files are not overwritten.

## Solution

Introduce a new `SKIP_IDENTITY_WRAPPER` build-arg that when set, removes the
proxy identity-initializing script that is run at starup.

The use of it below will build a proxy with the `mock-orig-dst` feature and skip
identity generation.

```
:; docker buildx build . --build-arg PROXY_FEATURES=mock-orig-dst --build-arg SKIP_IDENTITY_WRAPPER=1 --load --tag=kevinlbuoyant/l2-proxy:proxy-identity-v1
```

I have confirmed this works with the changes in olix0r/l2-proxy-harness#2.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler kleimkuhler requested a review from olix0r August 18, 2020 04:57
@kleimkuhler kleimkuhler changed the title Draft: Enable identity for all benchmarks Enable identity by default for all benchmarks Aug 18, 2020
@olix0r olix0r merged commit 3f36185 into olix0r:main Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants