Skip to content

Commit 49c2289

Browse files
Merge pull request #264 from oauth2-proxy/tuunit-patch-1
doc: add contribution guide
2 parents 20f0cba + d86a5ce commit 49c2289

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

CONTRIBUTING.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Contributing
2+
3+
This repository is the official **community maintained** helm chart for oauth2-proxy and is not to be confused with the helm chart published by bitnami. We rely on you to test your changes sufficiently.
4+
5+
## Pull Requests
6+
7+
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose.
8+
9+
### Pull Request Title
10+
11+
We do not enforce the title of your pull request to follow guidelines but we do appreciate [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
12+
13+
## Documentation
14+
15+
The documentation in the chart [README.md](charts/oauth2-proxy) and the `values.yaml` should always be kept up to date if you make changes to existing parameters or introduce new ones.
16+
17+
### Artifact Hub Annotation
18+
19+
Since we release the chart on Artifact Hub we require you to update the `artifacthub.io/changes` annotation in the `Chart.yaml`.
20+
21+
* [https://artifacthub.io/docs/topics/annotations/helm/](https://artifacthub.io/docs/topics/annotations/helm/)
22+
23+
24+
## Versioning
25+
26+
We follow the [semver standard](https://semver.org/) for the chart version and application version.
27+
28+
Always consider your changes and try to avoid breaking changes where possible.
29+
30+
### New Application Versions
31+
32+
The application version is only to be updated if a new release of the oauth2-proxy application repo was published.
33+
34+
### Immutability
35+
36+
Each release must be immutable. Any change to a chart (even just documentation) requires a version bump. Trying to release the same version twice will result in an error.
37+
38+
39+
## Testing
40+
41+
When making changes to the logic or resources of the chart please make sure you tested those changes in two ways:
42+
43+
* Existing helm release with the chart version before your changes: `helm upgrade`
44+
* Fresh helm release with you changes: `helm install`
45+
46+
47+
### Testing Charts
48+
49+
As part of the Continuous Integration system we run Helm's [Chart Testing](https://github.com/helm/chart-testing) tool.
50+
51+
The checks for Chart Testing are stricter than the standard Helm requirements.
52+
53+
The configuration can be found in [ct.yaml](ct.yaml)
54+
55+
If you have `ct` installed you can manually invoke the linting with the following command:
56+
57+
```shell
58+
ct lint --config ct.yaml
59+
```
60+
61+
If you want to run the tests locally we recommend to use [kind](https://kind.sigs.k8s.io).
62+
63+
Prerequisites:
64+
65+
```shell
66+
# Add monitoring CRD
67+
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.78/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
68+
```
69+
70+
Run the tests:
71+
72+
```shell
73+
ct --config ct.yaml install
74+
```
75+
76+
## Publishing Changes
77+
78+
Changes are automatically publish whenever a commit is merged to the `main` branch by the CI job (see `./.github/workflows/release.yml`).

0 commit comments

Comments
 (0)