Skip to content

Commit

Permalink
docs: add contributing guide
Browse files Browse the repository at this point in the history
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
  • Loading branch information
ritazh committed Apr 1, 2022
1 parent c0eb600 commit dc313a3
Show file tree
Hide file tree
Showing 9 changed files with 221 additions and 54 deletions.
9 changes: 7 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -3,14 +3,19 @@
**Which issue(s) this PR fixes** *(optional, using `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when the PR gets merged)*:
Fixes #

<!--
**Is the PR title following semantic convention?**
Please refer to [Semantic types](https://github.com/open-policy-agent/gatekeeper/blob/master/.github/semantic.yml) to view accepted title convention to satisfy this status check.
-->

<!--
**Are you making changes to Gatekeeper Helm chart?**
Helm chart is auto-generated in Gatekeeper. If you have any changes in `charts` directory, they will get clobbered when we do a new release. Please see [contributing changes doc](charts/../../charts/gatekeeper/README.md#contributing-changes) for modifying the Helm chart.
Please refer to [Contributing to Helm Chart](https://open-policy-agent.github.io/gatekeeper/website/docs/help#contributing-to-helm-chart) for modifying the Helm chart.
-->

<!--
**Are you making changes to Gatekeeper docs?**
Gatekeeper auto-generates versioned docs. If you have any doc changes for a particular version, please update in `website/docs` as well as in `website/versioned_docs/version-[Gatekeeper version]` directory. If the change is for next release, please update in `website/docs`, then the change will be part of next versioned doc when we do a new release.
Please see [Contributing to Docs](https://open-policy-agent.github.io/gatekeeper/website/docs/help#contributing-to-docs)
-->

**Special notes for your reviewer**:
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,6 @@
# Contributing

Thanks for your interest in contributing to the Open Policy Agent (OPA) Gatekeeper project!

Please refer to [Gatekeeper's contribution guide](https://open-policy-agent.github.io/gatekeeper/website/docs/help)
to find out how you can help.
23 changes: 5 additions & 18 deletions README.md
Expand Up @@ -15,34 +15,21 @@ Check out the [installation instructions](https://open-policy-agent.github.io/ga

## Documentation

Please see the [docs](https://open-policy-agent.github.io/gatekeeper/website/docs/howto) for more in-depth information.
Please see the [Gatekeeper website](https://open-policy-agent.github.io/gatekeeper/website/docs/howto) for more in-depth information.

## Policy Library

See the [Gatekeeper policy library](https://www.github.com/open-policy-agent/gatekeeper-library) for a collection of constraint templates and sample constraints that you can use with Gatekeeper.

## Community
## Community & Contributing

Join us to help define the direction and implementation of this project!

- Join the [`#kubernetes-policy`](https://openpolicyagent.slack.com/messages/CDTN970AX)
channel on [OPA Slack](https://slack.openpolicyagent.org/).

- Join [weekly meetings](https://docs.google.com/document/d/1A1-Q-1OMw3QODs1wT6eqfLTagcGmgzAJAjJihiO3T48/edit)
to discuss development, issues, use cases, etc.

- Use [GitHub Issues](https://github.com/open-policy-agent/gatekeeper/issues)
to file bugs, request features, or ask questions asynchronously.
Please refer to [Gatekeeper's contribution guide](https://open-policy-agent.github.io/gatekeeper/website/docs/help)
to find out how you can help.

## Code of conduct

This project is governed by the [CNCF Code of conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

## Security

Please report vulnerabilities by email to [open-policy-agent-security](mailto:open-policy-agent-security@googlegroups.com).
We will send a confirmation message to acknowledge that we have received the
report and then we will send additional messages to follow up once the issue
has been investigated.

For details on the security release process please refer to the [open-policy-agent/opa/SECURITY.md](https://github.com/open-policy-agent/opa/blob/main/SECURITY.md) file.
For details on how to report vulnerabilities and security release process, please refer to [Gatekeeper Security](https://open-policy-agent.github.io/gatekeeper/website/docs/security) for more information.
4 changes: 3 additions & 1 deletion SECURITY.md
@@ -1 +1,3 @@
See [https://github.com/open-policy-agent/opa/blob/main/SECURITY.md](https://github.com/open-policy-agent/opa/blob/main/SECURITY.md)
# Security

For details on how to report vulnerabilities and security release process, please refer to [Gatekeeper Security](https://open-policy-agent.github.io/gatekeeper/website/docs/security) for more information.
7 changes: 1 addition & 6 deletions cmd/build/helmify/static/README.md
Expand Up @@ -140,9 +140,4 @@ _See [Exempting Namespaces](https://open-policy-agent.github.io/gatekeeper/websi

## Contributing Changes

This Helm chart is autogenerated from the Gatekeeper static manifest. The
generator code lives under `cmd/build/helmify`. To make modifications to this
template, please edit `kustomization.yaml`, `kustomize-for-helm.yaml` and
`replacements.go` under that directory and then run `make manifests`. Your
changes will show up in the `manifest_staging` directory and will be promoted
to the root `charts` directory the next time a Gatekeeper release is cut.
Please refer to [Contributing to Helm Chart](https://open-policy-agent.github.io/gatekeeper/website/docs/help#contributing-to-helm-chart) for modifying the Helm chart.
7 changes: 1 addition & 6 deletions manifest_staging/charts/gatekeeper/README.md
Expand Up @@ -140,9 +140,4 @@ _See [Exempting Namespaces](https://open-policy-agent.github.io/gatekeeper/websi

## Contributing Changes

This Helm chart is autogenerated from the Gatekeeper static manifest. The
generator code lives under `cmd/build/helmify`. To make modifications to this
template, please edit `kustomization.yaml`, `kustomize-for-helm.yaml` and
`replacements.go` under that directory and then run `make manifests`. Your
changes will show up in the `manifest_staging` directory and will be promoted
to the root `charts` directory the next time a Gatekeeper release is cut.
Please refer to [Contributing to Helm Chart](https://open-policy-agent.github.io/gatekeeper/website/docs/help#contributing-to-helm-chart) for modifying the Helm chart.
73 changes: 66 additions & 7 deletions website/docs/help.md
@@ -1,15 +1,74 @@
---
id: help
title: Want to help?
title: How to contribute
---
Thanks for your interest in contributing to the Gatekeeper project! This document will help answer common questions you may have during your contribution.

## Where to start?
Join us to help define the direction and implementation of this project!

- Join the [`#kubernetes-policy`](https://openpolicyagent.slack.com/messages/CDTN970AX)
channel on [OPA Slack](https://slack.openpolicyagent.org/).
- File [GitHub Issues](https://github.com/open-policy-agent/gatekeeper/issues)
to report bugs, request features, or ask questions asynchronously.

- Join the [`#opa-gatekeeper`](https://openpolicyagent.slack.com/messages/CDTN970AX)
channel on [OPA Slack](https://slack.openpolicyagent.org/) to talk to the maintainers and other contributors asynchronously.

- Join [weekly meetings](https://docs.google.com/document/d/1A1-Q-1OMw3QODs1wT6eqfLTagcGmgzAJAjJihiO3T48/edit)
to discuss development, issues, use cases, etc.
- Join [weekly meetings](https://docs.google.com/document/d/1A1-Q-1OMw3QODs1wT6eqfLTagcGmgzAJAjJihiO3T48/edit) to discuss development, issues, use cases, etc with maintainers and other contributors.

- Use [GitHub Issues](https://github.com/open-policy-agent/gatekeeper/issues)
to file bugs, request features, or ask questions asynchronously.
- Add a policy to the [Gatekeeper policy library](https://www.github.com/open-policy-agent/gatekeeper-library).

## Contributing Process

Please follow these 3 steps for contributions:

1. Commit changes to a git branch in your fork, making sure to sign-off those changes for the [Developer Certificate of Origin](#developer-certification-of-origin-dco).
1. Create a GitHub Pull Request for your change, following the instructions in the pull request template and use [semantic PR title](https://github.com/zeke/semantic-pull-requests)
1. Perform a [Pull Request Review](#pull-request-review-process) with the project maintainers on the pull request.

### Developer Certification of Origin (DCO)

This project requires contributors to sign a DCO (Developer Certificate of Origin) to ensure that the project has the proper rights to use your code.

The DCO is an attestation attached to every commit made by every developer. In the commit message of the contribution, the developer simply adds a Signed-off-by statement and thereby agrees to the DCO, which you can find at <http://developercertificate.org/>.

#### DCO Sign-Off via the command line

Configure your local git to sign off your username and email address that is associated with your GitHub user account.

```sh
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
```

Then, for every commit, add a signoff statement via the `-s` flag.

```sh
$ git commit -s -m "This is my commit message"
```

If you forget to add the sign-off you can also amend a previous commit with the sign-off by running `git commit --amend -s`. If you've pushed your changes to GitHub already you'll need to force push your branch with `git push -f`.

### Pull Request Review Process

Please take a look at [this article](https://help.github.com/articles/about-pull-requests/) if you're not familiar with GitHub Pull Requests.

Once you open a pull request, project maintainers will review your changes and respond to your pull request with any feedback they might have.

#### Pull Request Test Requirements

For code updates, to ensure high quality commits, we require that all pull requests to this project meet these specifications:

1. **Tests:** We require all the code in Gatekeeper to have at least unit test coverage.
2. **Green CI Tests:** We require these test runs to succeed on every pull request before being merged.

## Contributing to Docs

If you want to contribute to docs, Gatekeeper auto-generates versioned docs. If you have any doc changes for a particular version, please update in [website/docs](https://github.com/open-policy-agent/gatekeeper/tree/master/website/docs) as well as in [website/versioned_docs/version-vx.y.z](https://github.com/open-policy-agent/gatekeeper/tree/master/website/versioned_docs) directory. If the change is for next release, please update in [website/docs](https://github.com/open-policy-agent/gatekeeper/tree/master/website/docs), then the change will be part of next versioned doc when we do a new release.

## Contributing to Helm Chart

If you want to contribute to Helm chart, Gatekeeper auto-generates versioned Helm charts from static manifests. If you have any changes in [charts](https://github.com/open-policy-agent/gatekeeper/tree/master/charts) directory, they will get clobbered when we do a new release. The generator code lives under [cmd/build/helmify](https://github.com/open-policy-agent/gatekeeper/tree/master/cmd/build/helmify). To make modifications to this template, please edit `kustomization.yaml`, `kustomize-for-helm.yaml` and `replacements.go` under that directory and then run `make manifests`. Your changes will show up in the [manifest_staging](https://github.com/open-policy-agent/gatekeeper/tree/master/manifest_staging) directory and will be promoted to the root charts directory the next time a Gatekeeper release is cut.

## Contributing to Code

If you want to contribute code, check out the [Developers](developers.md) guide to get started.
73 changes: 66 additions & 7 deletions website/versioned_docs/version-v3.6.x/help.md
@@ -1,15 +1,74 @@
---
id: help
title: Want to help?
title: How to contribute
---
Thanks for your interest in contributing to the Gatekeeper project! This document will help answer common questions you may have during your contribution.

## Where to start?
Join us to help define the direction and implementation of this project!

- Join the [`#kubernetes-policy`](https://openpolicyagent.slack.com/messages/CDTN970AX)
channel on [OPA Slack](https://slack.openpolicyagent.org/).
- File [GitHub Issues](https://github.com/open-policy-agent/gatekeeper/issues)
to report bugs, request features, or ask questions asynchronously.

- Join the [`#opa-gatekeeper`](https://openpolicyagent.slack.com/messages/CDTN970AX)
channel on [OPA Slack](https://slack.openpolicyagent.org/) to talk to the maintainers and other contributors asynchronously.

- Join [weekly meetings](https://docs.google.com/document/d/1A1-Q-1OMw3QODs1wT6eqfLTagcGmgzAJAjJihiO3T48/edit)
to discuss development, issues, use cases, etc.
- Join [weekly meetings](https://docs.google.com/document/d/1A1-Q-1OMw3QODs1wT6eqfLTagcGmgzAJAjJihiO3T48/edit) to discuss development, issues, use cases, etc with maintainers and other contributors.

- Use [GitHub Issues](https://github.com/open-policy-agent/gatekeeper/issues)
to file bugs, request features, or ask questions asynchronously.
- Add a policy to the [Gatekeeper policy library](https://www.github.com/open-policy-agent/gatekeeper-library).

## Contributing Process

Please follow these 3 steps for contributions:

1. Commit changes to a git branch in your fork, making sure to sign-off those changes for the [Developer Certificate of Origin](#developer-certification-of-origin-dco).
1. Create a GitHub Pull Request for your change, following the instructions in the pull request template and use [semantic PR title](https://github.com/zeke/semantic-pull-requests)
1. Perform a [Pull Request Review](#pull-request-review-process) with the project maintainers on the pull request.

### Developer Certification of Origin (DCO)

This project requires contributors to sign a DCO (Developer Certificate of Origin) to ensure that the project has the proper rights to use your code.

The DCO is an attestation attached to every commit made by every developer. In the commit message of the contribution, the developer simply adds a Signed-off-by statement and thereby agrees to the DCO, which you can find at <http://developercertificate.org/>.

#### DCO Sign-Off via the command line

Configure your local git to sign off your username and email address that is associated with your GitHub user account.

```sh
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
```

Then, for every commit, add a signoff statement via the `-s` flag.

```sh
$ git commit -s -m "This is my commit message"
```

If you forget to add the sign-off you can also amend a previous commit with the sign-off by running `git commit --amend -s`. If you've pushed your changes to GitHub already you'll need to force push your branch with `git push -f`.

### Pull Request Review Process

Please take a look at [this article](https://help.github.com/articles/about-pull-requests/) if you're not familiar with GitHub Pull Requests.

Once you open a pull request, project maintainers will review your changes and respond to your pull request with any feedback they might have.

#### Pull Request Test Requirements

For code updates, to ensure high quality commits, we require that all pull requests to this project meet these specifications:

1. **Tests:** We require all the code in Gatekeeper to have at least unit test coverage.
2. **Green CI Tests:** We require these test runs to succeed on every pull request before being merged.

## Contributing to Docs

If you want to contribute to docs, Gatekeeper auto-generates versioned docs. If you have any doc changes for a particular version, please update in [website/docs](https://github.com/open-policy-agent/gatekeeper/tree/master/website/docs) as well as in [website/versioned_docs/version-vx.y.z](https://github.com/open-policy-agent/gatekeeper/tree/master/website/versioned_docs) directory. If the change is for next release, please update in [website/docs](https://github.com/open-policy-agent/gatekeeper/tree/master/website/docs), then the change will be part of next versioned doc when we do a new release.

## Contributing to Helm Chart

If you want to contribute to Helm chart, Gatekeeper auto-generates versioned Helm charts from static manifests. If you have any changes in [charts](https://github.com/open-policy-agent/gatekeeper/tree/master/charts) directory, they will get clobbered when we do a new release. The generator code lives under [cmd/build/helmify](https://github.com/open-policy-agent/gatekeeper/tree/master/cmd/build/helmify). To make modifications to this template, please edit `kustomization.yaml`, `kustomize-for-helm.yaml` and `replacements.go` under that directory and then run `make manifests`. Your changes will show up in the [manifest_staging](https://github.com/open-policy-agent/gatekeeper/tree/master/manifest_staging) directory and will be promoted to the root charts directory the next time a Gatekeeper release is cut.

## Contributing to Code

If you want to contribute code, check out the [Developers](developers.md) guide to get started.

0 comments on commit dc313a3

Please sign in to comment.