Skip to content

Commit 8f395f0

Browse files
author
Douglas Camata
authored
Add development instructions (#20)
1 parent 04f6510 commit 8f395f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+983
-5527
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Bug report
3+
about: Create a bug report to help us improve
4+
title: '[name of the chart] <issue title>'
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!-- Thanks for filing an issue! Before hitting the button, please answer these questions. It's helpful to search the existing GitHub issues first. It's likely that another user has already reported the issue you're facing, or it's a known issue that we're already aware of
11+
12+
Fill in as much of the template below as you can. If you leave out information, we can't help you as well.
13+
14+
Be ready for followup questions, and please respond in a timely manner. If we can't reproduce a bug or think a feature already exists, we might close your issue. If we're wrong, PLEASE feel free to reopen it and explain why.
15+
-->
16+
17+
**Bug description**
18+
19+
A clear and concise description of what the bug is.
20+
21+
**Version of Helm and Kubernetes**
22+
23+
The versino of Helm and Kubernetes where the problem occurs.
24+
25+
**Which chart?**
26+
27+
The chart name and version.
28+
29+
**What happened?**
30+
31+
Described what happened, as detailed as possible and necessary.
32+
33+
**What you expected to happen?**
34+
35+
Please avoid saying "It should just work".
36+
37+
**How to reproduce it?**
38+
39+
Steps to reproduce the problem, as minimally and precisely as possible.
40+
41+
**Anything else we need to know?**
42+
43+
Surprise us!
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea/feature for this project
4+
title: '[name of the chart] <issue title>'
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!-- Thanks for filing an issue! Before hitting the button, please answer these questions. It's helpful to search the existing GitHub issues first. It's likely that another user has already reported the issue you're facing, or it's a known issue that we're already aware of.
11+
12+
Describe *in detail* the feature/behavior/change you'd like to see.
13+
14+
Be ready for followup questions, and please respond in a timely manner. If we can't reproduce a bug or think a feature already exists, we might close your issue. If we're wrong, PLEASE feel free to reopen it and explain why.
15+
-->
16+
17+
**Is your feature request related to a problem? Please describe.**
18+
19+
A clear and concise description of what the problem is, e.g. `I'm always frustrated when [...]`
20+
21+
**Describe the solution you'd like**
22+
23+
A clear and concise description of what you want to happen.
24+
25+
**Describe alternatives you've considered**
26+
27+
A clear and concise description of any alternative solutions or features you've considered.
28+
29+
**Additional context**
30+
31+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--
2+
Thank you for contributing to New Relic's Helm charts. Before you submit this PR we'd like to
3+
make sure you are aware of our technical requirements:
4+
5+
* https://github.com/newrelic-experimental/helm-charts/blob/master/CONTRIBUTING.md#technical-requirements
6+
7+
For a quick overview across what we will look at reviewing your PR, please read
8+
our review guidelines:
9+
10+
* https://github.com/newrelic-experimental/helm-charts/blob/master/REVIEW_GUIDELINES.md
11+
12+
Following our best practices right from the start will accelerate the review process and
13+
help get your PR merged quicker.
14+
15+
When updates to your PR are requested, please add new commits and do not squash the
16+
history. This will make it easier to identify new changes. The PR will be squashed
17+
anyways when it is merged. Thanks.
18+
19+
For fast feedback, please @-mention maintainers that are listed in the Chart.yaml file.
20+
21+
Please make sure you test your changes before you push them. Once pushed, a Github Action
22+
will run across your changes and do some initial checks and linting. These checks run
23+
very quickly. Please check the results. We would like these checks to pass before we
24+
even continue reviewing your changes.
25+
-->
26+
#### Is this a new chart
27+
28+
#### What this PR does / why we need it:
29+
30+
#### Which issue this PR fixes
31+
*(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*
32+
- fixes #
33+
34+
#### Special notes for your reviewer:
35+
36+
#### Checklist
37+
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
38+
- [ ] Chart Version bumped
39+
- [ ] Variables are documented in the README.md
40+
- [ ] Title of the PR starts with chart name (e.g. `[mychartname]`)

CHART_TESTING.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Charts Testing
2+
3+
## Pull Request Testing
4+
5+
Pull request testing is done by running [Helm's Chart Testing Action](https://github.com/helm/chart-testing) automatically.
6+
It will lint the chart and install it in a cluster created using [Kubernetes in Docker (KIND)](https://github.com/kubernetes-sigs/kind).
7+
8+
### Procedure
9+
10+
The Helm's Chart Testing Action will run the [ct lint-and-install](https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md) command.
11+
This is the main logic for validation of a pull request. It intends to only test charts that have changed in this PR.
12+
13+
The testing logic has been extracted to the [chart-testing](https://github.com/helm/chart-testing) project. A go library provides the required logic to lint, install, and test charts.
14+
It is provided as a Docker image and can be run by anyone on their own charts.
15+
16+
### Providing Custom Test Values
17+
18+
Testing charts with default values may not be suitable in all cases. For instance, charts may require some values to be set which should not be part of the chart's default `values.yaml` (such as keys etc.). Furthermore, it is often desirable to test a chart with different configurations, reflecting different use cases (e.g. setting a password instead of using the default generated one, activating persistence instead of using the default emptyDir volume, etc.).
19+
20+
In order to enable custom test values, create a directory `ci` in the chart's directory and add any number of `*-values.yaml` files to this directory. Only files with a suffix `-values.yaml` are considered. Instead of using the defaults, the chart is then installed and tested separately for each of these files using the `--values` flag.
21+
22+
Please note that in order to test using the default values when using the `ci` directory, an empty values file must be present in the directory.
23+
24+
For examples, you can take a look at existing tests in this repository (e.g. [Simple Nginx chart](charts/simple-nginx)).
25+
26+
Please also note that it is a different concept than "[Helm Chart Test](https://github.com/helm/helm/blob/master/docs/chart_tests.md)", although the Helm Chart test, if defined, will be run by this test tool for each test values.

CODEOWNERS

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
# NOTE: Github still doesn't support nested code owners.
55
# Owners for charts go below this line using the following format:
66
# charts/<CHART_NAME>/* @<GITHUB_USER>
7+
8+
# Simple nginx chart for testing purposes
9+
10+
charts/simple-nginx/* @douglascamata

CONTRIBUTING.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributing Guidelines
2+
3+
The Kubernetes Charts project accepts contributions via GitHub pull requests. This document outlines the process to help get your contribution accepted.
4+
5+
## Contributor's License Agreement (CLA)
6+
7+
To be able to contribute to the New Relic Helm charts repository you have to sign a CLA.
8+
The CLA signature process is handled by a bot and is presented to the contributor as a
9+
check in the pull request.
10+
11+
If you didn't sign the CLA yet, follow the procedures in the comment of the bot to do
12+
so.
13+
14+
## How to contribute to an existing chart
15+
16+
1. Fork this repository, develop and test your chart's changes.
17+
1. Ensure your Chart changes follow the [technical](#technical-requirements) and [documentation](#documentation-requirements) guidelines, described below.
18+
1. Submit a pull request.
19+
1. Automated builds will run for testing and linting.
20+
1. A code review will automaticallly be requested by the owners of the chart.
21+
1. The PR is reviewed, merged and the chart is automatically released.
22+
23+
***NOTE***: In order to make testing and merging of PRs easier, please submit changes to multiple charts in separate PRs.
24+
25+
### Technical requirements
26+
27+
* All Chart dependencies should also be submitted independently
28+
* Must pass the linter (`helm lint`)
29+
* Must successfully launch with default values (`helm install .`)
30+
* All pods go to the running state (or NOTES.txt provides further instructions if a required value is missing).
31+
* All services have at least one endpoint
32+
* Must include source GitHub repositories for images used in the Chart
33+
* Images should not have any major security vulnerabilities
34+
* Must be up-to-date with the latest stable Helm/Kubernetes features
35+
* Use Deployments in favor of ReplicationControllers
36+
* Should follow Kubernetes best practices
37+
* Include Health Checks wherever practical
38+
* Allow configurable [resource requests and limits](http://kubernetes.io/docs/user-guide/compute-resources/#resource-requests-and-limits-of-pod-and-container)
39+
* Provide a method for data persistence (if applicable)
40+
* Support application upgrades
41+
* Allow customization of the application configuration
42+
* Provide a secure default configuration
43+
* Do not leverage alpha features of Kubernetes
44+
* Includes a [NOTES.txt](https://helm.sh/docs/topics/charts/#chart-license-readme-and-notes) explaining how to use the application after install
45+
* Follows [best practices](https://helm.sh/docs/chart_best_practices/)
46+
(especially for [labels](https://helm.sh/docs/chart_best_practices/labels/)
47+
and [values](https://helm.sh/docs/chart_best_practices/values/))
48+
49+
### Documentation requirements
50+
51+
* Must include an in-depth `README.md`, including:
52+
* Short description of the Chart
53+
* Any prerequisites or requirements
54+
* Customization: explaining options in `values.yaml` and their defaults
55+
* Must include a short `NOTES.txt`, including:
56+
* Any relevant post-installation information for the Chart
57+
* Instructions on how to access the application or service provided by the Chart
58+
59+
### Pull request approval and release process
60+
61+
A Github Action will run to lint and test the chart's installation. More information abouut it
62+
can be found in the [Chart Testing documentation](CHART_TESTING.md).
63+
64+
A maintainer of the chart will review the changes and eventually approve them. Any change requires at least one review.
65+
No pull requests can be merged until at least one maintainer reviews it. A good guide for what to review
66+
can be found in the [Review Guidelines](REVIEW_GUIDELINES.md).
67+
68+
Once the Chart has been merged, the release will be automatically made by a Github Workflwo using the Github Pages of this repository.
69+
70+
## Support Channels
71+
72+
Whether you are a user or contributor, official support channels include:
73+
74+
- GitHub issues: https://github.com/newrelic-experimental/charts/issues
75+
76+
Before opening a new issue or submitting a new pull request, it's helpful to search the project - it's likely that another user has already reported the issue you're facing, or it's a known issue that we're already aware of.

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# New Relic Helm charts repository
2+
3+
This repository intends to host official Helm charts for New Relic's products or other charts developed by New Relic.
4+
5+
## Developing a chart
6+
7+
You can use the Helm CLI to develop a chart in this repository.
8+
9+
1. [Install Helm](https://helm.sh/docs/intro/install/)
10+
1. Add/modify the files for the desired chart
11+
1. Run `helm install dev-chart charts/<YOUR_CHART>` to install it locally.
12+
Feel free to add different values to the chart if you wish so.
13+
1. Verify if the chart works as expected.
14+
1. Remove the installed chart with `helm uninstall dev-chart`.
15+
1. Create your pull request and follow the instructions below.
16+
17+
### Contributing
18+
19+
Please view [our contributing docs](CONTRIBUTING.md) for more information.
20+
21+

0 commit comments

Comments
 (0)