Fix Workflows
This commit is contained in:
committed by
kjeld Schouten-Lebbing
parent
eb9bc1ba60
commit
e8414a2e8c
+2
-3
@@ -1,6 +1,5 @@
|
||||
owner: truecharts
|
||||
git-repo: charts
|
||||
index-path: docs/index.yaml
|
||||
git-repo: apps
|
||||
charts-dir: library
|
||||
charts_repo_url: "https://truecharts.org"
|
||||
pages-branch: ""
|
||||
pages-branch: "master"
|
||||
|
||||
@@ -36,182 +36,6 @@ jobs:
|
||||
run: |
|
||||
/bin/bash -c "PWD=${pwd}; /usr/local/bin/catalog_validate validate --path $PWD"
|
||||
|
||||
common-lint:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changed: ${{ steps.list-changed.outputs.changed }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
|
||||
- name: Run chart-testing (list-changed)
|
||||
id: list-changed
|
||||
run: |
|
||||
changed=$(ct list-changed --config .github/ct-lint.yaml --chart-dirs 'library')
|
||||
if [[ -n "$changed" ]]; then
|
||||
echo "::set-output name=changed::true"
|
||||
fi
|
||||
|
||||
- name: Run chart-testing (lint)
|
||||
id: lint
|
||||
if: steps.list-changed.outputs.changed == 'true'
|
||||
run: ct lint --config .github/ct-lint.yaml --chart-dirs 'library'
|
||||
|
||||
|
||||
common-test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: common-lint
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: prep
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
run: |
|
||||
rm -Rf library/common-test/values.yaml
|
||||
touch library/common-test/values.yaml
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
|
||||
- name: Create k3d cluster
|
||||
uses: nolar/setup-k3d-k3s@v1
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
with:
|
||||
version: v1.19
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
run: ct install --config .github/ct-install.yaml --charts 'library/common-test'
|
||||
|
||||
common-unittest:
|
||||
runs-on: ubuntu-latest
|
||||
needs: common-lint
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Dev tools
|
||||
run: sudo apt-get update && sudo apt-get install -y jq libjq-dev
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- name: Install Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.7
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export RUBYJQ_USE_SYSTEM_LIBRARIES=1
|
||||
bundle install
|
||||
- name: Run tests
|
||||
run: |
|
||||
bundle exec m -r .tools/tests/charts
|
||||
|
||||
pre-release:
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
needs: [common-test, common-unittest, catalog-test]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release: ${{ steps.prep.outputs.release }}
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
if [ "${{github.event_name}}" == "pull_request" ]; then
|
||||
echo ::set-output name=release::false
|
||||
else
|
||||
echo ::set-output name=release::true
|
||||
fi
|
||||
- name: Block concurrent jobs
|
||||
uses: softprops/turnstyle@v1
|
||||
if: steps.prep.outputs.release == 'true'
|
||||
with:
|
||||
continue-after-seconds: 180
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||
|
||||
common-release:
|
||||
needs: pre-release
|
||||
runs-on: ubuntu-latest
|
||||
if: needs.pre-release.outputs.release == 'true'
|
||||
steps:
|
||||
- name: Block concurrent jobs
|
||||
uses: softprops/turnstyle@v1
|
||||
with:
|
||||
continue-after-seconds: 180
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.BOT_TOKEN }}
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "TrueCharts-Bot"
|
||||
git config user.email "bot@truecharts.org"
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- name: Run chart-releaser
|
||||
uses: helm/chart-releaser-action@v1.2.0
|
||||
with:
|
||||
charts_dir: library
|
||||
charts_repo_url: ""
|
||||
config: .github/cr.yaml
|
||||
env:
|
||||
CR_TOKEN: "${{ secrets.BOT_TOKEN }}"
|
||||
|
||||
- name: Commit and Push new index
|
||||
run: |
|
||||
git config user.name "TrueCharts-Bot"
|
||||
git config user.email "bot@truecharts.org"
|
||||
git add --all
|
||||
git commit -sm "Commit chart-index updates" || exit 0
|
||||
git push
|
||||
|
||||
changes:
|
||||
name: Get changed Apps
|
||||
runs-on: ubuntu-20.04
|
||||
@@ -293,7 +117,7 @@ jobs:
|
||||
run: ct install --config .github/ct-install.yaml --charts '${{ steps.prep-lint.outputs.train }}/${{ matrix.app }}'
|
||||
|
||||
app-tests-complete:
|
||||
needs: [app-tests, common-unittest, common-test]
|
||||
needs: [app-tests]
|
||||
name: Apps Test Complete
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -4,7 +4,7 @@ on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- '.containers/apps/**'
|
||||
- '.containers/base/**'
|
||||
|
||||
@@ -17,8 +17,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
# TODO remove this ref
|
||||
ref: "staging"
|
||||
token: ${{ secrets.BOT_TOKEN }}
|
||||
fetch-depth: 1
|
||||
- name: Fetch new application versions
|
||||
|
||||
@@ -22,6 +22,7 @@ on:
|
||||
- './LICENSE'
|
||||
- './NOTICE'
|
||||
- '.github/workflows/docs.copy.yaml'
|
||||
- 'index.yaml'
|
||||
|
||||
jobs:
|
||||
copy:
|
||||
@@ -43,6 +44,7 @@ jobs:
|
||||
|
||||
- name: Copy general readme to website
|
||||
run: |
|
||||
yes | cp -rf index.yaml docs/index.yaml || echo "chart-index copy failed, continuing..."
|
||||
yes | cp -rf .github/README.md docs/about/index.md || echo "readme copy failed, continuing..."
|
||||
yes | cp -rf .github/CODE_OF_CONDUCT docs/about/code_of_conduct.md || echo "CODE_OF_CONDUCT copy failed, continuing..."
|
||||
yes | cp -rf .github/CONTRIBUTING docs/development/contributing.md || echo "CONTRIBUTING copy failed, continuing..."
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
name: "library: test & release"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
tags-ignore:
|
||||
- '**'
|
||||
paths:
|
||||
- 'library/**'
|
||||
- '.github/workflows/library.release.yaml'
|
||||
- '.github/cr.yaml'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
tags-ignore:
|
||||
- '**'
|
||||
paths:
|
||||
- 'library/**'
|
||||
- '.github/workflows/library.release.yaml'
|
||||
- '.github/cr.yaml'
|
||||
|
||||
jobs:
|
||||
common-lint:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changed: ${{ steps.list-changed.outputs.changed }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
|
||||
- name: Run chart-testing (lint)
|
||||
id: lint
|
||||
if: steps.list-changed.outputs.changed == 'true'
|
||||
run: ct lint --config .github/ct-lint.yaml --chart-dirs 'library'
|
||||
|
||||
|
||||
common-test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: common-lint
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: prep
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
run: |
|
||||
rm -Rf library/common-test/values.yaml
|
||||
touch library/common-test/values.yaml
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
|
||||
- name: Create k3d cluster
|
||||
uses: nolar/setup-k3d-k3s@v1
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
with:
|
||||
version: v1.19
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
if: needs.common-lint.outputs.changed == 'true'
|
||||
run: ct install --config .github/ct-install.yaml --charts 'library/common-test'
|
||||
|
||||
common-unittest:
|
||||
runs-on: ubuntu-latest
|
||||
needs: common-lint
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Dev tools
|
||||
run: sudo apt-get update && sudo apt-get install -y jq libjq-dev
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- name: Install Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.7
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export RUBYJQ_USE_SYSTEM_LIBRARIES=1
|
||||
bundle install
|
||||
- name: Run tests
|
||||
run: |
|
||||
bundle exec m -r .tools/tests/charts
|
||||
|
||||
pre-release:
|
||||
needs: [common-test, common-unittest]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release: ${{ steps.prep.outputs.release }}
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
if [ "${{github.event_name}}" == "pull_request" ]; then
|
||||
echo ::set-output name=release::false
|
||||
else
|
||||
echo ::set-output name=release::true
|
||||
fi
|
||||
- name: Block concurrent jobs
|
||||
uses: softprops/turnstyle@v1
|
||||
if: steps.prep.outputs.release == 'true'
|
||||
with:
|
||||
continue-after-seconds: 180
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||
|
||||
common-release:
|
||||
needs: pre-release
|
||||
runs-on: ubuntu-latest
|
||||
if: needs.pre-release.outputs.release == 'true'
|
||||
steps:
|
||||
- name: Block concurrent jobs
|
||||
uses: softprops/turnstyle@v1
|
||||
with:
|
||||
continue-after-seconds: 180
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.BOT_TOKEN }}
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "TrueCharts-Bot"
|
||||
git config user.email "bot@truecharts.org"
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- name: Run chart-releaser
|
||||
uses: helm/chart-releaser-action@v1.2.0
|
||||
with:
|
||||
config: .github/cr.yaml
|
||||
charts_dir: library
|
||||
env:
|
||||
CR_TOKEN: "${{ secrets.BOT_TOKEN }}"
|
||||
+12
-2
@@ -1,7 +1,13 @@
|
||||
# About TrueCharts<br>
|
||||
**Community App Catalog for TrueNAS SCALE**
|
||||
|
||||
[](https://github.com/truecharts/apps/commits) [](https://github.com/truecharts/apps/actions/workflows/charts-release.yaml) [](https://github.com/pre-commit/pre-commit) [](https://app.fossa.com/projects/git%2Bgithub.com%2Ftruecharts%2Ftruecharts?ref=badge_shield) [](https://github.com/truecharts/apps/blob/master/docs/LICENSE.BSD3)
|
||||
[](https://truecharts.org/)
|
||||
[](https://github.com/truecharts/apps/commits)
|
||||
[](https://github.com/pre-commit/pre-commit)
|
||||
[](https://github.com/renovatebot/renovate)
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
[](#contributors-)
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
---
|
||||
Truecharts is an innitiative to provide high quality Apps to use with the TrueNAS SCALE App Ecosystem.
|
||||
Our primary goals are:
|
||||
@@ -39,7 +45,9 @@ A lot of our work is based on the great effort of others. We would love to exten
|
||||
|
||||
## Licence
|
||||
|
||||
`SPDX-License-Identifier: BSD-3-Clause`
|
||||
[](https://github.com/truecharts/apps/blob/master/docs/LICENSE.BSD3)
|
||||
|
||||
|
||||
|
||||
Truecharts as a whole, is based on a BSD-3-clause license, this ensures almost everyone can use and modify our charts. However: As a lot of Apps are based on upstream Helm Charts, Licences can vary on a per-App basis. This can easily be seen by the presence of a "LICENSE" file in the App rootfolder.
|
||||
|
||||
@@ -47,5 +55,7 @@ Some Apps may also contain parts in other licenses, such as libraries or templat
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Ftruecharts%2Ftruecharts?ref=badge_large)
|
||||
|
||||
`SPDX-License-Identifier: BSD-3-Clause`
|
||||
|
||||
---
|
||||
 
|
||||
|
||||
+10
-32
@@ -2,10 +2,12 @@ apiVersion: v1
|
||||
entries:
|
||||
common:
|
||||
- apiVersion: v2
|
||||
created: "2021-03-17T14:27:24.125854125Z"
|
||||
appVersion: none
|
||||
created: "2021-04-09T14:06:49.253231365Z"
|
||||
description: Function library for TrueCharts
|
||||
digest: 41a2bf000d3a9ed7959b1d10690121869593c86c8f689bf70a652e98798c3e88
|
||||
digest: 0e59e412fad64441ab00e9b1f7120a3ffd8f6e8bd8ca3a87104d8ba3e413b2b3
|
||||
home: https://github.com/truecharts/apps/tree/master/common
|
||||
icon: https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png
|
||||
keywords:
|
||||
- truecharts
|
||||
- library-chart
|
||||
@@ -15,38 +17,14 @@ entries:
|
||||
- email: info@truecharts.org
|
||||
name: TrueCharts
|
||||
url: truecharts.org
|
||||
- email: kjeld@schouten-lebbing.nl
|
||||
name: Ornias1993
|
||||
url: truecharts.org
|
||||
name: common
|
||||
sources:
|
||||
- https://github.com/truecharts/apps/tree/master/library/common
|
||||
type: library
|
||||
urls:
|
||||
- https://github.com/truecharts/apps/releases/download/common-2.0.0/common-2.0.0.tgz
|
||||
version: 2.0.0
|
||||
common-test:
|
||||
- apiVersion: v2
|
||||
created: "2021-03-17T14:27:24.209993243Z"
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: file://../common
|
||||
version: n/a
|
||||
description: Helper chart to test different use cases of the common library
|
||||
digest: 62611017e79eaaa94b57cd5229bb1058b9780e19eb502f9f54b5ae1903b67374
|
||||
home: https://github.com/truecharts/apps/tree/master/library/common-test
|
||||
keywords:
|
||||
- common-test
|
||||
- truecharts
|
||||
- common
|
||||
- test
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
maintainers:
|
||||
- email: info@truecharts.org
|
||||
name: TrueCharts
|
||||
url: truecharts.org
|
||||
name: common-test
|
||||
sources:
|
||||
- https://github.com/truecharts/apps/tree/master/library/common-test
|
||||
type: application
|
||||
urls:
|
||||
- https://github.com/truecharts/apps/releases/download/common-test-2.0.0/common-test-2.0.0.tgz
|
||||
version: 2.0.0
|
||||
generated: "2021-03-17T14:27:24.209999643Z"
|
||||
- https://github.com/truecharts/apps/releases/download/common-2.0.2/common-2.0.2.tgz
|
||||
version: 2.0.2
|
||||
generated: "2021-04-09T14:06:49.253236766Z"
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
apiVersion: v1
|
||||
entries:
|
||||
common:
|
||||
- apiVersion: v2
|
||||
appVersion: none
|
||||
created: "2021-04-09T14:06:49.253231365Z"
|
||||
description: Function library for TrueCharts
|
||||
digest: 0e59e412fad64441ab00e9b1f7120a3ffd8f6e8bd8ca3a87104d8ba3e413b2b3
|
||||
home: https://github.com/truecharts/apps/tree/master/common
|
||||
icon: https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png
|
||||
keywords:
|
||||
- truecharts
|
||||
- library-chart
|
||||
- common
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
maintainers:
|
||||
- email: info@truecharts.org
|
||||
name: TrueCharts
|
||||
url: truecharts.org
|
||||
- email: kjeld@schouten-lebbing.nl
|
||||
name: Ornias1993
|
||||
url: truecharts.org
|
||||
name: common
|
||||
sources:
|
||||
- https://github.com/truecharts/apps/tree/master/library/common
|
||||
type: library
|
||||
urls:
|
||||
- https://github.com/truecharts/apps/releases/download/common-2.0.2/common-2.0.2.tgz
|
||||
version: 2.0.2
|
||||
generated: "2021-04-09T14:06:49.253236766Z"
|
||||
@@ -1,320 +0,0 @@
|
||||
# Bitnami Common Library Chart
|
||||
|
||||
A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for grouping common logic between bitnami charts.
|
||||
|
||||
## TL;DR
|
||||
|
||||
```yaml
|
||||
dependencies:
|
||||
- name: common
|
||||
version: 0.x.x
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
```
|
||||
|
||||
```bash
|
||||
$ helm dependency update
|
||||
```
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
data:
|
||||
myvalue: "Hello World"
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart provides a common template helpers which can be used to develop new charts using [Helm](https://helm.sh) package manager.
|
||||
|
||||
Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of [Bitnami Kubernetes Production Runtime](https://kubeprod.io/) (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.12+
|
||||
- Helm 3.1.0
|
||||
|
||||
## Parameters
|
||||
|
||||
The following table lists the helpers available in the library which are scoped in different sections.
|
||||
|
||||
### Affinities
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|-------------------------------|------------------------------------------------------|------------------------------------------------|
|
||||
| `common.affinities.node.soft` | Return a soft nodeAffinity definition | `dict "key" "FOO" "values" (list "BAR" "BAZ")` |
|
||||
| `common.affinities.node.hard` | Return a hard nodeAffinity definition | `dict "key" "FOO" "values" (list "BAR" "BAZ")` |
|
||||
| `common.affinities.pod.soft` | Return a soft podAffinity/podAntiAffinity definition | `dict "component" "FOO" "context" $` |
|
||||
| `common.affinities.pod.hard` | Return a hard podAffinity/podAntiAffinity definition | `dict "component" "FOO" "context" $` |
|
||||
|
||||
### Capabilities
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|----------------------------------------------|------------------------------------------------------------------------------------------------|-------------------|
|
||||
| `common.capabilities.kubeVersion` | Return the target Kubernetes version (using client default if .Values.kubeVersion is not set). | `.` Chart context |
|
||||
| `common.capabilities.deployment.apiVersion` | Return the appropriate apiVersion for deployment. | `.` Chart context |
|
||||
| `common.capabilities.statefulset.apiVersion` | Return the appropriate apiVersion for statefulset. | `.` Chart context |
|
||||
| `common.capabilities.ingress.apiVersion` | Return the appropriate apiVersion for ingress. | `.` Chart context |
|
||||
| `common.capabilities.supportsHelmVersion` | Returns true if the used Helm version is 3.3+ | `.` Chart context |
|
||||
|
||||
### Errors
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
|
||||
| `common.errors.upgrade.passwords.empty` | It will ensure required passwords are given when we are upgrading a chart. If `validationErrors` is not empty it will throw an error and will stop the upgrade action. | `dict "validationErrors" (list $validationError00 $validationError01) "context" $` |
|
||||
|
||||
### Images
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|-----------------------------|------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
|
||||
| `common.images.image` | Return the proper and full image name | `dict "imageRoot" .Values.path.to.the.image "global" $`, see [ImageRoot](#imageroot) for the structure. |
|
||||
| `common.images.pullSecrets` | Return the proper Docker Image Registry Secret Names | `dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global` |
|
||||
|
||||
### Ingress
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|--------------------------|----------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `common.ingress.backend` | Generate a proper Ingress backend entry depending on the API version | `dict "serviceName" "foo" "servicePort" "bar"`, see the [Ingress deprecation notice](https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/) for the syntax differences |
|
||||
|
||||
### Labels
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|-----------------------------|------------------------------------------------------|-------------------|
|
||||
| `common.labels.standard` | Return Kubernetes standard labels | `.` Chart context |
|
||||
| `common.labels.matchLabels` | Return the proper Docker Image Registry Secret Names | `.` Chart context |
|
||||
|
||||
### Names
|
||||
|
||||
| Helper identifier | Description | Expected Inpput |
|
||||
|-------------------------|------------------------------------------------------------|-------------------|
|
||||
| `common.names.name` | Expand the name of the chart or use `.Values.nameOverride` | `.` Chart context |
|
||||
| `common.names.fullname` | Create a default fully qualified app name. | `.` Chart context |
|
||||
| `common.names.chart` | Chart name plus version | `.` Chart context |
|
||||
|
||||
### Secrets
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|---------------------------|--------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `common.secrets.name` | Generate the name of the secret. | `dict "existingSecret" .Values.path.to.the.existingSecret "defaultNameSuffix" "mySuffix" "context" $` see [ExistingSecret](#existingsecret) for the structure. |
|
||||
| `common.secrets.key` | Generate secret key. | `dict "existingSecret" .Values.path.to.the.existingSecret "key" "keyName"` see [ExistingSecret](#existingsecret) for the structure. |
|
||||
| `common.passwords.manage` | Generate secret password or retrieve one if already created. | `dict "secret" "secret-name" "key" "keyName" "providedValues" (list "path.to.password1" "path.to.password2") "length" 10 "strong" false "chartName" "chartName" "context" $`, length, strong and chartNAme fields are optional. |
|
||||
| `common.secrets.exists` | Returns whether a previous generated secret already exists. | `dict "secret" "secret-name" "context" $` |
|
||||
|
||||
### Storage
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|-------------------------------|---------------------------------------|---------------------------------------------------------------------------------------------------------------------|
|
||||
| `common.affinities.node.soft` | Return a soft nodeAffinity definition | `dict "persistence" .Values.path.to.the.persistence "global" $`, see [Persistence](#persistence) for the structure. |
|
||||
|
||||
### TplValues
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|---------------------------|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `common.tplvalues.render` | Renders a value that contains template | `dict "value" .Values.path.to.the.Value "context" $`, value is the value should rendered as template, context frequently is the chart context `$` or `.` |
|
||||
|
||||
### Utils
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|--------------------------------|------------------------------------------------------------------------------------------|------------------------------------------------------------------------|
|
||||
| `common.utils.fieldToEnvVar` | Build environment variable name given a field. | `dict "field" "my-password"` |
|
||||
| `common.utils.secret.getvalue` | Print instructions to get a secret value. | `dict "secret" "secret-name" "field" "secret-value-field" "context" $` |
|
||||
| `common.utils.getValueFromKey` | Gets a value from `.Values` object given its key path | `dict "key" "path.to.key" "context" $` |
|
||||
| `common.utils.getKeyFromList` | Returns first `.Values` key with a defined value or first of the list if all non-defined | `dict "keys" (list "path.to.key1" "path.to.key2") "context" $` |
|
||||
|
||||
### Validations
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `common.validations.values.single.empty` | Validate a value must not be empty. | `dict "valueKey" "path.to.value" "secret" "secret.name" "field" "my-password" "subchart" "subchart" "context" $` secret, field and subchart are optional. In case they are given, the helper will generate a how to get instruction. See [ValidateValue](#validatevalue) |
|
||||
| `common.validations.values.multiple.empty` | Validate a multiple values must not be empty. It returns a shared error for all the values. | `dict "required" (list $validateValueConf00 $validateValueConf01) "context" $`. See [ValidateValue](#validatevalue) |
|
||||
| `common.validations.values.mariadb.passwords` | This helper will ensure required password for MariaDB are not empty. It returns a shared error for all the values. | `dict "secret" "mariadb-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use mariadb chart and the helper. |
|
||||
| `common.validations.values.postgresql.passwords` | This helper will ensure required password for PostgreSQL are not empty. It returns a shared error for all the values. | `dict "secret" "postgresql-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use postgresql chart and the helper. |
|
||||
| `common.validations.values.redis.passwords` | This helper will ensure required password for Redis<sup>TM</sup> are not empty. It returns a shared error for all the values. | `dict "secret" "redis-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use redis chart and the helper. |
|
||||
| `common.validations.values.cassandra.passwords` | This helper will ensure required password for Cassandra are not empty. It returns a shared error for all the values. | `dict "secret" "cassandra-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use cassandra chart and the helper. |
|
||||
| `common.validations.values.mongodb.passwords` | This helper will ensure required password for MongoDB® are not empty. It returns a shared error for all the values. | `dict "secret" "mongodb-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use mongodb chart and the helper. |
|
||||
|
||||
### Warnings
|
||||
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|------------------------------|----------------------------------|------------------------------------------------------------|
|
||||
| `common.warnings.rollingTag` | Warning about using rolling tag. | `ImageRoot` see [ImageRoot](#imageroot) for the structure. |
|
||||
|
||||
## Special input schemas
|
||||
|
||||
### ImageRoot
|
||||
|
||||
```yaml
|
||||
registry:
|
||||
type: string
|
||||
description: Docker registry where the image is located
|
||||
example: docker.io
|
||||
|
||||
repository:
|
||||
type: string
|
||||
description: Repository and image name
|
||||
example: bitnami/nginx
|
||||
|
||||
tag:
|
||||
type: string
|
||||
description: image tag
|
||||
example: 1.16.1-debian-10-r63
|
||||
|
||||
pullPolicy:
|
||||
type: string
|
||||
description: Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
|
||||
pullSecrets:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Optionally specify an array of imagePullSecrets.
|
||||
|
||||
debug:
|
||||
type: boolean
|
||||
description: Set to true if you would like to see extra information on logs
|
||||
example: false
|
||||
|
||||
## An instance would be:
|
||||
# registry: docker.io
|
||||
# repository: bitnami/nginx
|
||||
# tag: 1.16.1-debian-10-r63
|
||||
# pullPolicy: IfNotPresent
|
||||
# debug: false
|
||||
```
|
||||
|
||||
### Persistence
|
||||
|
||||
```yaml
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Whether enable persistence.
|
||||
example: true
|
||||
|
||||
storageClass:
|
||||
type: string
|
||||
description: Ghost data Persistent Volume Storage Class, If set to "-", storageClassName: "" which disables dynamic provisioning.
|
||||
example: "-"
|
||||
|
||||
accessMode:
|
||||
type: string
|
||||
description: Access mode for the Persistent Volume Storage.
|
||||
example: ReadWriteOnce
|
||||
|
||||
size:
|
||||
type: string
|
||||
description: Size the Persistent Volume Storage.
|
||||
example: 8Gi
|
||||
|
||||
path:
|
||||
type: string
|
||||
description: Path to be persisted.
|
||||
example: /bitnami
|
||||
|
||||
## An instance would be:
|
||||
# enabled: true
|
||||
# storageClass: "-"
|
||||
# accessMode: ReadWriteOnce
|
||||
# size: 8Gi
|
||||
# path: /bitnami
|
||||
```
|
||||
|
||||
### ExistingSecret
|
||||
|
||||
```yaml
|
||||
name:
|
||||
type: string
|
||||
description: Name of the existing secret.
|
||||
example: mySecret
|
||||
keyMapping:
|
||||
description: Mapping between the expected key name and the name of the key in the existing secret.
|
||||
type: object
|
||||
|
||||
## An instance would be:
|
||||
# name: mySecret
|
||||
# keyMapping:
|
||||
# password: myPasswordKey
|
||||
```
|
||||
|
||||
#### Example of use
|
||||
|
||||
When we store sensitive data for a deployment in a secret, some times we want to give to users the possibility of using theirs existing secrets.
|
||||
|
||||
```yaml
|
||||
# templates/secret.yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
labels:
|
||||
app: {{ include "common.names.fullname" . }}
|
||||
type: Opaque
|
||||
data:
|
||||
password: {{ .Values.password | b64enc | quote }}
|
||||
|
||||
# templates/dpl.yaml
|
||||
---
|
||||
...
|
||||
env:
|
||||
- name: PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "common.secrets.name" (dict "existingSecret" .Values.existingSecret "context" $) }}
|
||||
key: {{ include "common.secrets.key" (dict "existingSecret" .Values.existingSecret "key" "password") }}
|
||||
...
|
||||
|
||||
# values.yaml
|
||||
---
|
||||
name: mySecret
|
||||
keyMapping:
|
||||
password: myPasswordKey
|
||||
```
|
||||
|
||||
### ValidateValue
|
||||
|
||||
#### NOTES.txt
|
||||
|
||||
```console
|
||||
{{- $validateValueConf00 := (dict "valueKey" "path.to.value00" "secret" "secretName" "field" "password-00") -}}
|
||||
{{- $validateValueConf01 := (dict "valueKey" "path.to.value01" "secret" "secretName" "field" "password-01") -}}
|
||||
|
||||
{{ include "common.validations.values.multiple.empty" (dict "required" (list $validateValueConf00 $validateValueConf01) "context" $) }}
|
||||
```
|
||||
|
||||
If we force those values to be empty we will see some alerts
|
||||
|
||||
```console
|
||||
$ helm install test mychart --set path.to.value00="",path.to.value01=""
|
||||
'path.to.value00' must not be empty, please add '--set path.to.value00=$PASSWORD_00' to the command. To get the current value:
|
||||
|
||||
export PASSWORD_00=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-00}" | base64 --decode)
|
||||
|
||||
'path.to.value01' must not be empty, please add '--set path.to.value01=$PASSWORD_01' to the command. To get the current value:
|
||||
|
||||
export PASSWORD_01=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-01}" | base64 --decode)
|
||||
```
|
||||
|
||||
## Upgrading
|
||||
|
||||
### To 1.0.0
|
||||
|
||||
[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.
|
||||
|
||||
**What changes were introduced in this major version?**
|
||||
|
||||
- Previous versions of this Helm Chart use `apiVersion: v1` (installable by both Helm 2 and 3), this Helm Chart was updated to `apiVersion: v2` (installable by Helm 3 only). [Here](https://helm.sh/docs/topics/charts/#the-apiversion-field) you can find more information about the `apiVersion` field.
|
||||
- Use `type: library`. [Here](https://v3.helm.sh/docs/faq/#library-chart-support) you can find more information.
|
||||
- The different fields present in the *Chart.yaml* file has been ordered alphabetically in a homogeneous way for all the Bitnami Helm Charts
|
||||
|
||||
**Considerations when upgrading to this version**
|
||||
|
||||
- If you want to upgrade to this version from a previous one installed with Helm v3, you shouldn't face any issues
|
||||
- If you want to upgrade to this version using Helm v2, this scenario is not supported as this version doesn't support Helm v2 anymore
|
||||
- If you installed the previous version with Helm v2 and wants to upgrade to this version with Helm v3, please refer to the [official Helm documentation](https://helm.sh/docs/topics/v2_v3_migration/#migration-use-cases) about migrating from Helm v2 to v3
|
||||
|
||||
**Useful links**
|
||||
|
||||
- https://docs.bitnami.com/tutorials/resolve-helm2-helm3-post-migration-issues/
|
||||
- https://helm.sh/docs/topics/v2_v3_migration/
|
||||
- https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/
|
||||
@@ -1,141 +0,0 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [3.0.1]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed `kubeVersion` in `Chart.yaml` not working with people running k8s pre-releases
|
||||
- Added `ingressClassName` to `values.yaml`
|
||||
|
||||
## [3.0.0]
|
||||
|
||||
### Changed
|
||||
|
||||
- `probes.startupProbe` is now enabled by default. This will allow for quicker `Ready` states on Pods. It will precede the liveness and readiness Probes. *Note:* This requires that you are running [Kubernetes 1.16](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
- Aligned our default values for liveness and readiness Probes with the Kubernetes defaults:
|
||||
- `initialDelaySeconds` is now `0`
|
||||
- `timeoutSeconds` is now `1`
|
||||
- `failureThreshold` is now `3`
|
||||
|
||||
## [2.5.1]
|
||||
|
||||
### Added
|
||||
|
||||
- Fixed a small typo in `values.yaml`: `ingress.tls.hostTpl` -> `ingress.tls.hostsTpl`
|
||||
|
||||
## [2.5.0]
|
||||
|
||||
### Added
|
||||
|
||||
- Allow setting ingress values through Helm templates:
|
||||
- `ingress.hosts.hostTpl`
|
||||
- `ingress.tls.secretNameTpl`
|
||||
- `ingress.tls.hostsTpl`
|
||||
|
||||
## [2.4.0]
|
||||
|
||||
### Added
|
||||
|
||||
- Allow setting environment variables from Downward API via `envValueFrom`. See [the Kubernetes docs](https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/) for more information.
|
||||
|
||||
## [2.3.0]
|
||||
|
||||
### Added
|
||||
|
||||
- Allow overriding the main container command.
|
||||
- Allow setting Helm templates as environment variables via `envTpl`. The given value is parsed through Helm's `tpl` function, allowing for powerful variable substitution.
|
||||
- Support for defining volumeClaimTemplates for StatefulSet.
|
||||
- Allow the following Pod spec fields to be configurable:
|
||||
- `priorityClassName`
|
||||
- `schedulerName`
|
||||
- `hostname`
|
||||
|
||||
### Fixed
|
||||
|
||||
- `values.yaml` now contains the following sections, these were already functional but were previously undocumented:
|
||||
- `podSecurityContext`
|
||||
- `securityContext`
|
||||
- `resources`
|
||||
|
||||
## [2.2.1]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Made explicit that `service.port.targetPort` cannot be a named port.
|
||||
|
||||
## [2.2.0]
|
||||
|
||||
### Added
|
||||
|
||||
- Allow serviceLinks to be enabled/disabled.
|
||||
- Support for ingressClassName on apiVersion `networking.k8s.io/v1` by setting `ingress.ingressClassName`.
|
||||
- Added some initial proper unit tests for the `common` chart.
|
||||
|
||||
### Changed
|
||||
|
||||
- `service.port.targetPort` is now used in the container spec instead of `service.port.port` if specified. This allows for different service and container ports. (Implements [#465](https://github.com/k8s-at-home/charts/issues/465)).
|
||||
|
||||
### Fixed
|
||||
|
||||
- Document setting environment variables for code-server add-on in `values.yaml` (Fixes [#436](https://github.com/k8s-at-home/charts/issues/436)).
|
||||
- Set service targetPort to the service port name first if no `targetPort` value is given.
|
||||
|
||||
## [2.1.0]
|
||||
|
||||
### Added
|
||||
|
||||
- Allow for additional arguments to be added to code-server runtime via `addons.codeserver.args`
|
||||
|
||||
## [2.0.4]
|
||||
|
||||
### Fixed
|
||||
|
||||
- `periodSeconds` now works for all probe types.
|
||||
|
||||
## [2.0.0]
|
||||
|
||||
### Changed
|
||||
|
||||
- :warning: Updated `probes` logic to support custom probes, it is now possible to set your own custom probes by setting the `probes.[liveness|readiness|startup].custom` value to `true` and configuring them. Default is `false`.
|
||||
- :warning: `addon.vpn.imagePullPolicy` is now `addon.vpn.[openvpn|wireguard].image.pullPolicy`. Default is `IfNotPresent`
|
||||
- [code-server](https://github.com/cdr/code-server) is now an `addon` like `vpn`. This enables a code-server container inside the pod which allows you to modify a configuration in a volume attached to the pod. Default for `addons.codeserver.enabled` is `false`
|
||||
- Added `envFrom` for more configuration with environment variables
|
||||
- Added `dnsConfig` to be configurable
|
||||
- Added support for 1.19+ ingress spec
|
||||
- Added this [CHANGELOG.md](CHANGELOG.md)
|
||||
|
||||
### Fixed
|
||||
|
||||
- `nameOverride` and `fullNameOverride` not in `values.yaml`
|
||||
|
||||
## [1.7.0]
|
||||
|
||||
This is the last version before starting this changelog. All sorts of cool stuff was changed, but only `git log` remembers what that was :slightly_frowning_face:
|
||||
|
||||
[3.0.1]: https://github.com/k8s-at-home/charts/tree/common-3.0.1/charts/common
|
||||
|
||||
[3.0.0]: https://github.com/k8s-at-home/charts/tree/common-3.0.0/charts/common
|
||||
|
||||
[2.5.1]: https://github.com/k8s-at-home/charts/tree/common-2.5.1/charts/common
|
||||
|
||||
[2.5.0]: https://github.com/k8s-at-home/charts/tree/common-2.5.0/charts/common
|
||||
|
||||
[2.4.0]: https://github.com/k8s-at-home/charts/tree/common-2.4.0/charts/common
|
||||
|
||||
[2.3.0]: https://github.com/k8s-at-home/charts/tree/common-2.3.0/charts/common
|
||||
|
||||
[2.2.1]: https://github.com/k8s-at-home/charts/tree/common-2.2.1/charts/common
|
||||
|
||||
[2.2.0]: https://github.com/k8s-at-home/charts/tree/common-2.2.0/charts/common
|
||||
|
||||
[2.1.0]: https://github.com/k8s-at-home/charts/tree/common-2.1.0/charts/common
|
||||
|
||||
[2.0.4]: https://github.com/k8s-at-home/charts/tree/common-2.0.4/charts/common
|
||||
|
||||
[2.0.0]: https://github.com/k8s-at-home/charts/tree/common-2.0.0/charts/common
|
||||
|
||||
[1.7.0]: https://github.com/k8s-at-home/charts/tree/common-1.7.0/charts/common
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v2
|
||||
kubeVersion: ">=1.16.0-0"
|
||||
name: common
|
||||
version: 2.0.0
|
||||
version: 2.0.2
|
||||
# upstream_version:
|
||||
appVersion: none
|
||||
description: Function library for TrueCharts
|
||||
@@ -20,4 +20,7 @@ maintainers:
|
||||
- name: TrueCharts
|
||||
email: info@truecharts.org
|
||||
url: truecharts.org
|
||||
- name: Ornias1993
|
||||
email: kjeld@schouten-lebbing.nl
|
||||
url: truecharts.org
|
||||
# annotations:
|
||||
|
||||
@@ -32,7 +32,6 @@ serviceAccount:
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
|
||||
env: {}
|
||||
# TZ: UTC
|
||||
|
||||
@@ -85,6 +84,7 @@ enableServiceLinks: true
|
||||
podSecurityContext: {}
|
||||
|
||||
# Configure the Security Context for the main container
|
||||
# PUID and PGID gets added automatically!
|
||||
securityContext: {}
|
||||
|
||||
initContainers: []
|
||||
|
||||
Reference in New Issue
Block a user