mirror of
https://github.com/plcnk/charts.git
synced 2026-04-07 18:20:40 +00:00
Compare commits
18 Commits
gh-pages
...
it-tools-2
| Author | SHA1 | Date | |
|---|---|---|---|
| 31bbf1ca94 | |||
| 8a84b5e13a | |||
| 6655b6bb97 | |||
| 4c3749aa12 | |||
| 60408a5fd4 | |||
| e476ff3c5b | |||
| 6877ce65df | |||
| 668781b2aa | |||
| 65985fa488 | |||
| afd6a5141e | |||
| 1c16ee1558 | |||
| 26326862fc | |||
| be39c8c240 | |||
| 5e11c94795 | |||
| 1a462f655d | |||
| 13e72521ae | |||
| 290272100f | |||
| d519464ace |
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
* @plcnk
|
||||||
21
.github/renovate.json5
vendored
Normal file
21
.github/renovate.json5
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"github>plcnk/.github:default.json5",
|
||||||
|
":semanticCommitTypeAll(chore)"
|
||||||
|
],
|
||||||
|
"regexManagers": [
|
||||||
|
{
|
||||||
|
"fileMatch": ["\\.yaml$"],
|
||||||
|
"matchStrings": [
|
||||||
|
"# ?renovate datasource=(?<datasource>.+?) depName=(?<depName>.+)\\n.+: [\"']?(?<currentValue>.+?)[\"']?\\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"packageRules": [
|
||||||
|
{
|
||||||
|
"matchDatasources": ["helm"],
|
||||||
|
"commitMessageTopic": "{{depName}} Helm release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
96
.github/workflows/release.yaml
vendored
Normal file
96
.github/workflows/release.yaml
vendored
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
name: Release Charts
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- charts/**
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: release
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-charts:
|
||||||
|
name: Release Charts
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
AUTHOR_USER: plcnk-bot
|
||||||
|
AUTHOR_EMAIL: 178334506+plcnk-bot[bot]@users.noreply.github.com
|
||||||
|
steps:
|
||||||
|
- name: Generate Token
|
||||||
|
id: app-token
|
||||||
|
uses: actions/create-github-app-token@v1
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config user.name "${{ env.AUTHOR_USER }}"
|
||||||
|
git config user.email "${{ env.AUTHOR_EMAIL }}"
|
||||||
|
|
||||||
|
- name: Add Helm repos
|
||||||
|
run: |
|
||||||
|
helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||||
|
helm repo add bjw-s https://bjw-s.github.io/helm-charts
|
||||||
|
|
||||||
|
- name: Install chart-releaser
|
||||||
|
uses: helm/chart-releaser-action@v1.5.0
|
||||||
|
with:
|
||||||
|
install_only: true
|
||||||
|
|
||||||
|
- name: Package charts
|
||||||
|
id: package_charts
|
||||||
|
run: |
|
||||||
|
changed_charts=""
|
||||||
|
for dir in charts/*; do
|
||||||
|
chart_name="$(basename "$dir")"
|
||||||
|
version="$(yq '.version' "$dir/Chart.yaml")"
|
||||||
|
if ! git rev-parse "$chart_name-${version#v}" &>/dev/null; then
|
||||||
|
echo "Packaging chart $chart_name..."
|
||||||
|
cr package --package-path=.cr-release-packages "$dir"
|
||||||
|
changed_charts+="$chart_name,"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "changed_charts=${changed_charts%,}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
if: steps.package_charts.outputs.changed_charts != ''
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ github.token }}
|
||||||
|
|
||||||
|
- name: Push charts to GHCR
|
||||||
|
if: steps.package_charts.outputs.changed_charts != ''
|
||||||
|
run: |
|
||||||
|
for pkg in .cr-release-packages/*; do
|
||||||
|
if [ -z "${pkg:-}" ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "Pushing $pkg..."
|
||||||
|
helm push "$pkg" "oci://ghcr.io/$GITHUB_REPOSITORY_OWNER/charts"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Publish charts
|
||||||
|
uses: helm/chart-releaser-action@v1.5.0
|
||||||
|
if: steps.package_charts.outputs.changed_charts != ''
|
||||||
|
with:
|
||||||
|
skip_packaging: true
|
||||||
|
env:
|
||||||
|
CR_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
115
.github/workflows/renovate.yaml
vendored
Normal file
115
.github/workflows/renovate.yaml
vendored
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
name: Renovate
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- renovate/**
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMMIT_MESSAGE: "chore: Update chart metadata"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-chart-metadata:
|
||||||
|
name: Update Chart Metadata
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
AUTHOR_USER: chart-bot
|
||||||
|
AUTHOR_EMAIL: 160046936+charts-bot[bot]@users.noreply.github.com
|
||||||
|
steps:
|
||||||
|
- name: Generate Token
|
||||||
|
id: app-token
|
||||||
|
uses: actions/create-github-app-token@v1
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Detect Changes
|
||||||
|
uses: dorny/paths-filter@v3
|
||||||
|
id: changes
|
||||||
|
with:
|
||||||
|
list-files: shell
|
||||||
|
filters: |
|
||||||
|
charts:
|
||||||
|
- charts/**
|
||||||
|
|
||||||
|
- name: Fetch PR
|
||||||
|
id: pr
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
github-token: ${{ steps.app-token.outputs.token }}
|
||||||
|
script: |
|
||||||
|
const response = await github.rest.repos.listPullRequestsAssociatedWithCommit({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
commit_sha: context.sha,
|
||||||
|
});
|
||||||
|
const pr = response.data.shift();
|
||||||
|
core.setOutput("title", pr.title);
|
||||||
|
core.setOutput("base_ref", pr.base.ref);
|
||||||
|
core.setOutput("labels", pr.labels.map((e) => e.name).filter((e) => e));
|
||||||
|
|
||||||
|
- name: Update changelog
|
||||||
|
env:
|
||||||
|
TITLE: ${{ steps.pr.outputs.title }}
|
||||||
|
CHANGELOG_APPEND: ${{ contains(steps.pr.outputs.labels, 'changelog-append') }}
|
||||||
|
BREAKING_CHANGE: ${{ contains(steps.pr.outputs.labels, 'breaking-change') }}
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
export DESCRIPTION="$(perl -pe 's/^.+?: (.)/\U$1/' <<<"$TITLE")"
|
||||||
|
if [[ "$BREAKING_CHANGE" == "true" ]]; then
|
||||||
|
DESCRIPTION="BREAKING - $DESCRIPTION"
|
||||||
|
fi
|
||||||
|
CHANGELOG="$(yq -o json '[{"kind": "changed", "description": strenv(DESCRIPTION)}]')"
|
||||||
|
UPDATE_TYPE=replace
|
||||||
|
if [[ "$CHANGELOG_APPEND" == "true" ]]; then
|
||||||
|
UPDATE_TYPE=append
|
||||||
|
fi
|
||||||
|
./hack/update-changelog.sh "$UPDATE_TYPE" "$CHANGELOG" ${{ steps.changes.outputs.charts_files }}
|
||||||
|
|
||||||
|
- name: Set type to patch
|
||||||
|
if: contains(steps.pr.outputs.labels, 'patch') || contains(steps.pr.outputs.labels, 'digest')
|
||||||
|
run: echo TYPE=patch >>$GITHUB_ENV
|
||||||
|
- name: Set type to minor
|
||||||
|
if: contains(steps.pr.outputs.labels, 'major') || contains(steps.pr.outputs.labels, 'minor')
|
||||||
|
run: echo TYPE=minor >>$GITHUB_ENV
|
||||||
|
- name: Update chart version
|
||||||
|
if: "!contains(steps.pr.outputs.labels, 'skip-version-bump')"
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
./hack/update-version.sh "$TYPE" ${{ steps.changes.outputs.charts_files }}
|
||||||
|
|
||||||
|
- name: Install helm-docs
|
||||||
|
uses: gabe565/setup-helm-docs-action@v1
|
||||||
|
- name: Generate Helm docs
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
./hack/gen-helm-docs.sh
|
||||||
|
|
||||||
|
- name: Check if commit exists
|
||||||
|
id: commit_exists
|
||||||
|
env:
|
||||||
|
BASE_REF: ${{ steps.pr.outputs.base_ref }}
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
IFS=$'\n\t'
|
||||||
|
commits="$(git rev-list --pretty=oneline "origin/$BASE_REF..HEAD" | cut -d' ' -f2-)"
|
||||||
|
if grep -F -e "$COMMIT_MESSAGE" <<<"$commits"; then
|
||||||
|
echo 'result=true' >>$GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo 'result=false' >>$GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Commit chart version
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
|
if: steps.commit_exists.outputs.result == 'false' && !contains(steps.pr.outputs.labels, 'skip-chart-meta')
|
||||||
|
with:
|
||||||
|
commit_user_name: ${{ env.AUTHOR_USER }}
|
||||||
|
commit_user_email: ${{ env.AUTHOR_EMAIL }}
|
||||||
|
commit_author: ${{ env.AUTHOR_USER }} <${{ env.AUTHOR_EMAIL }}>
|
||||||
|
commit_message: ${{ env.COMMIT_MESSAGE }}
|
||||||
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Test values
|
||||||
|
test_values/
|
||||||
|
|
||||||
|
# Helm resources
|
||||||
|
charts/**/charts
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 Romain Pluciennik
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
12
README.md
12
README.md
@ -3,14 +3,9 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/plcnk/charts/blob/master/LICENSE"><img src="https://img.shields.io/github/license/plcnk/charts" /></a>
|
<a href="./LICENSE"><img src="https://img.shields.io/github/license/plcnk/charts" /></a>
|
||||||
<a href="https://artifacthub.io/packages/search?repo=plcnk"><img src="https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/plcnk" /></a>
|
<a href="https://artifacthub.io/packages/search?repo=plcnk"><img src="https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/plcnk" /></a>
|
||||||
<a href="https://docs.renovatebot.com/"><img src="https://img.shields.io/badge/Renovate-enabled-green?style=flat&logo=renovate" /></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://github.com/plcnk/charts/actions/workflows/release.yaml"><img src="https://github.com/plcnk/charts/actions/workflows/release.yaml/badge.svg" /></a>
|
<a href="https://github.com/plcnk/charts/actions/workflows/release.yaml"><img src="https://github.com/plcnk/charts/actions/workflows/release.yaml/badge.svg" /></a>
|
||||||
<a href="https://github.com/plcnk/charts/actions/workflows/lint-test.yaml"><img src="https://github.com/plcnk/charts/actions/workflows/lint-test.yaml/badge.svg" /></a>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
# Charts
|
# Charts
|
||||||
@ -27,10 +22,7 @@ The code in this repository is provided as-is with no warranties.
|
|||||||
|
|
||||||
| Chart | Description |
|
| Chart | Description |
|
||||||
| ----- | ----------- |
|
| ----- | ----------- |
|
||||||
| [# cloudflare-tunnel <img src='https://raw.githubusercontent.com/plcnk/charts/master/charts/cloudflare-tunnel/icon.svg' alt='cloudflare-tunnel icon' width='18px' align='right' loading='lazy'>](https://github.com/plcnk/charts/tree/master/charts/cloudflare-tunnel/) | Connect your resources to Cloudflare without a publicly routable IP address. |
|
| [# it-tools <img src='https://raw.githubusercontent.com/plcnk/charts/master/charts/it-tools/icon.svg' alt='it-tools icon' width='18px' align='right' loading='lazy'>](charts/it-tools/) | Collection of handy online tools for developers, with great UX. |
|
||||||
| [# it-tools <img src='https://raw.githubusercontent.com/plcnk/charts/master/charts/it-tools/icon.svg' alt='it-tools icon' width='18px' align='right' loading='lazy'>](https://github.com/plcnk/charts/tree/master/charts/it-tools/) | Collection of handy online tools for developers, with great UX. |
|
|
||||||
| [# moodist <img src='https://raw.githubusercontent.com/plcnk/charts/master/charts/moodist/icon.svg' alt='moodist icon' width='18px' align='right' loading='lazy'>](https://github.com/plcnk/charts/tree/master/charts/moodist/) | Ambient sounds for focus and calm. |
|
|
||||||
| [# wikijs <img src='https://raw.githubusercontent.com/plcnk/charts/master/charts/wikijs/icon.svg' alt='wikijs icon' width='18px' align='right' loading='lazy'>](https://github.com/plcnk/charts/tree/master/charts/wikijs/) | A modern, lightweight and powerful wiki app built on NodeJS. |
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
repositoryID: 94620961-e40f-4cff-bbf5-bbe4247bc5e8
|
|
||||||
owners:
|
|
||||||
- name: plcnk
|
|
||||||
email: romain.pluciennik@gmail.com
|
|
||||||
23
charts/it-tools/.helmignore
Normal file
23
charts/it-tools/.helmignore
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
||||||
6
charts/it-tools/Chart.lock
Normal file
6
charts/it-tools/Chart.lock
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: common
|
||||||
|
repository: https://bjw-s.github.io/helm-charts
|
||||||
|
version: 3.3.2
|
||||||
|
digest: sha256:5a0f9f06aa383b7cc3070899b879401bcd4ae48b021d0a2b7f9ba39827019e24
|
||||||
|
generated: "2024-08-15T17:47:53.312594+02:00"
|
||||||
29
charts/it-tools/Chart.yaml
Normal file
29
charts/it-tools/Chart.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: it-tools
|
||||||
|
description: Collection of handy online tools for developers, with great UX.
|
||||||
|
home: https://github.com/plcnk/charts/tree/master/charts/it-tools
|
||||||
|
icon: https://raw.githubusercontent.com/plcnk/charts/master/charts/it-tools/icon.svg
|
||||||
|
type: application
|
||||||
|
version: 2.0.0
|
||||||
|
# renovate datasource=docker depName=ghcr.io/corentinth/it-tools
|
||||||
|
appVersion: "2024.5.13-a0bc346"
|
||||||
|
kubeVersion: ">=1.22.0-0"
|
||||||
|
keywords:
|
||||||
|
- it-tools
|
||||||
|
- it
|
||||||
|
- tools
|
||||||
|
dependencies:
|
||||||
|
- name: common
|
||||||
|
repository: https://bjw-s.github.io/helm-charts
|
||||||
|
version: 3.3.2
|
||||||
|
sources:
|
||||||
|
- https://github.com/CorentinTh/it-tools
|
||||||
|
annotations:
|
||||||
|
artifacthub.io/changes: |-
|
||||||
|
- kind: changed
|
||||||
|
description: Major chart overhaul. Now using bjw-s's common library chart.
|
||||||
|
artifacthub.io/links: |-
|
||||||
|
- name: App Source
|
||||||
|
url: https://github.com/CorentinTh/it-tools
|
||||||
|
- name: Chart Source
|
||||||
|
url: https://github.com/plcnk/charts/tree/master/charts/it-tools
|
||||||
105
charts/it-tools/README.md
Normal file
105
charts/it-tools/README.md
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
# # it-tools
|
||||||
|
|
||||||
|
<img src="https://raw.githubusercontent.com/plcnk/charts/master/charts/it-tools/icon.svg" align="right" width="92" alt="it-tools logo">
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
Collection of handy online tools for developers, with great UX.
|
||||||
|
|
||||||
|
**Homepage:** <https://github.com/plcnk/charts/tree/master/charts/it-tools>
|
||||||
|
|
||||||
|
**This chart is not maintained by the upstream project and any issues with the chart should be raised
|
||||||
|
[here](https://github.com/plcnk/charts/issues/new?assignees=plcnk&labels=bug&template=bug_report.yaml&name=it-tools&version=2.0.0)**
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
|
||||||
|
* <https://github.com/CorentinTh/it-tools>
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
Kubernetes: `>=1.22.0-0`
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
| Repository | Name | Version |
|
||||||
|
|------------|------|---------|
|
||||||
|
| <https://bjw-s.github.io/helm-charts> | common | 3.3.2 |
|
||||||
|
|
||||||
|
## Installing the Chart
|
||||||
|
|
||||||
|
To install the chart with the release name `it-tools`
|
||||||
|
|
||||||
|
### OCI (Recommended)
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm install it-tools oci://ghcr.io/plcnk/charts/it-tools
|
||||||
|
```
|
||||||
|
|
||||||
|
### Traditional
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm repo add plcnk https://charts.plcnk.net
|
||||||
|
helm repo update
|
||||||
|
helm install it-tools plcnk/it-tools
|
||||||
|
```
|
||||||
|
|
||||||
|
## Uninstalling the Chart
|
||||||
|
|
||||||
|
To uninstall the `it-tools` deployment
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm uninstall it-tools
|
||||||
|
```
|
||||||
|
|
||||||
|
The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values.
|
||||||
|
Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common).
|
||||||
|
|
||||||
|
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm install it-tools \
|
||||||
|
--set env.TZ="America/New York" \
|
||||||
|
plcnk/it-tools
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm install it-tools plcnk/it-tools -f values.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Custom configuration
|
||||||
|
|
||||||
|
N/A
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common)
|
||||||
|
|
||||||
|
| Key | Type | Default | Description |
|
||||||
|
|-----|------|---------|-------------|
|
||||||
|
| controllers.main.containers.app.env | object | See [values.yaml](./values.yaml) | Environment variables |
|
||||||
|
| controllers.main.containers.app.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
|
||||||
|
| controllers.main.containers.app.image.repository | string | `"ghcr.io/corentinth/it-tools"` | Image repository |
|
||||||
|
| controllers.main.containers.app.image.tag | string | `"2024.5.13-a0bc346"` | Image tag |
|
||||||
|
| controllers.main.containers.app.securityContext.allowPrivilegeEscalation | bool | `false` | Disable privilege escalations |
|
||||||
|
| controllers.main.containers.app.securityContext.capabilities | object | `{"drop":["ALL"]}` | Drop all capabilities |
|
||||||
|
| controllers.main.containers.app.securityContext.readOnlyRootFilesystem | bool | `true` | Mount the container's root filesystem as read-only |
|
||||||
|
| controllers.main.pod.securityContext.fsGroup | int | `65534` | Volume binds will be granted to `nobody` group |
|
||||||
|
| controllers.main.pod.securityContext.runAsGroup | int | `65534` | Run as `nobody` group |
|
||||||
|
| controllers.main.pod.securityContext.runAsNonRoot | bool | `true` | Run container as a non-root user |
|
||||||
|
| controllers.main.pod.securityContext.runAsUser | int | `65534` | Run as `nobody` user |
|
||||||
|
| controllers.main.resources | object | `{}` | Set the resource requests / limits for the container. |
|
||||||
|
| controllers.main.type | string | `"deployment"` | Controller type |
|
||||||
|
| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. |
|
||||||
|
| persistence | object | See [values.yaml](./values.yaml) | Configure persistence for the chart under this key. |
|
||||||
|
| service | object | See [values.yaml](./values.yaml) | Configure the services for the chart here. |
|
||||||
|
|
||||||
|
---
|
||||||
|
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)
|
||||||
13
charts/it-tools/README_CONFIG.md.gotmpl
Normal file
13
charts/it-tools/README_CONFIG.md.gotmpl
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{{- define "custom.chart.name" -}}
|
||||||
|
# {{ .Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.custom.configuration.header" -}}
|
||||||
|
## Custom configuration
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.custom.configuration" -}}
|
||||||
|
{{ template "custom.custom.configuration.header" . }}
|
||||||
|
|
||||||
|
N/A
|
||||||
|
{{- end -}}
|
||||||
Binary file not shown.
6
charts/it-tools/icon.svg
Normal file
6
charts/it-tools/icon.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 9.7 KiB |
93
charts/it-tools/templates/common.yaml
Normal file
93
charts/it-tools/templates/common.yaml
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
{{/* Append the hardcoded settings */}}
|
||||||
|
{{- define "it-tools.harcodedValues" -}}
|
||||||
|
configMaps:
|
||||||
|
nginx-conf:
|
||||||
|
enabled: true
|
||||||
|
data:
|
||||||
|
nginx.conf: |
|
||||||
|
worker_processes auto;
|
||||||
|
|
||||||
|
error_log /tmp/nginx/error.log warn;
|
||||||
|
pid /tmp/nginx/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
cache:
|
||||||
|
enabled: true
|
||||||
|
type: emptyDir
|
||||||
|
advancedMounts:
|
||||||
|
main:
|
||||||
|
app:
|
||||||
|
- path: /var/cache/nginx
|
||||||
|
tmp:
|
||||||
|
enabled: true
|
||||||
|
type: emptyDir
|
||||||
|
advancedMounts:
|
||||||
|
main:
|
||||||
|
app:
|
||||||
|
- path: /tmp/nginx
|
||||||
|
nginx-conf:
|
||||||
|
enabled: true
|
||||||
|
type: configMap
|
||||||
|
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}-nginx-conf
|
||||||
|
advancedMounts:
|
||||||
|
main:
|
||||||
|
app:
|
||||||
|
- path: /etc/nginx/nginx.conf
|
||||||
|
subPath: nginx.conf
|
||||||
|
|
||||||
|
controllers:
|
||||||
|
main:
|
||||||
|
containers:
|
||||||
|
app:
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: true
|
||||||
|
custom: true
|
||||||
|
spec:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: http
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 30
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
custom: true
|
||||||
|
spec:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: http
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 30
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $tmplVars := deepCopy . -}}
|
||||||
|
{{ include "bjw-s.common.loader.init" $tmplVars }}
|
||||||
|
{{- $defaultValues := include "it-tools.harcodedValues" $tmplVars | fromYaml -}}
|
||||||
|
{{- $_ := mustMerge .Values $defaultValues -}}
|
||||||
|
|
||||||
|
{{/* Render the templates */}}
|
||||||
|
{{ include "bjw-s.common.loader.init" . }}
|
||||||
|
{{ include "bjw-s.common.loader.generate" . }}
|
||||||
95
charts/it-tools/values.yaml
Normal file
95
charts/it-tools/values.yaml
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
---
|
||||||
|
#
|
||||||
|
# IMPORTANT NOTE
|
||||||
|
#
|
||||||
|
# This chart inherits from our common library chart. You can check the default values/options here:
|
||||||
|
# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml
|
||||||
|
#
|
||||||
|
|
||||||
|
controllers:
|
||||||
|
main:
|
||||||
|
# -- Controller type
|
||||||
|
type: deployment
|
||||||
|
containers:
|
||||||
|
app:
|
||||||
|
image:
|
||||||
|
# -- Image repository
|
||||||
|
repository: ghcr.io/corentinth/it-tools
|
||||||
|
# -- Image pull policy
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
# -- Image tag
|
||||||
|
tag: 2024.5.13-a0bc346
|
||||||
|
|
||||||
|
# -- Environment variables
|
||||||
|
# @default -- See [values.yaml](./values.yaml)
|
||||||
|
env: {}
|
||||||
|
# TZ: UTC
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
# -- Mount the container's root filesystem as read-only
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
# -- Disable privilege escalations
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
# -- Drop all capabilities
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
|
||||||
|
pod:
|
||||||
|
securityContext:
|
||||||
|
# -- Run container as a non-root user
|
||||||
|
runAsNonRoot: true
|
||||||
|
# -- Run as `nobody` user
|
||||||
|
runAsUser: 65534
|
||||||
|
# -- Run as `nobody` group
|
||||||
|
runAsGroup: 65534
|
||||||
|
# -- Volume binds will be granted to `nobody` group
|
||||||
|
fsGroup: 65534
|
||||||
|
|
||||||
|
# -- Set the resource requests / limits for the container.
|
||||||
|
resources: {}
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
# -- Configure the services for the chart here.
|
||||||
|
# @default -- See [values.yaml](./values.yaml)
|
||||||
|
service:
|
||||||
|
main:
|
||||||
|
controller: main
|
||||||
|
ports:
|
||||||
|
http:
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
# -- Configure persistence for the chart under this key.
|
||||||
|
# @default -- See [values.yaml](./values.yaml)
|
||||||
|
persistence:
|
||||||
|
data:
|
||||||
|
enabled: false
|
||||||
|
retain: true
|
||||||
|
# storageClass: ""
|
||||||
|
# accessMode: ReadWriteOnce
|
||||||
|
# size: 1Gi
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
# -- Enable and configure ingress settings for the chart under this key.
|
||||||
|
# @default -- See [values.yaml](./values.yaml)
|
||||||
|
main:
|
||||||
|
enabled: false
|
||||||
|
# className: ""
|
||||||
|
# annotations: {}
|
||||||
|
# hosts:
|
||||||
|
# - host: &host-main "chart-example.local"
|
||||||
|
# paths:
|
||||||
|
# - path: /
|
||||||
|
# pathType: Prefix
|
||||||
|
# service:
|
||||||
|
# identifier: main
|
||||||
|
# port: http
|
||||||
|
# tls:
|
||||||
|
# - secretName: chart-example-tls
|
||||||
|
# hosts:
|
||||||
|
# - *host-main
|
||||||
39
hack/gen-chart-summary.sh
Executable file
39
hack/gen-chart-summary.sh
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# require yq
|
||||||
|
command -v yq >/dev/null 2>&1 || {
|
||||||
|
echo >&2 'yq (https://github.com/mikefarah/yq) is not installed. Aborting.'
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Absolute path of repository
|
||||||
|
repository="$(git rev-parse --show-toplevel)"
|
||||||
|
charts_folder="$repository/charts"
|
||||||
|
charts_summary_file="$repository/README.md"
|
||||||
|
charts_header='## Chart Overview'
|
||||||
|
|
||||||
|
# Gather all charts
|
||||||
|
stable_charts="$(find "$charts_folder" -name "Chart.yaml" | sort)"
|
||||||
|
|
||||||
|
sed -i '' '/^'"$charts_header"'$/,$d' "$charts_summary_file"
|
||||||
|
|
||||||
|
{
|
||||||
|
echo "$charts_header"
|
||||||
|
echo
|
||||||
|
echo "| Chart | Description |"
|
||||||
|
echo "| ----- | ----------- |"
|
||||||
|
for chart_yaml in ${stable_charts[@]}; do
|
||||||
|
if ! git ls-files --error-unmatch "$chart_yaml" &>/dev/null; then continue; fi
|
||||||
|
IFS=$'\t' read -r chart_name chart_description chart_icon < <(yq eval -o=tsv '[.name, .description, .icon // ""]' "$chart_yaml")
|
||||||
|
if [[ -n "$chart_icon" ]]; then
|
||||||
|
width=18
|
||||||
|
if [[ "$chart_name" == mnemonic-ninja ]]; then
|
||||||
|
width=12
|
||||||
|
fi
|
||||||
|
chart_icon="<img src='$chart_icon' alt='$chart_name icon' width='${width}px' align='right' loading='lazy'>"
|
||||||
|
fi
|
||||||
|
pretty_name="$(head -n1 "$(dirname "$chart_yaml")/README.md" | sed 's/^# //')"
|
||||||
|
echo "| [$pretty_name $chart_icon](charts/$chart_name/) | $chart_description |"
|
||||||
|
done
|
||||||
|
} >> "$charts_summary_file"
|
||||||
59
hack/gen-helm-docs.sh
Executable file
59
hack/gen-helm-docs.sh
Executable file
@ -0,0 +1,59 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Generate helm-docs for Helm charts
|
||||||
|
# Usage ./gen-helm-docs.sh [chart]
|
||||||
|
|
||||||
|
# require helm-docs
|
||||||
|
command -v helm-docs >/dev/null 2>&1 || {
|
||||||
|
echo >&2 'helm-docs (https://github.com/norwoodj/helm-docs) is not installed. Aborting.'
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# require yq
|
||||||
|
command -v yq >/dev/null 2>&1 || {
|
||||||
|
echo >&2 'yq (https://github.com/mikefarah/yq) is not installed. Aborting.'
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Absolute path of repository
|
||||||
|
repository="$(git rev-parse --show-toplevel)"
|
||||||
|
charts_folder="$repository/charts"
|
||||||
|
|
||||||
|
# Templates to copy into each chart directory
|
||||||
|
template_dir="$repository/hack/templates"
|
||||||
|
readme_config_template="$template_dir/README_CONFIG.md.gotmpl"
|
||||||
|
icon_template=$(<"$template_dir/icon.gotmpl")
|
||||||
|
|
||||||
|
# Gather all charts using the common library, excluding common-test
|
||||||
|
charts="$(find "$charts_folder" -name Chart.yaml)"
|
||||||
|
|
||||||
|
# Allow for a specific chart to be passed in as a argument
|
||||||
|
if [ $# -ge 1 ] && [ -n "$1" ]; then
|
||||||
|
root="$(find "$charts_folder" -name "$1")"
|
||||||
|
charts="$root/Chart.yaml"
|
||||||
|
if [ ! -f "$charts" ]; then
|
||||||
|
echo "Chart $1 does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
root="$charts_folder"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for chart in $charts; do (
|
||||||
|
chart_directory="$(dirname "$chart")"
|
||||||
|
icon="$(yq eval '.icon // ""' "$chart" 2>/dev/null)"
|
||||||
|
|
||||||
|
# Copy CONFIG template to each Chart directory, do not overwrite if exists
|
||||||
|
cp -n "$readme_config_template" "$chart_directory" || true
|
||||||
|
|
||||||
|
# Run helm-docs for charts
|
||||||
|
helm-docs \
|
||||||
|
--log-level=warning \
|
||||||
|
--template-files="$template_dir/README.md.gotmpl" \
|
||||||
|
--template-files=<(echo "${icon_template/\$ICON/$icon}") \
|
||||||
|
--template-files="$(basename "$readme_config_template")" \
|
||||||
|
--badge-style=flat \
|
||||||
|
--chart-search-root="$root" \
|
||||||
|
--chart-to-generate="$chart_directory"
|
||||||
|
) done
|
||||||
170
hack/templates/README.md.gotmpl
Normal file
170
hack/templates/README.md.gotmpl
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
{{- define "custom.repository.organization" -}}
|
||||||
|
plcnk
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.repository.url" -}}
|
||||||
|
https://github.com/plcnk/charts
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.helm.url" -}}
|
||||||
|
https://charts.plcnk.net
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.helm.path" -}}
|
||||||
|
{{ template "custom.repository.organization" . }}/{{ template "chart.name" . }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.helm.oci_url" -}}
|
||||||
|
oci://ghcr.io/plcnk/charts
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.notes" -}}
|
||||||
|
**This chart is not maintained by the upstream project and any issues with the chart should be raised
|
||||||
|
[here]({{ template "custom.repository.url" . }}/issues/new?assignees=plcnk&labels=bug&template=bug_report.yaml&name={{ template "chart.name" . }}&version={{ template "chart.version" . }})**
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.requirements" -}}
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
{{ template "chart.kubeVersionLine" . }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.dependencies" -}}
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
{{ if gt (len .Dependencies) 0 }}
|
||||||
|
| Repository | Name | Version |
|
||||||
|
|------------|------|---------|
|
||||||
|
{{- range .Dependencies }}
|
||||||
|
{{- if .Alias }}
|
||||||
|
| <{{ .Repository }}> | {{ .Alias }}({{ .Name }}) | {{ .Version }} |
|
||||||
|
{{- else }}
|
||||||
|
| <{{ .Repository }}> | {{ .Name }} | {{ .Version }} |
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{ else }}
|
||||||
|
This chart has no dependencies.
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.install" -}}
|
||||||
|
## Installing the Chart
|
||||||
|
|
||||||
|
To install the chart with the release name `{{ template "chart.name" . }}`
|
||||||
|
|
||||||
|
### OCI (Recommended)
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm install {{ template "chart.name" . }} {{ template "custom.helm.oci_url" . }}/{{ template "chart.name" . }}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Traditional
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm repo add {{ template "custom.repository.organization" . }} {{ template "custom.helm.url" . }}
|
||||||
|
helm repo update
|
||||||
|
helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }}
|
||||||
|
```
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.uninstall" -}}
|
||||||
|
## 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 **including persistent volumes** and deletes the release.
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.configuration.header" -}}
|
||||||
|
## Configuration
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
{{- define "custom.bjwsRef" -}}
|
||||||
|
{{- $ref := "" -}}
|
||||||
|
{{- range .Dependencies -}}
|
||||||
|
{{- if and (eq .Repository "https://bjw-s.github.io/helm-charts") (eq .Name "common") (semverCompare "^1.x" .Version) -}}
|
||||||
|
{{- $ref = "a081de5" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- default "main" $ref -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.configuration.readValues" -}}
|
||||||
|
Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values.
|
||||||
|
Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/tree/{{ template "custom.bjwsRef" . }}/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/{{ template "custom.bjwsRef" . }}/charts/library/common).
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.configuration.example.set" -}}
|
||||||
|
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm install {{ template "chart.name" . }} \
|
||||||
|
--set env.TZ="America/New York" \
|
||||||
|
{{ template "custom.helm.path" . }}
|
||||||
|
```
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.configuration.example.file" -}}
|
||||||
|
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }} -f values.yaml
|
||||||
|
```
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.valuesSection" -}}
|
||||||
|
## Values
|
||||||
|
|
||||||
|
**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/{{ template "custom.bjwsRef" . }}/charts/library/common)
|
||||||
|
|
||||||
|
{{ template "chart.valuesTable" . }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.helm-docs.versionFooter" -}}
|
||||||
|
---
|
||||||
|
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
# {{ template "custom.chart.name" . }}
|
||||||
|
|
||||||
|
{{ template "custom.chart.icon" . }}
|
||||||
|
|
||||||
|
{{ template "chart.versionBadge" . }}
|
||||||
|
{{ template "chart.typeBadge" . }}
|
||||||
|
{{ template "chart.appVersionBadge" . }}
|
||||||
|
|
||||||
|
{{ template "chart.description" . }}
|
||||||
|
|
||||||
|
{{ template "chart.homepageLine" . }}
|
||||||
|
|
||||||
|
{{ template "custom.notes" . }}
|
||||||
|
|
||||||
|
{{ template "chart.sourcesSection" . }}
|
||||||
|
|
||||||
|
{{ template "custom.requirements" . }}
|
||||||
|
|
||||||
|
{{ template "custom.dependencies" . }}
|
||||||
|
|
||||||
|
{{ template "custom.install" . }}
|
||||||
|
|
||||||
|
{{ template "custom.uninstall" . }}
|
||||||
|
|
||||||
|
{{ template "custom.configuration.header" . }}
|
||||||
|
|
||||||
|
{{ template "custom.configuration.readValues" . }}
|
||||||
|
|
||||||
|
{{ template "custom.configuration.example.set" . }}
|
||||||
|
|
||||||
|
{{ template "custom.configuration.example.file" . }}
|
||||||
|
|
||||||
|
{{ template "custom.custom.configuration" . }}
|
||||||
|
|
||||||
|
{{ template "custom.valuesSection" . }}
|
||||||
|
|
||||||
|
{{ template "custom.helm-docs.versionFooter" . }}
|
||||||
|
{{ "" }}
|
||||||
13
hack/templates/README_CONFIG.md.gotmpl
Normal file
13
hack/templates/README_CONFIG.md.gotmpl
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{{- define "custom.chart.name" -}}
|
||||||
|
# {{ .Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.custom.configuration.header" -}}
|
||||||
|
## Custom configuration
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "custom.custom.configuration" -}}
|
||||||
|
{{ template "custom.custom.configuration.header" . }}
|
||||||
|
|
||||||
|
N/A
|
||||||
|
{{- end -}}
|
||||||
5
hack/templates/icon.gotmpl
Normal file
5
hack/templates/icon.gotmpl
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{{- define "custom.chart.icon" -}}
|
||||||
|
{{- with "$ICON" -}}
|
||||||
|
<img src="{{ . }}" align="right" width="92" alt="{{ template "chart.name" $ }} logo">
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
56
hack/update-changelog.sh
Executable file
56
hack/update-changelog.sh
Executable file
@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
# require yq
|
||||||
|
command -v yq >/dev/null 2>&1 || {
|
||||||
|
echo >&2 'yq (https://github.com/mikefarah/yq) is not installed. Aborting.'
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$#" -lt 2 ]; then
|
||||||
|
echo 'Usage: {append | replace} changelog [chart...]'
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
update_type="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
changelog="$(yq -P <<<"$1")"
|
||||||
|
export changelog
|
||||||
|
shift
|
||||||
|
|
||||||
|
CHARTS=()
|
||||||
|
if [ "$#" -gt 0 ]; then
|
||||||
|
# Get changed dirs from params
|
||||||
|
for file in "$@"; do
|
||||||
|
CHARTS+=( "$(dirname "$file")" )
|
||||||
|
done
|
||||||
|
else
|
||||||
|
# Get changed dirs from uncommitted changes
|
||||||
|
for file in $(git status --porcelain charts | grep '^M' | cut -c4-); do
|
||||||
|
CHARTS+=( "$(dirname "$file")" )
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
CHARTS=( $(sort -u <<<"${CHARTS[*]}") )
|
||||||
|
|
||||||
|
case "$update_type" in
|
||||||
|
append)
|
||||||
|
expression='.annotations."artifacthub.io/changes" |= (@yamld + (strenv(changelog) | @yamld) | @yaml | trim)'
|
||||||
|
;;
|
||||||
|
replace)
|
||||||
|
expression='.annotations."artifacthub.io/changes" = (env(changelog) | @yaml | trim)'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid update type: $update_type" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
for chart in "${CHARTS[@]}"; do (
|
||||||
|
meta_file="$chart/Chart.yaml"
|
||||||
|
if [ ! -f "$meta_file" ]; then echo >&2 "Invalid file: $meta_file"; exit; fi
|
||||||
|
|
||||||
|
yq --inplace "$expression" "$meta_file"
|
||||||
|
echo "Updated $(basename "$chart") changelog"
|
||||||
|
) done
|
||||||
53
hack/update-version.sh
Executable file
53
hack/update-version.sh
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
# require yq
|
||||||
|
command -v yq >/dev/null 2>&1 || {
|
||||||
|
echo >&2 'yq (https://github.com/mikefarah/yq) is not installed. Aborting.'
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function _print_usage() {
|
||||||
|
echo 'Usage: {major|minor|patch} [chart...]'
|
||||||
|
exit "${1:-0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$#" -eq 0 ]; then
|
||||||
|
_print_usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
UPDATE_TYPE="$(tr '[:upper:]' '[:lower:]' <<<"$1")"
|
||||||
|
shift
|
||||||
|
case "$UPDATE_TYPE" in
|
||||||
|
major) SCRIPT='[(.0 | @yamld | . + 1), 0, 0]' ;;
|
||||||
|
minor) SCRIPT='[.0, (.1 | @yamld | . + 1), 0]' ;;
|
||||||
|
patch) SCRIPT='[.0, .1, (.2 | @yamld | . + 1)]' ;;
|
||||||
|
*) echo >&2 "Invalid update type: $UPDATE_TYPE"; _print_usage 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "Performing $UPDATE_TYPE version bump"
|
||||||
|
|
||||||
|
CHARTS=()
|
||||||
|
if [ "$#" -gt 0 ]; then
|
||||||
|
# Get changed dirs from params
|
||||||
|
for file in "$@"; do
|
||||||
|
CHARTS+=( "$(dirname "$file")" )
|
||||||
|
done
|
||||||
|
else
|
||||||
|
# Get changed dirs from uncommitted changes
|
||||||
|
for file in $(git status --porcelain charts | grep '^M' | cut -c4-); do
|
||||||
|
CHARTS+=( "$(dirname "$file")" )
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
CHARTS=( $(sort -u <<<"${CHARTS[*]}") )
|
||||||
|
|
||||||
|
for chart in "${CHARTS[@]}"; do (
|
||||||
|
meta_file="$chart/Chart.yaml"
|
||||||
|
if [ ! -f "$meta_file" ]; then echo >&2 "Invalid file: $meta_file"; exit; fi
|
||||||
|
|
||||||
|
current="$(yq '.version' "$meta_file")"
|
||||||
|
yq -i '.version |= (split(".") | '"$SCRIPT"' | join("."))' "$meta_file"
|
||||||
|
new="$(yq '.version' "$meta_file")"
|
||||||
|
echo "Updated $(basename "$chart") from v$current to v$new"
|
||||||
|
) done
|
||||||
3964
index.yaml
3964
index.yaml
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user