Skip to content

Commit 8a10d32

Browse files
committed
chore(AB#89226): add docs on how to contribute to the project
Signed-off-by: Matthew H. Irby <matt.irby@keyfactor.com>
1 parent 53856ec commit 8a10d32

1 file changed

Lines changed: 20 additions & 8 deletions

File tree

CONTRIBUTING.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
# Command Cert Manager Issuer Contribution Guide
22

3-
## Requirements
3+
## How to contribute
4+
5+
### External Contributors - Submitting a PR
6+
7+
Since external contributors can't create branches directly on our repositories, go ahead and open your PR against `main`. Our team will handle retargeting it to the appropriate release branch as part of our internal review process. You may see your PR retargeted or, in some cases, closed and replaced with an internal PR carrying your commits. In either case, your contribution will be preserved.
8+
9+
### Release cadence
10+
11+
We have an internal review process for every release we make. This process can sometimes take a few days or weeks depending on resourcing.
12+
13+
## Development
14+
15+
### Requirements
416
- Go (>= 1.24)
517
- golangci-lint (>= 2.4.0) ([installation notes](https://github.com/golangci/golangci-lint?tab=readme-ov-file#install-golangci-lint))
618
- helm (>= 3.x) — required to render chart templates for manifest linting ([installation notes](https://helm.sh/docs/intro/install/))
719
- conftest — policy testing tool powered by Open Policy Agent; installed automatically by `make lint-manifests`
820

9-
## Installing dependencies
21+
### Installing dependencies
1022
Project dependencies can be installed by running the following:
1123

1224
```bash
@@ -19,14 +31,14 @@ The following command can be used to add missing requirements or remove unused m
1931
go mod tidy
2032
```
2133

22-
## Running unit tests
34+
### Running unit tests
2335
The following command can be run to run the project unit tests:
2436

2537
```bash
2638
go test -v ./...
2739
```
2840

29-
## Running linters
41+
### Running linters
3042
The project uses golangci-lint to lint the codebase. The following command can be run to run the linters:
3143

3244
```bash
@@ -39,7 +51,7 @@ or, alternatively:
3951
make lint
4052
```
4153

42-
## Updating generated manifests
54+
### Updating generated manifests
4355

4456
This command will update the generated custom resource definitions under `config/crd/bases`:
4557

@@ -50,7 +62,7 @@ make generate manifests
5062
> [!IMPORTANT]
5163
> There is no automated process to automatically update the CRDs under `deploy/charts/command-cert-manager-issuer`. If any changes are made to the CRDs, the generated CRDs under `config/crd/bases` must be copied to `deploy/charts/command-cert-manager-issuer/crds` to ensure the Helm chart is up to date.
5264
53-
## Linting Helm manifests
65+
### Linting Helm manifests
5466

5567
The Helm chart under `deploy/charts/command-cert-manager-issuer` is linted with two tools on every PR:
5668
- **conftest** — runs custom Rego policies located in the [`policy/`](policy/) directory against the rendered manifests
@@ -69,13 +81,13 @@ To inspect the rendered templates without linting:
6981
make helm-template
7082
```
7183

72-
### Adding or modifying policies
84+
#### Adding or modifying policies
7385

7486
Rego policies live in [`policy/`](policy/). Each `.rego` file in that directory is evaluated by conftest against every resource in the rendered chart. Add a new `.rego` file to enforce additional rules. For example, `policy/roles.rego` enforces that all `Role` resources declare an explicit namespace.
7587

7688
kube-linter checks can be tuned in [.kube-linter.yaml](.kube-linter.yaml). To exclude a check, add its name under the `exclude` key.
7789

78-
## Running end-to-end tests
90+
### Running end-to-end tests
7991
A comprehensive end-to-end test suite is available to verify the issuer code works against cert-manager and a Keyfactor Command instance.
8092

8193
Instructions on how to run the end-to-end test suite can be found [here](./e2e/README.md).

0 commit comments

Comments
 (0)