Skip to content

Commit d870fd9

Browse files
authored
Add support for Helm chart linting and releasing. (#46)
* - Added support for the Helm chart testing action. - Added support for the Helm chart releaser action. - Fixed minor lint issues in Helm chart values files. Signed-off-by: Michael Primeaux <[email protected]> * Added support for testing in addition to linting. Signed-off-by: Michael Primeaux <[email protected]> * - Relaxed event triggers on GitHub actions workflow for lint and test. - Now using `ubuntu-latest` for GitHub runner references. - Added `maintainers` to all charts. - Incremented patch version for each chart. Signed-off-by: Michael Primeaux <[email protected]> * - Added title for Installation Signed-off-by: Michael Primeaux <[email protected]> * - Added missing helm update step in installation. Signed-off-by: Michael Primeaux <[email protected]>
1 parent 5fd1ba8 commit d870fd9

File tree

10 files changed

+502
-24
lines changed

10 files changed

+502
-24
lines changed

.github/workflows/lint-test.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Lint and Test Charts
2+
3+
on: pull_request
4+
5+
jobs:
6+
lint-test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Install Helm
15+
uses: azure/[email protected]
16+
with:
17+
version: v3.7.0
18+
19+
- uses: actions/setup-python@v2
20+
with:
21+
python-version: '3.8'
22+
23+
- name: Install chart-testing
24+
uses: helm/[email protected]
25+
26+
- name: Run chart-testing (list-changed)
27+
id: list-changed
28+
run: |
29+
changed=$(ct list-changed --config ct.yaml)
30+
if [[ -n "$changed" ]]; then
31+
echo "::set-output name=changed::true"
32+
fi
33+
34+
- name: Run chart-testing (lint)
35+
run: ct lint --config ct.yaml
36+
37+
- name: Create kind cluster
38+
uses: helm/[email protected]
39+
if: steps.list-changed.outputs.changed == 'true'
40+
41+
# See https://github.com/helm/chart-testing/blob/main/doc/ct_install.md
42+
- name: Run chart-testing (install)
43+
run: ct install --config ct.yaml --debug

.github/workflows/release.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Configure Git
18+
run: |
19+
git config user.name "$GITHUB_ACTOR"
20+
git config user.email "[email protected]"
21+
22+
- name: Install Helm
23+
uses: azure/setup-helm@v1
24+
with:
25+
version: v3.7.0
26+
27+
# See https://github.com/helm/chart-releaser
28+
# See https://github.com/helm/chart-releaser-action
29+
- name: Run chart-releaser
30+
uses: helm/[email protected]
31+
env:
32+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# macOS
2+
.DS_Store
3+
4+
# Windows
5+
Thumbs.db

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212

1313
A community repository for Helm Charts of OpenSearch Project.
1414

15+
## Installation
16+
17+
```shell
18+
helm repo add opensearch https://opensearch-project.github.io/helm-charts/
19+
helm repo update
20+
helm search repo opensearch
21+
```
22+
23+
## Status
24+
25+
![Testing](https://github.com/opensearch-project/helm-charts/workflows/Lint%20and%20Test%20Charts/badge.svg)
26+
![Release](https://github.com/opensearch-project/helm-charts/workflows/Release%20Charts/badge.svg)
27+
1528
## Contributing
1629

1730
See [developer guide](DEVELOPER_GUIDE.md) and [how to contribute to this project](CONTRIBUTING.md).

charts/opensearch-dashboards/Chart.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.0
18+
version: 1.0.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
2424
appVersion: "1.0.0"
25+
26+
maintainers:
27+
- name: DandyDeveloper
28+
- name: gaiksaya
29+
- name: peternied
30+
- name: peterzhuamazon
31+
- name: TheAlgo

charts/opensearch-dashboards/values.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ securityContext:
5959
runAsUser: 1000
6060

6161
config: {}
62-
## Default OpenSearch Dashboards configuration from docker image of Dashboards
62+
# Default OpenSearch Dashboards configuration from docker image of Dashboards
6363
# opensearch_dashboards.yml:
6464
# server:
6565
# name: dashboards
6666
# host: 0.0.0.0
6767

68-
## Dashboards TLS Config (Ensure the cert files are present before enabling SSL
68+
# Dashboards TLS Config (Ensure the cert files are present before enabling SSL
6969
# ssl:
7070
# enabled: true
7171
# key: /usr/share/opensearch-dashboards/certs/dashboards-key.pem
@@ -75,7 +75,7 @@ config: {}
7575
# opensearch:
7676
# ssl:
7777
# certificateAuthorities: /usr/share/opensearch-dashboards/certs/dashboards-root-ca.pem
78-
# if utilizing custom CA certs for connection to opensearch, provide the CA here
78+
# if utilizing custom CA certs for connection to opensearch, provide the CA here
7979

8080
priorityClassName: ""
8181

@@ -87,10 +87,10 @@ opensearchAccount:
8787
labels: {}
8888

8989
hostAliases: []
90-
#- ip: "127.0.0.1"
91-
# hostnames:
92-
# - "foo.local"
93-
# - "bar.local"
90+
# - ip: "127.0.0.1"
91+
# hostnames:
92+
# - "foo.local"
93+
# - "bar.local"
9494

9595
serverHost: "0.0.0.0"
9696

charts/opensearch/Chart.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.0
18+
version: 1.0.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
2424
appVersion: "1.0.0"
25+
26+
maintainers:
27+
- name: DandyDeveloper
28+
- name: gaiksaya
29+
- name: peternied
30+
- name: peterzhuamazon
31+
- name: TheAlgo

0 commit comments

Comments
 (0)