mirror of
https://gitea.com/gitea/helm-chart.git
synced 2024-06-03 10:51:24 +05:30
b8f0310c43
### Description of the change This PR adds support for gpg key setup. It allows to pass the gpg private key content inline inside `values.yaml` or refer to an existing secret containing the key content data. ### Benefits Administrators don't need to manually setup the gpg environment from inside a running container. It also eliminates the breaking change of Gitea 1.17 regarding `[git].HOME` as the `GNUPGHOME` environment variable is used consistently to relocate the `.gnupg` directory to its former location. ### Applicable issues - fixes #107 ### Additional information This PR add the first unit tests to this Helm Chart, ensuring templating integrity for signing related configuration. ### Checklist - [x] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) Co-authored-by: justusbunsi <sk.bunsenbrenner@gmail.com> Co-authored-by: pat-s <pat-s@noreply.gitea.io> Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/343 Reviewed-by: luhahn <luhahn@noreply.gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: justusbunsi <justusbunsi@noreply.gitea.io> Co-committed-by: justusbunsi <justusbunsi@noreply.gitea.io>
63 lines
2.4 KiB
Markdown
63 lines
2.4 KiB
Markdown
# Contribution Guidelines
|
|
|
|
Any type of contribution is welcome; from new features, bug fixes, tests,
|
|
refactorings for easier maintainability or documentation improvements.
|
|
|
|
## Development environment
|
|
|
|
- [`node`](https://nodejs.org/en/) at least current LTS
|
|
- [`helm`](https://helm.sh/docs/intro/install/)
|
|
- `make` is optional; you may call the commands directly
|
|
|
|
When using Visual Studio Code as IDE, following plugins might be useful:
|
|
|
|
- [Markdown All in One](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one)
|
|
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)
|
|
- [Helm Intellisense](https://marketplace.visualstudio.com/items?itemName=Tim-Koehler.helm-intellisense)
|
|
|
|
## Documentation Requirements
|
|
|
|
The `README.md` must include all configuration options. The parameters section
|
|
is generated by extracting the parameter annotations from the `values.yaml` file,
|
|
by using [this tool](https://github.com/bitnami-labs/readme-generator-for-helm).
|
|
|
|
If changes were made on configuration options, run `make readme` to update the
|
|
README file.
|
|
|
|
## Pull Request Requirements
|
|
|
|
When submitting or updating a PR:
|
|
|
|
- make sure it passes CI builds.
|
|
- do not make independent changes in one PR.
|
|
- try to avoid rebases. They make code reviews for large PRs and comments much harder.
|
|
- if applicable, use the PR template for a well-defined PR description.
|
|
- clearly mark breaking changes.
|
|
|
|
## Local development & testing
|
|
|
|
For local development and testing of pull requests, the following workflow can
|
|
be used:
|
|
|
|
1. Install `minikube` and `helm`.
|
|
2. Start a `minikube` cluster via `minikube start`.
|
|
3. From the `gitea/helm-chart` directory execute the following command. This
|
|
will install the dependencies listed in `Chart.yml` and deploy the current
|
|
state of the helm chart found locally. If you want to test a branch, make
|
|
sure to switch to the respective branch first.
|
|
`helm install --dependency-update gitea . -f values.yaml`.
|
|
4. Gitea is now deployed in `minikube`. To access it, it's port needs to be
|
|
forwarded first from `minikube` to localhost first via `kubectl --namespace
|
|
default port-forward svc/gitea-http 3000:3000`. Now Gitea is accessible at
|
|
[http://localhost:3000](http://localhost:3000).
|
|
|
|
### Unit tests
|
|
|
|
```bash
|
|
# install the unittest plugin
|
|
$ helm plugin install https://github.com/heyhabito/helm-unittest
|
|
|
|
# run the unittests
|
|
make unittests
|
|
```
|