Skip to content

Commit c07c12f

Browse files
committedMay 5, 2023
Add Project Governance
- Adds the Contributor Covenenat as our CoC - Adds GOVERNANCE.md based on the CNCF template - Updates CONTRIBUTING.md based on the CNCF template - Adds MEETINGS.md to describe community meetings - Adds MAINTAINERS.md to describe maintainers - Adds REVIEWING.md basedon the CNCF template Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
1 parent a31f00d commit c07c12f

7 files changed

+504
-34
lines changed
 

‎CODEOWNERS

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* @bpfd-dev/bpfd-maintainers
2+
3+
./bpfd @dave-tucker
4+
./bpfd/src/oci_utils @astoycos
5+
./bpfd/src/multiprog/tc.rs @anfredette
6+
./bpfd/src/certs.rs @Billy99
7+
./bpfd-api @dave-tucker
8+
./bpfctl @dave-tucker
9+
./bpfd-operator @astoycos
10+
./examples/go-tc-counter @anfredette
11+
./examples/go-xdp-counter @Billy99

‎CODE_OF_CONDUCT.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual
11+
identity and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the overall
27+
community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or advances of
32+
any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email address,
36+
without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement
64+
directly. Maintainers are identified in the [MAINTAINERS.md](MAINTAINERS.md) file and their contact information is on their GitHub profile page.
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series of
87+
actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or permanent
94+
ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within the
114+
community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.1, available at
120+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127+
[https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations

‎CONTRIBUTING.md

+132-34
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,145 @@
1-
# Contributing to bpfd
1+
# Contributing Guide
22

3-
Thanks for your help improving the project!
3+
* [New Contributor Guide](#contributing-guide)
4+
* [Ways to Contribute](#ways-to-contribute)
5+
* [Find an Issue](#find-an-issue)
6+
* [Ask for Help](#ask-for-help)
7+
* [Pull Request Lifecycle](#pull-request-lifecycle)
8+
* [Development Environment Setup](#development-environment-setup)
9+
* [Signoff Your Commits](#signoff-your-commits)
10+
* [Pull Request Checklist](#pull-request-checklist)
411

5-
## Reporting issues
12+
Welcome! We are glad that you want to contribute to our project! 💖
613

7-
If you believe you've discovered a bug in bpfd, please check if the bug is
8-
already known or [create an issue](https://github.com/bpfd-dev/bpfd/issues) on
9-
github. Please also report an issue if you find documentation that you think is
10-
confusing or could be improved.
14+
As you get started, you are in the best position to give us feedback on areas of
15+
our project that we need help with including:
1116

12-
When creating a new issue, make sure to include as many details as possible to
13-
help us understand the problem. When reporting a bug, always specify which
14-
version of bpfd you're using and which version of the linux kernel.
17+
* Problems found during setting up a new developer environment
18+
* Gaps in our Quickstart Guide or documentation
19+
* Bugs in our automation scripts
1520

16-
## Fixing bugs and implementing new features
21+
If anything doesn't make sense, or doesn't work when you run it, please open a
22+
bug report and let us know!
1723

18-
Make sure that your work is tracked by an issue or a (draft) pull request, this
19-
helps us avoid duplicating work.
24+
## Ways to Contribute
2025

21-
### Commits
26+
We welcome many different types of contributions including:
27+
28+
* New features
29+
* Builds, CI/CD
30+
* Bug fixes
31+
* Documentation
32+
* Issue Triage
33+
* Answering questions on Slack/Mailing List
34+
* Web design
35+
* Communications / Social Media / Blog Posts
36+
* Release management
37+
38+
Not everything happens through a GitHub pull request. Please come to our
39+
[meetings](./MEETINGS.md) or [contact us](https://kubernetes.slack.com/archives/C04UJBW2553) and let's discuss how we can work
40+
together.
41+
42+
### Come to Meetings
43+
44+
Absolutely everyone is welcome to come to any of our meetings. You never need an
45+
invite to join us. In fact, we want you to join us, even if you don’t have
46+
anything you feel like you want to contribute. Just being there is enough!
47+
48+
You can find out more about our meetings [here](./MEETINGS.md). You don’t have to turn on
49+
your video. The first time you come, introducing yourself is more than enough.
50+
Over time, we hope that you feel comfortable voicing your opinions, giving
51+
feedback on others’ ideas, and even sharing your own ideas, and experiences.
52+
53+
## Find an Issue
54+
55+
We have good first issues for new contributors and help wanted issues suitable
56+
for any contributor. [good first issue](https://github.com/bpfd-dev/bpfd/labels/good%20first%20issue) has extra information to
57+
help you make your first contribution. [help wanted](https://github.com/bpfd-dev/bpfd/labels/help%20wanted) are issues
58+
suitable for someone who isn't a core maintainer and is good to move onto after
59+
your first pull request.
60+
61+
Sometimes there won’t be any issues with these labels. That’s ok! There is
62+
likely still something for you to work on. If you want to contribute but you
63+
don’t know where to start or can't find a suitable issue, you can reach out to us on Slack and we will be happy to help.
64+
65+
Once you see an issue that you'd like to work on, please post a comment saying
66+
that you want to work on it. Something like "I want to work on this" is fine.
67+
68+
## Ask for Help
69+
70+
The best way to reach us with a question when contributing is to ask on:
71+
72+
* The original github issue
73+
* Our Slack channel
74+
75+
## Pull Request Lifecycle
76+
77+
Pull requests are managed by Mergify.
78+
79+
Our process is currently as follows:
80+
81+
1. When you open a PR a maintainer will automatically be assigned for review
82+
1. Make sure that your PR is passing CI - if you need help with failing checks please feel free to ask!
83+
1. Once it is passing all CI checks, a maintainer will review your PR and you may be asked to make changes.
84+
1. When you have received at least one approval from a maintainer, your PR will be merged automiatcally.
85+
86+
In some cases, other changes may conflict with your PR. If this happens, you will get notified by a comment in the issue that your PR requires a rebase, and the `needs-rebase` label will be applied. Once a rebase has been performed, this label will be automatically removed.
87+
88+
## Development Environment Setup
89+
90+
[Instructions](https://bpfd.netlify.app/building-bpfd/#development-environment-setup)
91+
92+
## Signoff Your Commits
93+
94+
### DCO
95+
96+
Licensing is important to open source projects. It provides some assurances that
97+
the software will continue to be available based under the terms that the
98+
author(s) desired. We require that contributors sign off on commits submitted to
99+
our project's repositories. The [Developer Certificate of Origin
100+
(DCO)](https://probot.github.io/apps/dco/) is a way to certify that you wrote and
101+
have the right to contribute the code you are submitting to the project.
102+
103+
You sign-off by adding the following to your commit messages. Your sign-off must
104+
match the git user and email associated with the commit.
105+
106+
This is my commit message
107+
108+
Signed-off-by: Your Name <your.name@example.com>
109+
110+
Git has a `-s` command line option to do this automatically:
111+
112+
git commit -s -m 'This is my commit message'
113+
114+
If you forgot to do this and have not yet pushed your changes to the remote
115+
repository, you can amend your commit with the sign-off by running
116+
117+
git commit --amend -s
118+
119+
## Logical Grouping of Commits
22120

23121
It is a recommended best practice to keep your changes as logically grouped as
24122
possible within individual commits. If while you're developing you prefer doing
25123
a number of commits that are "checkpoints" and don't represent a single logical
26124
change, please squash those together before asking for a review.
125+
When addressing review comments, please perform an interactive rebase and edit commits directly rather than adding new commits with messages like "Fix review comments".
27126

28-
#### Commit message guidelines
127+
## Commit message guidelines
29128

30129
A good commit message should describe what changed and why.
31130

32131
1. The first line should:
33-
34-
* contain a short description of the change (preferably 50 characters or less,
132+
133+
* contain a short description of the change (preferably 50 characters or less,
35134
and no more than 72 characters)
36-
* be entirely in lowercase with the exception of proper nouns, acronyms, and
135+
* be entirely in lowercase with the exception of proper nouns, acronyms, and
37136
the words that refer to code, like function/variable names
38-
* be prefixed with the name of the sub crate being changed
137+
* be prefixed with the name of the sub crate being changed
39138

40139
Examples:
41140

42-
* bpfd: validate program section names
43-
* bpf: add dispatcher program test slot
141+
* bpfd: validate program section names
142+
* bpf: add dispatcher program test slot
44143

45144
2. Keep the second line blank.
46145
3. Wrap all other lines at 72 columns (except for long URLs).
@@ -51,8 +150,8 @@ A good commit message should describe what changed and why.
51150

52151
Examples:
53152

54-
- `Fixes: #1337`
55-
- `Refs: #1234`
153+
* `Fixes: #1337`
154+
* `Refs: #1234`
56155

57156
Sample complete commit message:
58157

@@ -72,16 +171,15 @@ Fixes: #1337
72171
Refs: #453, #154
73172
```
74173

75-
## Testing Locally
174+
## Pull Request Checklist
76175

77-
Please test your patches locally before they are tested using GitHub Actions.
176+
When you submit your pull request, or you push new commits to it, our automated
177+
systems will run some checks on your new code. We require that your pull request
178+
passes these checks, but we also have more criteria than just that before we can
179+
accept and merge it. We recommend that you check the following things locally
180+
before you submit your code:
78181

79-
This can be accomplished by the following:
80-
81-
```sh
82-
# we use nightly due to requiring some unstable features
83-
cargo +nightly fmt
84-
cargo +nightly clippy
85-
cargo test
86-
# if you have edited code in bpf, repeat in the above in that directory
87-
```
182+
* That Rust code has been formatted with `cargo +nightly fmt` and that all clippy lints have been fixed - you can find failing lints with `cargo +nightly clippy`
183+
* That Go code has been formatted and linted
184+
* That unit tests are passing locally with `cargo test`
185+
* That integration tests are passing locally

0 commit comments

Comments
 (0)