Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Publish helm chart using @helm/chart-releaser-action #774

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
39 changes: 39 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.4.1

# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
# yamllint (https://github.com/adrienverge/yamllint) which require Python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Set up chart-testing
uses: helm/[email protected]
with:
version: v3.3.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
35 changes: 35 additions & 0 deletions .github/workflows/release-helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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 "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.4.1


- name: Add dependency chart repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: helm/charts
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
8 changes: 8 additions & 0 deletions ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://github.com/helm/chart-testing#configuration
remote: origin
target-branch: main
chart-dirs:
- helm/charts
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
helm-extra-args: --timeout 600s
10 changes: 5 additions & 5 deletions helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ Due to the uniqueness of different users environments, this chart aims to cater

## TL;DR
```
❯ helm package .
❯ helm install opendistro-es-1.13.2.tgz --name opendistro-es
❯ helm repo add opendistro-build https://opendistro-for-elasticsearch.github.io/opendistro-build
❯ helm install opendistro-es opendistro-build/opendistro-es
```

## Installing the Chart
To install the chart with the release name `my-release`:

`❯ helm install --name my-release opendistro-es-1.13.2.tgz`
`❯ helm install opendistro-es opendistro-build/opendistro-es`

The command deploys OpenDistro Kibana and Elasticsearch with its associated components (data statefulsets, masters, clients) on the Kubernetes cluster in the default configuration.

## Uninstalling the Chart
To delete/uninstall the chart with the release name `my-release`:
To delete/uninstall the chart with the release name `opendistro-es`:
```
❯ helm delete --name opendistro-es
❯ helm del opendistro-es
```

### Notes About Default Installation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ engine: gotpl
kubeVersion: ^1.10.0-0
maintainers:
- email: [email protected]
name: Derek Heldt-Werle
name: DerekHeldtWerle
- email: [email protected]
name: Kalvin Chau
name: kalvinnchau
name: opendistro-es
sources:
- https://pages.git.viasat.com/ATG/charts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# @formatter:off
{{- if .Values.global.rbac.enabled }}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "opendistro-es.elasticsearch.serviceAccountName" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# @formatter:off
{{- if and .Values.global.rbac.enabled .Values.kibana.enabled }}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "opendistro-es.kibana.serviceAccountName" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ kibana:
existingCertSecretRootCASubPath: elk-rest-root-ca.pem



configDirectory: "/usr/share/kibana/config"
certsDirectory: "/usr/share/kibana/certs"

Expand Down Expand Up @@ -115,7 +114,6 @@ kibana:
# opendistro_security.cookie.password: ${COOKIE_PASS}



## Node labels for pod assignment
## ref: https://kubernetes.io/docs/user-guide/node-selection/
#
Expand Down Expand Up @@ -171,8 +169,8 @@ elasticsearch:
rolesSecret:
rolesMappingSecret:
tenantsSecret:
#The following option simplifies securityConfig by using a single secret and specifying the respective secrets in the corresponding files instead of creating different secrets for config,internal users, roles, roles mapping and tenants
#Note that this is an alternative to the above secrets and shouldn't be used if the above secrets are used
# The following option simplifies securityConfig by using a single secret and specifying the respective secrets in the corresponding files instead of creating different secrets for config,internal users, roles, roles mapping and tenants
# Note that this is an alternative to the above secrets and shouldn't be used if the above secrets are used
config:
securityConfigSecret:
data: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ kibana:
existingCertSecretRootCASubPath: elk-rest-root-ca.pem



configDirectory: "/usr/share/kibana/config"
certsDirectory: "/usr/share/kibana/certs"

Expand Down Expand Up @@ -115,7 +114,6 @@ kibana:
# opendistro_security.cookie.password: ${COOKIE_PASS}



## Node labels for pod assignment
## ref: https://kubernetes.io/docs/user-guide/node-selection/
#
Expand Down Expand Up @@ -169,8 +167,8 @@ elasticsearch:
rolesSecret:
rolesMappingSecret:
tenantsSecret:
#The following option simplifies securityConfig by using a single secret and specifying the respective secrets in the corresponding files instead of creating different secrets for config,internal users, roles, roles mapping and tenants
#Note that this is an alternative to the above secrets and shouldn't be used if the above secrets are used
# The following option simplifies securityConfig by using a single secret and specifying the respective secrets in the corresponding files instead of creating different secrets for config,internal users, roles, roles mapping and tenants
# Note that this is an alternative to the above secrets and shouldn't be used if the above secrets are used
config:
securityConfigSecret:
data: {}
Expand Down