Skip to content

Commit 9905dcc

Browse files
jmeridthjsoref
andauthored
fix(argo-cd): Update CONTRIBUTING docs (argoproj#1782)
* Update CONTRIBUTING - [x] versioning details - [x] remove broken links - [x] fix markdown linting errors - [x] README.md updating clarification * Rename variable in helm-docs script * Update argo-cd README * Add blurb about mandatory Chart versioning * Reword artifacthub changes section in CONTRIBUTING * Reorder/restructure CONTRIBUTING.md * Update argo-cd chart version * Add section in CONTRIBUTING about semantic title linting Signed-off-by: jmeridth <[email protected]> Co-authored-by: Josh Soref <[email protected]>
1 parent 45c1534 commit 9905dcc

File tree

5 files changed

+85
-60
lines changed

5 files changed

+85
-60
lines changed

CONTRIBUTING.md

Lines changed: 74 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,87 @@
22

33
Argo Helm is a collection of **community maintained** charts. Therefore we rely on you to test your changes sufficiently.
44

5-
6-
# Pull Requests
5+
## Pull Requests
76

87
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests. See the above stated requirements for PR on this project.
98

9+
### Pull Request Title Linting
10+
11+
We lint the title of your pull request to ensure it follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. This is done using GitHub actions and the [action-semantic-pull-request](.github/workflows/pr-title.yml) workflow. We require the scope of the change to be included in the title. The scope should be the name of the chart you are changing. For example, if you are changing the `argo-cd` chart, the title of your pull request should be `fix(argo-cd): Fix typo in values.yaml`.
12+
13+
## Documentation
14+
15+
The documentation for each chart is generated with [helm-docs](https://github.com/norwoodj/helm-docs). This way we can ensure that values are consistent with the chart documentation.
16+
17+
We have a script on the repository which will execute the helm-docs docker container, so that you don't have to worry about downloading the binary etc. Simply execute the script (Bash compatible, might require sudo privileges):
18+
19+
```shell
20+
./scripts/helm-docs.sh
21+
```
22+
23+
> **Note**
24+
> When creating your own `README.md.gotmpl`, don't forget to add it to your `.helmignore` file.
25+
26+
### Updating a chart README.md
27+
28+
When updating the `README.md.gotmpl` inside a chart directory you must to run the `helm-docs` script to generate the updated `README.md` file. To reiterate, you should not edit the `README.md` file manually. It will be generated by the following command:
29+
30+
```shell
31+
./scripts/helm-docs.sh
32+
```
33+
34+
> **Note**
35+
> If you see changes to unrelated chart `README.md` files you may have accidentally updated a `README.md.gotmpl` file in another chart's folder unintentionally or someone else failed to run this script. Please revert those changes if you do not intend them to be a part of your pull request.
36+
1037
## Versioning
1138

12-
Each chart's version follows the [semver standard](https://semver.org/). New charts should start at version `1.0.0`, if it's considered stable. If it's not considered stable, it must be released as [prerelease](#prerelease).
39+
Each chart's version follows the [semver standard](https://semver.org/).
40+
41+
New charts should start at version `1.0.0`, if it's considered stable. If it isn't considered stable, it must be released as `prerelease`.
1342

1443
Any breaking changes to a chart (backwards incompatible) require:
1544

16-
* Bump of the current Major version of the chart
17-
* State possible manual changes for this chart version in the `Upgrading` section of the chart's `README.md.gotmpl` ([See Upgrade](#upgrades))
45+
* Bump of the current Major version of the chart
46+
* State possible manual changes for this chart version in the `Upgrading` section of the chart's `README.md.gotmpl`
47+
48+
### New Application Versions
49+
50+
When selecting new application versions ensure you make the following changes:
51+
52+
* `values.yaml`: Bump all instances of the container image version
53+
* `Chart.yaml`: Ensure `appVersion` matches the above container image and bump `version`
54+
55+
Please ensure chart version changes adhere to semantic versioning standards:
56+
57+
* Major: Large chart rewrites, major non-backwards compatible or destructive changes
58+
* Minor: New chart functionality (sidecars), major application updates or minor non-backwards compatible changes
59+
* Patch: App version patch updates, backwards compatible optional chart features
1860

1961
### Immutability
2062

2163
Each release for each chart 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.
2264

65+
### Chart Versioning
66+
67+
Currently we require a chart version bump for every change to a chart, including updating information for older verions. This may change in the future.
2368

2469
### Artifact Hub Annotations
2570

2671
Since we release our charts on Artifact Hub we encourage making use of the provided chart annotations for Artifact Hub.
2772

28-
* [https://artifacthub.io/docs/topics/annotations/helm/](https://artifacthub.io/docs/topics/annotations/helm/)
73+
* [https://artifacthub.io/docs/topics/annotations/helm/](https://artifacthub.io/docs/topics/annotations/helm/)
2974

3075
#### Changelog
3176

3277
We want to deliver transparent chart releases for our chart consumers. Therefore we require a changelog per new chart release.
3378

34-
Changes on a chart must be documented in a chart specific changelog in the `Chart.yaml` [Annotation Section](https://helm.sh/docs/topics/charts/#the-chartyaml-file). For every new release the entire `artifacthub.io/changes` needs to be rewritten. Each change requires a new bullet point following the pattern `- "[{type}]: {description}"`. You can use the following template:
79+
Changes on a chart must be documented in a chart specific changelog in the `Chart.yaml` [Annotation Section](https://helm.sh/docs/topics/charts/#the-chartyaml-file).
3580

36-
```
81+
A new `artifacthub.io/changes` needs to be written covering only the changes since the previous release.
82+
83+
Each change requires a new bullet point following the pattern `- "[{type}]: {description}"`. You can use the following template:
84+
85+
```yaml
3786
name: argo-cd
3887
version: 3.4.1
3988
...
@@ -45,67 +94,54 @@ annotations:
4594
- "[Deprecated]: Something deprecated"
4695
- "[Removed]: Something was removed"
4796
- "[Fixed]: Something was fixed"
48-
- "[Security]": Some Security Patch was included"
97+
- "[Security]: Some Security Patch was included"
4998
```
5099
51-
## Documentation
52-
53-
The documentation for each chart is done with [helm-docs](https://github.com/norwoodj/helm-docs). This way we can ensure that values are consistent with the chart documentation.
100+
## Testing
54101
55-
We have a script on the repository which will execute the helm-docs docker container, so that you don't have to worry about downloading the binary etc. Simply execute the script (Bash compatible, might require sudo privileges):
56-
57-
```
58-
bash scripts/helm-docs.sh
59-
```
60-
61-
**NOTE**: When creating your own `README.md.gotmpl`, don't forget to add it to your `.helmignore` file.
62-
63-
64-
65-
# Testing
66-
67-
## Testing Argo Workflows Changes
102+
### Testing Argo Workflows Changes
68103
69104
Minimally:
70105
71-
```
106+
```shell
72107
helm install charts/argo-workflows -n argo
73108
argo version
74109
```
75110

76111
Follow this instructions for running a hello world workflow.
77112

78-
## Testing Argo CD Changes
113+
### Testing Argo CD Changes
79114

80115
Clean-up:
81116

82-
```
117+
```shell
83118
helm delete argo-cd --purge
84119
kubectl delete crd -l app.kubernetes.io/part-of=argocd
85120
```
86121

87122
Pre-requisites:
88-
```
123+
124+
```shell
89125
helm repo add redis-ha https://dandydeveloper.github.io/charts/
90126
helm dependency update
91127
```
92128

93129
Minimally:
94130

95-
```
131+
```shell
96132
helm install argocd argo/argo-cd -n argocd --create-namespace
97133
kubectl port-forward service/argo-cd-argocd-server -n argocd 8080:443
98134
```
99135

100136
In a new terminal:
101137

102-
```
138+
```shell
103139
argocd version --server localhost:8080 --insecure
104140
# reset password to 'Password1!'
105141
kubectl -n argocd patch secret argocd-secret \
106142
-p '{"stringData": {
107-
"admin.password": "$2a$10$hDj12Tw9xVmvybSahN1Y0.f9DZixxN8oybyA32Uy/eqWklFU4Mo8O",
108-
"admin.passwordMtime": "'$(date +%FT%T%Z)'"
143+
"admin.password": "$2a$10$hDj12Tw9xVmvybSahN1Y0.f9DZixxN8oybyA32Uy/eqWklFU4Mo8O",
144+
"admin.passwordMtime": "'$(date +%FT%T%Z)'"
109145
}}'
110146
argocd login localhost:8080 --username admin --password 'Password1!'
111147

@@ -114,38 +150,25 @@ argocd login localhost:8080 --username admin --password 'Password1!'
114150

115151
Create and sync app:
116152

117-
```
153+
```shell
118154
argocd app create guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --path guestbook --project default --repo https://github.com/argoproj/argocd-example-apps.git
119155
argocd app sync guestbook
120156
```
121157

122-
## New Application Versions
123-
124-
When raising application versions ensure you make the following changes:
125-
126-
- `values.yaml`: Bump all instances of the container image version
127-
- `Chart.yaml`: Ensure `appVersion` matches the above container image and bump `version`
128-
129-
Please ensure chart version changes adhere to semantic versioning standards:
130-
131-
- Patch: App version patch updates, backwards compatible optional chart features
132-
- Minor: New chart functionality (sidecars), major application updates or minor non-backwards compatible changes
133-
- Major: Large chart rewrites, major non-backwards compatible or destructive changes
134-
135-
## Testing Charts
158+
### Testing Charts
136159

137160
As part of the Continuous Integration system we run Helm's [Chart Testing](https://github.com/helm/chart-testing) tool.
138161

139-
The checks for this tool are stricter than the standard Helm requirements, where fields normally considered optional like `maintainer` are required in the standard spec and must be valid GitHub usernames.
162+
The checks for Chart Testing are stricter than the standard Helm requirements. For example, fields normally considered optional like `maintainer` are required in the standard spec and must be valid GitHub usernames.
140163

141164
Linting configuration can be found in [ct-lint.yaml](./.github/configs/ct-lint.yaml)
142165

143166
The linting can be invoked manually with the following command:
144167

145-
```
168+
```shell
146169
./scripts/lint.sh
147170
```
148171

149172
## Publishing Changes
150173

151-
Changes are automatically publish whenever a commit is merged to main. The CI job (see `./.github/workflows/publish.yml`).
174+
Changes are automatically publish whenever a commit is merged to the `main` branch by the CI job (see `./.github/workflows/publish.yml`).

charts/argo-cd/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ appVersion: v2.5.7
33
kubeVersion: ">=1.22.0-0"
44
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
55
name: argo-cd
6-
version: 5.18.0
6+
version: 5.18.1
77
home: https://github.com/argoproj/argo-helm
88
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
99
sources:
@@ -23,4 +23,4 @@ dependencies:
2323
condition: redis-ha.enabled
2424
annotations:
2525
artifacthub.io/changes: |
26-
- "[Added]: Extra secret labels with .Values.configs.secret.labels"
26+
- "[Fixed]: README information about 5.12.0 TLS changes"

charts/argo-cd/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ This version reduces history limit for Argo CD deployment replicas to 3 to provi
111111

112112
### 5.12.0
113113

114-
This version deprecates the `configs.secret.argocdServerTlsConfig` option. Use `server.certificate` or `server.certificateSecret` to provide custom TLS configuration for Argo CD server.
115-
If you terminate TLS on ingress please use `argocd-server-tls` secret instead of `argocd-secret` secret.
114+
If Argo CD is managing termination of TLS and you are using `configs.secret.argocdServerTlsConfig` option to provide custom TLS configuration for this chart, please use `server.certificate` or `server.certificateSecret` instead.
115+
For the secrets for tls termination, please use a secret named `argocd-server-tls` instead of `argocd-secret`.
116+
For the technical details please check the [Argo CD documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/tls/#tls-certificates-used-by-argocd-server). When transitioning from the one secret to the other pay attention to `tls.key` and `tls.crt` keys.
116117

117118
### 5.10.0
118119

charts/argo-cd/README.md.gotmpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ This version reduces history limit for Argo CD deployment replicas to 3 to provi
110110

111111
### 5.12.0
112112

113-
This version deprecates the `configs.secret.argocdServerTlsConfig` option. Use `server.certificate` or `server.certificateSecret` to provide custom TLS configuration for Argo CD server.
114-
If you terminate TLS on ingress please use `argocd-server-tls` secret instead of `argocd-secret` secret.
113+
If Argo CD is managing termination of TLS and you are using `configs.secret.argocdServerTlsConfig` option to provide custom TLS configuration for this chart, please use `server.certificate` or `server.certificateSecret` instead.
114+
For the secrets for tls termination, please use a secret named `argocd-server-tls` instead of `argocd-secret`.
115+
For the technical details please check the [Argo CD documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/tls/#tls-certificates-used-by-argocd-server). When transitioning from the one secret to the other pay attention to `tls.key` and `tls.crt` keys.
115116

116117
### 5.10.0
117118

scripts/helm-docs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
## Reference: https://github.com/norwoodj/helm-docs
33
set -eux
4-
CHART_DIR="$(cd "$(dirname "$0")/.." && pwd)"
5-
echo "$CHART_DIR"
4+
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
5+
echo "$REPO_ROOT"
66

77
echo "Running Helm-Docs"
88
docker run \
9-
-v "$CHART_DIR:/helm-docs" \
9+
-v "$REPO_ROOT:/helm-docs" \
1010
-u $(id -u) \
1111
jnorwood/helm-docs:v1.9.1

0 commit comments

Comments
 (0)