Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/linters/ct.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://github.com/helm/chart-testing#configuration
additional-commands:
- sh -ec "if [ -f '{{ .Path }}/ci/lint.sh' ]; then shellcheck '{{ .Path }}/ci/lint.sh'; bash '{{ .Path }}/ci/lint.sh'; fi"
- helm unittest --strict --file 'unittests/**/*.yaml' {{ .Path }}
- helm unittest --strict --file 'tests/**/*.yaml' {{ .Path }}
chart-dirs:
- charts
chart-repos:
Expand Down
14 changes: 12 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,20 @@ Charts should start at `1.0.0`. Any breaking (backwards incompatible) changes to

### Generate readme

The readme of each chart can be re-generated with the following command (run inside the chart directory):
Some (not all) charts make use of [helm-docs](https://github.com/jnorwood/helm-docs) which is a tool for programatically generating the `README.md` file. If the chart you are modifying contains a `README.md.gotmpl` file, then you should run the following command before committing your change.

From the repository root:

```shell
make helm-docs
```

### Unit Tests

Charts can include [helm-unittest](https://github.com/helm-unittest/helm-unittest) tests under a `tests/` directory. To run all chart unit tests from the repository root:

```shell
docker run --rm --volume "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.14.2
make helm-unittest
```

### Community Requirements
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))

# renovate: docker=helmunittest/helm-unittest
HELM_UNITTEST_TAG := 3.19.0-1.0.3
# renovate: docker=jnorwood/helm-docs
HELM_DOCS_TAG := v1.14.2

.PHONY: helm-unittest
helm-unittest:
docker run --rm -v $(MAKEFILE_DIR):/apps helmunittest/helm-unittest:$(HELM_UNITTEST_TAG) --strict --file 'tests/**/*.yaml' charts/*

.PHONY: helm-docs
helm-docs:
docker run --rm -v $(MAKEFILE_DIR):/helm-docs -u $(shell id -u) jnorwood/helm-docs:$(HELM_DOCS_TAG) --chart-search-root=charts
47 changes: 15 additions & 32 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
{
"customType": "regex",
"managerFilePatterns": [
"/(^|/).+\\.(py|yaml)$/"
"/(^|/).+\\.(py|yaml)$/",
"/(^|/)Makefile$/"
],
"matchStrings": [
"[\\t ]*(?:#|//) ?renovate: (?<datasource>git-refs)=(?<depName>\\S+)(?: branch=(?<currentValue>\\S+))?[\\t ]*\\r?\\n.+?[:=][\\t ]*[\"']?(?<currentDigest>[a-f0-9]+)[\"']?",
Expand Down Expand Up @@ -68,6 +69,19 @@
"schedule": null,
"labels": ["dependencies", "dependencies/auto-merge"]
},
{
"enabled": true,
"matchFileNames": [
"Makefile"
],
"commitMessagePrefix": "[CI] ",
"groupName": "Makefile dependency updates",
"matchPackageNames": [
"*"
],
"schedule": null,
"labels": ["dependencies", "dependencies/auto-merge"]
},
{
"enabled": true,
"matchFileNames": [
Expand Down Expand Up @@ -106,37 +120,6 @@
"* 14-17 * * 2,5"
]
},
{
"description": "Prometheus Operator minor updates should result in a major bump of the chart version.",
"enabled": true,
"matchFileNames": [
"charts/prometheus-operator-crds/**"
],
"matchPackageNames": [
"prometheus-operator/prometheus-operator"
],
"bumpVersions": [
{
"name": "Updating Chart version",
"filePatterns": ["/^({{#each (distinct (lookupArray upgrades \"packageFileDir\"))}}{{{lookup (split . \"/\") 0}}}/{{{lookup (split . \"/\") 1}}}{{#unless @last}}|{{/unless}}{{/each}})/Chart\\.ya?ml$/"],
"matchStrings": ["(?:^|\\n)version:\\s\"?(?<version>\\d+\\.\\d+\\.\\d+)\"?(?:$|\\n)"],
"bumpType": "{{#if (or isPinDigest isPatch)}}patch{{else}}major{{/if}}"
}
]
},
{
"description": "disable prometheus-operator major and minor updates for charts/kube-prometheus-stack",
"enabled": false,
"matchFileNames": [
"charts/kube-prometheus-stack/**"
],
"matchPackageNames": [
"prometheus-operator/prometheus-operator"
],
"matchUpdateTypes": [
"major", "minor"
]
},
{
"matchPackageNames": ["actions/python-versions", "python"],
"matchDepTypes": [
Expand Down
Loading