Skip to content

Commit

Permalink
Add support for Helm chart linting and releasing. (#46)
Browse files Browse the repository at this point in the history
* - 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 <michael.primeaux@mac.com>

* Added support for testing in addition to linting.

Signed-off-by: Michael Primeaux <michael.primeaux@mac.com>

* - 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 <michael.primeaux@mac.com>

* - Added title for Installation

Signed-off-by: Michael Primeaux <michael.primeaux@mac.com>

* - Added missing helm update step in installation.

Signed-off-by: Michael Primeaux <michael.primeaux@mac.com>
  • Loading branch information
mprimeaux committed Sep 21, 2021
1 parent 5fd1ba8 commit d870fd9
Show file tree
Hide file tree
Showing 10 changed files with 502 additions and 24 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Lint and Test Charts

on: pull_request

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install Helm
uses: azure/setup-helm@v1.1
with:
version: v3.7.0

- uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install chart-testing
uses: helm/chart-testing-action@v2.1.0

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml

- name: Create kind cluster
uses: helm/kind-action@v1.2.0
if: steps.list-changed.outputs.changed == 'true'

# See https://github.com/helm/chart-testing/blob/main/doc/ct_install.md
- name: Run chart-testing (install)
run: ct install --config ct.yaml --debug
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Charts

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.7.0

# See https://github.com/helm/chart-releaser
# See https://github.com/helm/chart-releaser-action
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.1
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# macOS
.DS_Store

# Windows
Thumbs.db
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@

A community repository for Helm Charts of OpenSearch Project.

## Installation

```shell
helm repo add opensearch https://opensearch-project.github.io/helm-charts/
helm repo update
helm search repo opensearch
```

## Status

![Testing](https://github.com/opensearch-project/helm-charts/workflows/Lint%20and%20Test%20Charts/badge.svg)
![Release](https://github.com/opensearch-project/helm-charts/workflows/Release%20Charts/badge.svg)

## Contributing

See [developer guide](DEVELOPER_GUIDE.md) and [how to contribute to this project](CONTRIBUTING.md).
Expand Down
9 changes: 8 additions & 1 deletion charts/opensearch-dashboards/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.0"

maintainers:
- name: DandyDeveloper
- name: gaiksaya
- name: peternied
- name: peterzhuamazon
- name: TheAlgo
14 changes: 7 additions & 7 deletions charts/opensearch-dashboards/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ securityContext:
runAsUser: 1000

config: {}
## Default OpenSearch Dashboards configuration from docker image of Dashboards
# Default OpenSearch Dashboards configuration from docker image of Dashboards
# opensearch_dashboards.yml:
# server:
# name: dashboards
# host: 0.0.0.0

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

priorityClassName: ""

Expand All @@ -87,10 +87,10 @@ opensearchAccount:
labels: {}

hostAliases: []
#- ip: "127.0.0.1"
# hostnames:
# - "foo.local"
# - "bar.local"
# - ip: "127.0.0.1"
# hostnames:
# - "foo.local"
# - "bar.local"

serverHost: "0.0.0.0"

Expand Down
9 changes: 8 additions & 1 deletion charts/opensearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.0"

maintainers:
- name: DandyDeveloper
- name: gaiksaya
- name: peternied
- name: peterzhuamazon
- name: TheAlgo
Loading

0 comments on commit d870fd9

Please sign in to comment.