Skip to content

Commit c1764be

Browse files
authored
Add a README (#109)
This repo is missing a README. This change adds a general overview of the repo and adds a markdown linter to CI. This change updates the copyright in the LICENSE file. It also fixes Rust crate documentation generation so that all features are enabled by docs.rs. Signed-off-by: Oliver Gould <ver@buoyant.io>
1 parent 43e7cc4 commit c1764be

File tree

9 files changed

+132
-28
lines changed

9 files changed

+132
-28
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "linkerd2-proxy-api",
3-
"image": "ghcr.io/linkerd/dev:v10",
3+
"image": "ghcr.io/linkerd/dev:v11",
44
"extensions": [
55
"DavidAnson.vscode-markdownlint",
66
"golang.go",

.github/workflows/markdown.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: markdown
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
paths:
9+
- '**/*.md'
10+
- .github/workflows/markdown.yml
11+
12+
jobs:
13+
markdownlint:
14+
timeout-minutes: 5
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
18+
- uses: DavidAnson/markdownlint-cli2-action@744f913a124058ee903768d3adb92a4847e5d132
19+
with:
20+
globs: "**/*.md"

CHANGES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
## v0.2.0
2727

28-
* Add the `io.linkerd.proxy.inbound.InboundServerPolicies` API to support server-side configuration
29-
and policy.
28+
* Add the `io.linkerd.proxy.inbound.InboundServerPolicies` API to support
29+
server-side configuration and policy.
3030
* Go: Update dependencies, including protoc and grpc
3131
* Rust: Update dependencies, including tonic v0.5
3232
* Rust: Add features for all APIs

CONTRIBUTING.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ contribution. See the [DCO](DCO) file for details.
1717

1818
In practice, just add a line to every git commit message:
1919

20-
```
20+
```text
2121
Signed-off-by: Jane Smith <jane.smith@example.com>
2222
```
2323

@@ -32,11 +32,13 @@ Do you have an improvement?
3232

3333
1. Submit an [issue][issue] describing your proposed change.
3434
2. We will try to respond to your issue promptly.
35-
3. Fork this repo, develop and test your code changes. See the project's [README](README.md) for further information about working in this repository.
35+
3. Fork this repo, develop and test your code changes. See the project's
36+
[README](README.md) for further information about working in this repository.
3637
4. Submit a pull request against this repo's `master` branch.
3738
5. Your branch may be merged once all configured checks pass, including:
3839
- The branch has passed tests in CI.
39-
- A review from appropriate maintainers (see [MAINTAINERS.md](MAINTAINERS.md) and [GOVERNANCE.md](GOVERNANCE.md))
40+
- A review from appropriate maintainers (see
41+
[MAINTAINERS.md](MAINTAINERS.md) and [GOVERNANCE.md](GOVERNANCE.md))
4042

4143
## Committing ##
4244

@@ -49,7 +51,7 @@ message.
4951

5052
Finalized commit messages should be in the following format:
5153

52-
```
54+
```text
5355
Subject
5456
5557
Problem
@@ -72,12 +74,12 @@ Fixes #[GitHub issue ID]
7274

7375
##### Examples #####
7476

75-
```
77+
```text
7678
bad: server disconnects should cause dst client disconnects.
7779
good: Propagate disconnects from source to destination
7880
```
7981

80-
```
82+
```text
8183
bad: support tls servers
8284
good: Introduce support for server-side TLS (#347)
8385
```

Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.5.0"
44
authors = ["Linkerd Developers <cncf-linkerd-dev@lists.cncf.io>"]
55
license = "Apache-2.0"
66
edition = "2021"
7-
description = "Linkerd2 Proxy API gRPC bindings and utilities"
7+
description = "Linkerd Proxy API gRPC bindings and utilities"
88
homepage = "https://linkerd.io"
99
repository = "https://github.com/linkerd/linkerd2-proxy-api"
1010
documentation = "https://docs.rs/linkerd2-proxy-api"
@@ -13,17 +13,18 @@ rust-version = "1.59"
1313

1414
[features]
1515
default = []
16-
17-
# Enable generation of arbitrary protos with quickcheck.
1816
arbitrary = ["quickcheck"]
19-
2017
destination = ["http_types", "net", "prost-types", "tonic/codegen"]
2118
http_types = ["http", "thiserror"]
2219
identity = ["prost-types", "tonic/codegen"]
2320
inbound = ["net", "prost-types", "tonic/codegen"]
2421
net = ["ipnet", "thiserror"]
2522
tap = ["h2", "http_types", "net", "prost-types", "tonic/codegen"]
2623

24+
[package.metadata.docs.rs]
25+
rustdoc-args = ["--cfg", "docsrs"]
26+
all-features = true
27+
2728
[dependencies]
2829
h2 = { version = "0.3", optional = true }
2930
http = { version = "0.2", optional = true }

GOVERNANCE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
See https://github.com/linkerd/linkerd2/blob/master/GOVERNANCE.md
1+
# Governance
2+
3+
See <https://github.com/linkerd/linkerd2/blob/master/GOVERNANCE.md>.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2022 The Linkerd Authors
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

MAINTAINERS.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
The Linkerd2 Proxy API maintainers are:
1+
# Maintainers
22

3-
* Oliver Gould <ver@buoyant.io> @olix0r (super-maintainer)
4-
* Kevin Lingerfelt <kl@buoyant.io> @klingerf (super-maintainer)
5-
6-
<!--
7-
# Adding a new maintainer
8-
9-
* Submit a PR modifying this file
10-
* Add maintainer to .github/CODEOWNERS
11-
* Obtain approvals per GOVERNANCE.md
12-
* Invite maintainer to https://github.com/orgs/linkerd/teams/linkerd2-maintainers/members
13-
* Invite maintainer to https://github.com/orgs/linkerd/people
14-
-->
3+
See <https://github.com/linkerd/linkerd2/blob/master/MAINTAINERS.md>.

README.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Linkerd Proxy API
2+
3+
This repo contains the gRPC bindings that the [Linkerd Proxy][proxy-gh] uses to
4+
communicate with the [Linkerd control plane][cp-gh].
5+
6+
## APIs
7+
8+
Generally, the proxy's APIs are Kubernetes-agnostic and expose abstractions that
9+
allow proxies to discover runtime configuration.
10+
11+
### `destination`
12+
13+
The destination API is used by proxies to discover information about outbound
14+
traffic. This configuration includes:
15+
16+
* the protocol of the destination, if known
17+
* whether the destination is a load balanced service or individual endpoint
18+
* labels to describe the destination in telemetry
19+
* the mTLS identity of destination pods
20+
21+
### `identity`
22+
23+
The identity API is used by proxies to obtain TLS certificates used for
24+
authenticed pod-to-pod communication.
25+
26+
### `inbound`
27+
28+
The inbound API is used by the proxy to discover inbound serving
29+
policies--especially per-port authorization requirements.
30+
31+
### `tap`
32+
33+
The proxy can be configured to expose a gRPC server that allows the control
34+
plane to query metadata about live requests transiting the proxy.
35+
36+
## Languages
37+
38+
### Protobuf
39+
40+
The [`./proto`](./proto) directory includes protobuf definitions.
41+
42+
### Go
43+
44+
The [`./go`](./go) directory contains statically generated Go bindings, which are
45+
generally used by [controller implementations][cp-gh].
46+
47+
### Rust
48+
49+
[![Crates.io][rs-crate-badge]][rs-crate-url]
50+
[![Documentation][rs-docs-badge]][rs-docs-url]
51+
[![License][rs-lic-badge]](LICENSE)
52+
53+
This repository publishes the [**linkerd2-proxy-api** crate][rs-crate-url],
54+
which uses [`tonic`][tonic] to expose client and server implementations for each
55+
API. Each API may be enabled independently with cargo feature flags.
56+
57+
The [proxy][proxy-gh] generally uses API clients. Some server implementations
58+
are also used by the [control plane][cp-gh].
59+
60+
## Issues
61+
62+
Issues may be opened in the [**linkerd2** repository][new-issue].
63+
64+
## License
65+
66+
Copyright 2022 The Linkerd Authors
67+
68+
Licensed under the Apache License, Version 2.0 (the "License");
69+
you may not use this file except in compliance with the License.
70+
You may obtain a copy of the License at
71+
72+
http://www.apache.org/licenses/LICENSE-2.0
73+
74+
Unless required by applicable law or agreed to in writing, software
75+
distributed under the License is distributed on an "AS IS" BASIS,
76+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
77+
See the License for the specific language governing permissions and
78+
limitations under the License.
79+
80+
<!-- refs -->
81+
[cp-gh]: https://github.com/linkerd/linkerd2
82+
[new-issue]: https://github.com/linkerd/linkerd2/issues/new/choose
83+
[proxy-gh]: https://github.com/linkerd/linkerd2-proxy
84+
[tonic]: https://github.com/hyperium/tonic
85+
[rs-crate-badge]: https://img.shields.io/crates/v/linkerd2-proxy-api.svg
86+
[rs-crate-url]: https://crates.io/crates/linkerd2-proxy-api
87+
[rs-docs-badge]: https://docs.rs/linkerd2-proxy-api/badge.svg
88+
[rs-docs-url]: https://docs.rs/linkerd2-proxy-api
89+
[rs-docs-url]: https://img.shields.io/crates/l/linkerd2-proxy-api
90+
[rs-lic-badge]: https://img.shields.io/crates/l/linkerd2-proxy-api

0 commit comments

Comments
 (0)