-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete MVP for Helm Chart
- Loading branch information
Showing
14 changed files
with
247 additions
and
108 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Chart | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: master | ||
paths: | ||
- 'deploy/charts/**' | ||
- '!deploy/charts/secret-manager/README.md.gotmpl' | ||
jobs: | ||
lint-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout secret-manger | ||
uses: actions/checkout@v2 | ||
- name: Fetch history | ||
run: | | ||
git fetch --prune --unshallow; | ||
echo ::set-env name=commitmsg::$(git log --format=%B -n 1 ${{ github.event.after }}) | ||
- name: Fix appversion for tests | ||
run: | | ||
LASTTAG=$(git describe --abbrev=0 --tags) | ||
sed -i "s/0.0.0/${LASTTAG#v}/" deploy/charts/secret-manager/Chart.yaml | ||
- name: lint | ||
id: lint | ||
uses: helm/[email protected] | ||
if: "! contains(env.commitmsg, '[skip chart-lint]')" | ||
with: | ||
command: lint | ||
config: deploy/charts/ct.yaml | ||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
if: "steps.lint.outputs.changed == 'true' && ! contains(env.commitmsg, '[skip chart-install]')" | ||
- name: test | ||
uses: helm/[email protected] | ||
if: "steps.lint.outputs.changed == 'true' && ! contains(env.commitmsg, '[skip chart-install]')" | ||
with: | ||
command: install | ||
config: deploy/charts/ct.yaml | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: lint-and-test | ||
if: "github.event_name != 'pull_request'" | ||
steps: | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name "${{ env.GHCR_USERNAME }}" | ||
git config --global user.email "${{ env.GHCR_USERNAME }}@users.noreply.github.com" | ||
- name: Checkout secret-manger | ||
uses: actions/checkout@v2 | ||
with: | ||
path: secret-manager | ||
- name: Checkout Chart Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ env.GHCR_PASSWORD }} | ||
repository: "itscontained/charts" | ||
ref: gh-pages | ||
path: charts | ||
- name: Install Helm | ||
run: | | ||
curl -fsSLo get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | ||
chmod 700 get_helm.sh | ||
./get_helm.sh | ||
- name: Install chart-releaser | ||
run: | | ||
wget https://github.com/helm/chart-releaser/releases/download/v1.0.0/chart-releaser_1.0.0_linux_amd64.tar.gz | ||
tar xzvf chart-releaser_1.0.0_linux_amd64.tar.gz cr | ||
- name: Copy CRDs to chart | ||
run: | | ||
cd secret-manager | ||
make crds-to-chart | ||
- name: Generate Helm README | ||
run: | | ||
make helm-docs | ||
cd ../ | ||
- name: Release Chart | ||
run: | | ||
sed -i 's/0.0.0/${GITHUB_REF#refs/tags/v}/' deploy/charts/secret-manager/Chart.yaml | ||
helm package secret-manager/deploy/charts/secret-manager/ --destination .cr-release-packages | ||
./cr upload -t ${GITHUB_PAT} && ./cr index | ||
cd charts/ && git add . && git commit -m "release chart" && git push | ||
env: | ||
CR_CHARTS_REPO: "https://charts.itscontained.io" | ||
CR_INDEX_PATH: "charts/index.yaml" | ||
CR_OWNER: "itscontained" | ||
CR_GIT_REPO: "charts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
helm-extra-args: --timeout 600s | ||
chart-dirs: | ||
- deploy/charts | ||
chart-repos: | ||
- itscontained=https://charts.itscontained.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
.idea/ | ||
*.tmproj | ||
.vscode/ | ||
README.md.gotmpl | ||
|
||
# CRD README.md | ||
templates/crds/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
apiVersion: v2 | ||
name: secret-manager | ||
description: External secret management for Kubernetes. | ||
description: External secret management for Kubernetes | ||
type: application | ||
version: 0.1.0 | ||
appVersion: 0.1.0 | ||
appVersion: 0.0.0 | ||
keywords: | ||
- kubernetes | ||
- secret | ||
- secretstore | ||
- secret-management | ||
- vault | ||
- aws | ||
- azure | ||
- crd | ||
home: https://github.com/itscontained/secret-manager | ||
sources: | ||
- https://github.com/itscontained/secret-manager | ||
- https://hub.docker.com/r/itscontained/secret-manager | ||
- https://quay.io/repository/itscontained/secret-manager | ||
- https://github.com/orgs/itscontained/packages/container/secret-manager | ||
maintainers: | ||
- name: DirtyCajunRice | ||
email: [email protected] | ||
- name: mcavoyk | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
approvers: | ||
- DirtyCajunRice | ||
- mcavoyk | ||
reviewers: | ||
- DirtyCajunRice | ||
- mcavoyk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{- $valuesYAML := "https://github.com/itscontained/secret-manager/blob/master/deploy/charts/secret-manager/values.yaml" -}} | ||
{{- $chartRepo := "https://charts.itscontained.io" -}} | ||
{{- $org := "itscontained" -}} | ||
{{ template "chart.header" . }} | ||
{{ template "chart.typeBadge" . }}{{ template "chart.versionBadge" . }}{{ template "chart.appVersionBadge" . }} | ||
|
||
{{ template "chart.description" . }} | ||
|
||
## TL;DR | ||
```console | ||
$ helm repo add {{ $org }} {{ $chartRepo }} | ||
$ helm install {{ $org }}/{{ template "chart.name" . }} | ||
``` | ||
|
||
## Installing the Chart | ||
To install the chart with the release name `{{ template "chart.name" . }}`: | ||
```console | ||
helm install {{ template "chart.name" . }} {{ $org }}/{{ template "chart.name" . }} | ||
``` | ||
|
||
## Uninstalling the Chart | ||
To uninstall the `{{ template "chart.name" . }}` deployment: | ||
```console | ||
helm uninstall {{ template "chart.name" . }} | ||
``` | ||
The command removes all the Kubernetes components associated with the chart and deletes the release. | ||
|
||
## Configuration | ||
Read through the {{ template "chart.name" . }} [values.yaml]({{ $valuesYAML }}) | ||
file. It has several commented out suggested values. | ||
|
||
{{ template "chart.valuesSection" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.