WIP Cleanup configuration options (#4365)

* chore(apps): remove un-needed UI elements

* dont grab metallb upstreams anymore

* add new readme template pointing to the website and remove helm-values system

* Move readme generation to daily job

* remove readme addition and remve readme generation from build-release script

* bump

* remvoe the use of helm-docs

* completely remove helm-docs

* move tag sync to renovate bump action

* fully remove tag sync and remove needless helm dependency updates

* remove needless helm prep

* get rid of needlessly loaded grafana repo
This commit is contained in:
Kjeld Schouten-Lebbing 2022-11-10 16:46:44 +01:00 committed by GitHub
parent 78626622e7
commit 5864fce3ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 290 additions and 1284 deletions

View File

@ -54,6 +54,5 @@ chart-repos:
- truecharts=https://charts.truecharts.org
- truecharts-library=https://library-charts.truecharts.org
- bitnami=https://charts.bitnami.com/bitnami
- metallb=https://metallb.github.io/metallb
- grafana=https://grafana.github.io/helm-charts
- prometheus=https://prometheus-community.github.io/helm-charts

View File

@ -16,6 +16,5 @@ chart-repos:
- truecharts=https://charts.truecharts.org
- truecharts-library=https://library-charts.truecharts.org
- bitnami=https://charts.bitnami.com/bitnami
- metallb=https://metallb.github.io/metallb
- grafana=https://grafana.github.io/helm-charts
- prometheus=https://prometheus-community.github.io/helm-charts

View File

@ -37,21 +37,6 @@ clean_catalog() {
}
export -f clean_catalog
prep_helm() {
if [[ -z "$standalone" ]]; then
helm repo add truecharts-old https://truecharts.org
helm repo add truecharts https://charts.truecharts.org
helm repo add truecharts-library https://library-charts.truecharts.org
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add metallb https://metallb.github.io/metallb
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo add amd-gpu-helm https://radeonopencompute.github.io/k8s-device-plugin/
helm repo update
fi
}
export -f prep_helm
clean_apps() {
local chart="$1"
local chartname="$2"

View File

@ -3,62 +3,6 @@ set -o errexit
set -o nounset
set -o pipefail
# Designed to ensure the appversion in Chart.yaml is in sync with the primary Chart tag if found
# Also makes sure that home link is pointing to the correct url
sync_tag() {
local chart="$1"
local chartname="$2"
local train="$3"
local chartversion="$4"
echo "Attempting to sync primary tag with appversion for: ${chartname}"
local tag="$(cat ${chart}/values.yaml | grep '^ tag: ' | awk -F" " '{ print $2 }' | head -1)"
tag="${tag%%@*}"
tag="${tag:-auto}"
tag=$(echo $tag | sed "s/release-//g")
tag=$(echo $tag | sed "s/release_//g")
tag=$(echo $tag | sed "s/version-//g")
tag=$(echo $tag | sed "s/version_//g")
tag="${tag#*V.}"
tag="${tag#*v-}"
tag="${tag#*v}"
tag="${tag%-*}"
tag="${tag:0:10}"
tag="${tag%-}"
tag="${tag%_}"
tag="${tag%.}"
echo "Updating tag of ${chartname} to ${tag}..."
sed -i -e "s|appVersion: .*|appVersion: \"${tag}\"|" "${chart}/Chart.yaml"
echo "Updating icon of ${chartname}..."
sed -i -e "s|icon: .*|icon: https:\/\/truecharts.org\/img\/hotlink-ok\/chart-icons\/${chartname}.png|" "${chart}/Chart.yaml"
echo "Updating home of ${chartname}..."
sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml"
echo "Attempting to update sources of ${chartname}..."
echo "Using go-yq verion: <$(go-yq -V)>"
# Get all sources (except truecharts)
curr_sources=$(go-yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml")
# Empty sources list in-place
go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
# Add truechart source
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
# Add the rest of the sources
while IFS= read -r line; do
src="$line" go-yq -i '.sources += env(src)' "${chart}/Chart.yaml"
done <<< "$curr_sources"
echo "Sources of ${chartname} updated!"
}
export -f sync_tag
sync_helmignore() {
local chart="$1"
local chartname="$2"
local train="$3"
local chartversion="$4"
echo "Attempting to sync HelmIgnore file for: ${chartname}"
rm -rf ${chart}/.helmignore
cp templates/chart/.helmignore ${chart}/
}
export -f sync_helmignore
create_changelog() {
local chart="$1"
local chartname="$2"
@ -82,21 +26,6 @@ create_changelog() {
}
export -f create_changelog
generate_docs() {
local chart="$1"
local chartname="$2"
local train="$3"
local chartversion="$4"
echo "Generating Docs"
helm-docs \
--ignore-file=".helmdocsignore" \
--output-file="README.md" \
--template-files="/__w/charts/charts/templates/docs/README.md.gotmpl" \
--chart-search-root="${chart}"
sed -i "s/TRAINPLACEHOLDER/${train}/" "${chart}/README.md"
}
export -f generate_docs
if [[ -d "charts/${1}" ]]; then
echo "Start processing charts/${1} ..."
@ -104,11 +33,7 @@ if [[ -d "charts/${1}" ]]; then
chartname=$(basename charts/${1})
train=$(basename $(dirname "charts/${1}"))
SCALESUPPORT=$(cat charts/${1}/Chart.yaml | yq '.annotations."truecharts.org/SCALE-support"' -r)
sync_helmignore "charts/${1}" "${chartname}" "$train" "${chartversion}" || echo "Syncing HelmIgnore file failed..."
helm dependency update "charts/${1}" --skip-refresh || (sleep 10 && helm dependency update "charts/${1}" --skip-refresh) || (sleep 10 && helm dependency update "charts/${1}" --skip-refresh)
sync_tag "charts/${1}" "${chartname}" "$train" "${chartversion}" || echo "Tag sync failed..."
create_changelog "charts/${1}" "${chartname}" "$train" "${chartversion}" || echo "changelog generation failed..."
generate_docs "charts/${1}" "${chartname}" "$train" "${chartversion}" || echo "Docs generation failed..."
else
echo "Chart 'charts/${1}' no longer exists in repo. Skipping it..."
fi

View File

@ -25,18 +25,12 @@ jobs:
helmv3
helm: "3.8.0"
- name: Install helm-docs
run: |
wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb
sudo dpkg -i /tmp/helm-docs.deb
- name: Prep Helm
run: |
helm repo add truecharts https://charts.truecharts.org
helm repo add truecharts-library https://library-charts.truecharts.org
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add metallb https://metallb.github.io/metallb
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo update
@ -97,7 +91,6 @@ jobs:
echo "copying docs to website for ${chart}"
rm -rf website/docs/charts/*/${chart}
mkdir -p website/docs/charts/${train}/${chart} || echo "chart path already exists, continuing..."
yes | cp -rf charts/${train}/${chart}/README.md website/docs/charts/${train}/${chart}/index.md 2>/dev/null || :
yes | cp -rf charts/${train}/${chart}/CHANGELOG.md website/docs/charts/${train}/${chart}/CHANGELOG.md 2>/dev/null || :
yes | cp -rf charts/${train}/${chart}/docs/* website/docs/charts/${train}/${chart}/ 2>/dev/null || :
yes | cp -rf charts/${train}/${chart}/icon.png website/static/img/hotlink-ok/chart-icons/${chart}.png 2>/dev/null || :
@ -187,17 +180,12 @@ jobs:
helmv3
helm: "3.8.0"
- name: Install helm-docs
run: |
wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb
sudo dpkg -i /tmp/helm-docs.deb
- name: Prep Helm
run: |
helm repo add truecharts https://charts.truecharts.org
helm repo add truecharts-library https://library-charts.truecharts.org
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add metallb https://metallb.github.io/metallb
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo update
- name: Checkout
@ -253,17 +241,12 @@ jobs:
helmv3
helm: "3.8.0"
- name: Install helm-docs
run: |
wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb
sudo dpkg -i /tmp/helm-docs.deb
- name: Prep Helm
run: |
helm repo add truecharts https://charts.truecharts.org
helm repo add truecharts-library https://library-charts.truecharts.org
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add metallb https://metallb.github.io/metallb
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo update
- name: Checkout
@ -315,8 +298,8 @@ jobs:
helm repo add truecharts https://charts.truecharts.org
helm repo add truecharts-library https://library-charts.truecharts.org
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add metallb https://metallb.github.io/metallb
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo update
- name: Checkout

48
.github/workflows/daily.yaml vendored Normal file
View File

@ -0,0 +1,48 @@
name: "Daily Tasks"
on:
workflow_dispatch:
jobs:
generate-readme:
runs-on: ubuntu-latest
name: "Generate readme files"
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
with:
token: ${{ secrets.BOT_TOKEN }}
fetch-depth: 0
- name: generate readme.md
shell: bash
run: |
for train in stable SCALE incubator games enterprise develop non-free deprecated dependency core; do
for chart in charts/${train}/*; do
if [ -d "${chart}" ]; then
echo "Generating readme.md for ${train}/${chart}"
cp "templates/README.md.tpl" "${chart}/README.md"
sed -i "s/TRAINPLACEHOLDER/${train}/" "${chart}/README.md"
sed -i "s/CHARTPLACEHOLDER/${chartname}/" "${chart}/README.md"
fi
done
done
- name: generate HelmIgnore
shell: bash
run: |
for train in stable SCALE incubator games enterprise develop non-free deprecated dependency core; do
for chart in charts/${train}/*; do
if [ -d "${chart}" ]; then
echo "Attempting to sync HelmIgnore file for: ${chartname}"
rm -rf ${chart}/.helmignore
cp templates/chart/.helmignore ${chart}/
fi
done
done
- name: Commit changes
run: |
git config user.name "TrueCharts-Bot"
git config user.email "bot@truecharts.org"
git add --all
git commit -sm "Commit daily changes" || exit 0
git push

View File

@ -41,6 +41,52 @@ jobs:
run: echo '${{ toJson(steps.filter.outputs) }}' > changes.json
- name: Bump
run: |
# Designed to ensure the appversion in Chart.yaml is in sync with the primary Chart tag if found
# Also makes sure that home link is pointing to the correct url
sync_tag() {
local chart="$1"
local chartname="$2"
local train="$3"
echo "Attempting to sync primary tag with appversion for: ${chartname}"
local tag="$(cat ${chart}/values.yaml | grep '^ tag: ' | awk -F" " '{ print $2 }' | head -1)"
tag="${tag%%@*}"
tag="${tag:-auto}"
tag=$(echo $tag | sed "s/release-//g")
tag=$(echo $tag | sed "s/release_//g")
tag=$(echo $tag | sed "s/version-//g")
tag=$(echo $tag | sed "s/version_//g")
tag="${tag#*V.}"
tag="${tag#*v-}"
tag="${tag#*v}"
tag="${tag%-*}"
tag="${tag:0:10}"
tag="${tag%-}"
tag="${tag%_}"
tag="${tag%.}"
echo "Updating tag of ${chartname} to ${tag}..."
sed -i -e "s|appVersion: .*|appVersion: \"${tag}\"|" "${chart}/Chart.yaml"
echo "Updating icon of ${chartname}..."
sed -i -e "s|icon: .*|icon: https:\/\/truecharts.org\/img\/hotlink-ok\/chart-icons\/${chartname}.png|" "${chart}/Chart.yaml"
echo "Updating home of ${chartname}..."
sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml"
echo "Attempting to update sources of ${chartname}..."
echo "Using go-yq verion: <$(go-yq -V)>"
# Get all sources (except truecharts)
curr_sources=$(go-yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml")
# Empty sources list in-place
go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
# Add truechart source
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
# Add the rest of the sources
while IFS= read -r line; do
src="$line" go-yq -i '.sources += env(src)' "${chart}/Chart.yaml"
done <<< "$curr_sources"
echo "Sources of ${chartname} updated!"
}
export -f sync_tag
# The actual script
APPS=$(jq --raw-output '.changed_files | fromjson | .[] |= sub("(?<filepath>(?<first_directory>(?<root1>[\/]?)[^\/]+\/)(?<second_directory>(?<root2>[\/]?)[^\/]+\/)(?<third_directory>(?<root3>[\/]?)[^\/]+)(?<extra_paths>.+))"; "\(.third_directory)") | unique' changes.json | jq -r '.[]')
echo "changed apps: ${APPS[*]}"
for chart in ${APPS[*]}
@ -78,6 +124,8 @@ jobs:
echo "Bumping patch version for ${train}/${chart}"
./tools/bump.sh patch ./charts/${train}/${chart}
fi
sync_tag "charts/${train}/${chart}" "${chart}" "${train}"
done
- name: Cleanup
run: |

1
.gitignore vendored
View File

@ -54,4 +54,3 @@ chartsrepo/
.cr-index/
website/
pub/
readme.md

View File

@ -22,7 +22,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/jackett
- https://github.com/Jackett/Jackett
type: application
version: 11.0.130
version: 11.1.0
annotations:
truecharts.org/catagories: |
- media

27
templates/README.md.tpl Normal file
View File

@ -0,0 +1,27 @@
# README
## General Info
TrueCharts can be installed as both *normal* Helm Charts or as Apps on TrueNAS SCALE.
However only installations using the TrueNAS SCALE Apps system are supported.
For more information about this App, please check the docs on the TrueCharts [website](https://truecharts.org/docs/charts/TRAINPLACEHOLDER/CHARTPLACEHOLDER)
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)**
## Support
- Please check our [quick-start guides for TrueNAS SCALE](https://truecharts.org/docs/manual/SCALE%20Apps/Important-MUST-READ).
- See the [Website](https://truecharts.org)
- Check our [Discord](https://discord.gg/tVsPTHWTtr)
- Open a [issue](https://github.com/truecharts/apps/issues/new/choose)
---
## Sponsor TrueCharts
TrueCharts can only exist due to the incredible effort of our staff.
Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can!
*All Rights Reserved - The TrueCharts Project*

27
templates/docs/README.md Normal file
View File

@ -0,0 +1,27 @@
# README
## General Info
TrueCharts can be installed as both *normal* Helm Charts or as Apps on TrueNAS SCALE.
However only installations using the TrueNAS SCALE Apps system are supported.
For more information about this App, please check the docs on the TrueCharts [website](https://truecharts.org/docs/charts/TRAINPLACEHOLDER/CHARTPLACEHOLDER)
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)**
## Support
- Please check our [quick-start guides for TrueNAS SCALE](https://truecharts.org/docs/manual/SCALE%20Apps/Important-MUST-READ).
- See the [Website](https://truecharts.org)
- Check our [Discord](https://discord.gg/tVsPTHWTtr)
- Open a [issue](https://github.com/truecharts/apps/issues/new/choose)
---
## Sponsor TrueCharts
TrueCharts can only exist due to the incredible effort of our staff.
Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can!
*All Rights Reserved - The TrueCharts Project*

View File

@ -1,36 +0,0 @@
- variable: netshoot
label: Netshoot
schema:
additional_attrs: true
type: dict
attrs:
- variable: enabled
label: Enabled
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: envList
label: Netshoot Environment Variables
schema:
type: list
show_if: [["type", "!=", "disabled"]]
default: []
items:
- variable: envItem
label: Environment Variable
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
required: true
- variable: value
label: Value
schema:
type: string
required: true

View File

@ -1,69 +0,0 @@
- variable: promtail
label: Promtail
schema:
additional_attrs: true
type: dict
attrs:
- variable: enabled
label: Enabled
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: loki
label: Loki URL
schema:
type: string
required: true
- variable: logs
label: Log Paths
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
required: true
- variable: path
label: Path
schema:
type: string
required: true
- variable: args
label: Promtail Command Line Arguments
schema:
type: list
show_if: [["type", "!=", "disabled"]]
default: []
items:
- variable: arg
label: Arg
schema:
type: string
required: true
- variable: envList
label: Promtail Environment Variables
schema:
type: list
show_if: [["type", "!=", "disabled"]]
default: []
items:
- variable: envItem
label: Environment Variable
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
required: true
- variable: value
label: Value
schema:
type: string
required: true

View File

@ -1,27 +1,8 @@
- variable: controller
group: Controller
group: "General Settings"
label: ""
schema:
additional_attrs: true
type: dict
attrs:
- variable: advanced
label: Show Advanced Controller Settings
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: type
description: Please specify type of workload to deploy
label: (Advanced) Controller Type
schema:
type: string
required: true
enum:
- value: deployment
description: Deployment
- value: statefulset
description: Statefulset
- value: daemonset
description: Daemonset

View File

@ -1 +0,0 @@
default: daemonset

View File

@ -1 +0,0 @@
default: deployment

View File

@ -1,47 +0,0 @@
- variable: expert
label: Show Expert Configuration Options
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: labelsList
label: Controller Labels
schema:
type: list
default: []
items:
- variable: labelItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string
- variable: annotationsList
label: Controller Annotations
schema:
type: list
default: []
items:
- variable: annotationItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string

View File

@ -1,5 +1,5 @@
- variable: customcommand
group: Controller
group: "General Settings"
label: "Custom Command"
description: "Do not click this unless you know what you are doing"
schema:

View File

@ -1,5 +1,5 @@
- variable: customextraargs
group: Controller
group: "General Settings"
label: "Extra Args"
description: "Do not click this unless you know what you are doing"
schema:

View File

@ -1 +0,0 @@
default: statefulset

View File

@ -1,6 +1,6 @@
- variable: TZ
label: Timezone
group: Container Configuration
group: "General Settings"
schema:
type: string
default: "Etc/UTC"
@ -9,7 +9,7 @@
- variable: envList
label: Extra Environment Variables
description: "Please be aware that some variables are set in the background, adding duplicates here might cause issues or prevent the app from starting..."
group: Container Configuration
group: "General Settings"
schema:
type: list
default: []
@ -28,79 +28,3 @@
label: Value
schema:
type: string
- variable: expertpodconf
group: Container Configuration
label: Show Expert Configuration
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: tty
label: Enable TTY
description: Determines whether containers in a pod runs with TTY enabled. By default pod has it disabled.
group: Workload Details
schema:
type: boolean
default: false
- variable: stdin
label: Enable STDIN
description: Determines whether containers in a pod runs with stdin enabled. By default pod has it disabled.
group: Workload Details
schema:
type: boolean
default: false
- variable: termination
group: Container Configuration
label: Termination settings
schema:
additional_attrs: true
type: dict
attrs:
- variable: gracePeriodSeconds
label: Grace Period Seconds
schema:
type: int
default: 10
- variable: podLabelsList
group: Container Configuration
label: Pod Labels
schema:
type: list
default: []
items:
- variable: podLabelItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string
- variable: podAnnotationsList
group: Container Configuration
label: Pod Annotations
schema:
type: list
default: []
items:
- variable: podAnnotationItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string

View File

@ -1,7 +0,0 @@
enum:
- value: deployment
description: Deployment
- value: statefulset
description: Statefulset
- value: daemonset
description: Daemonset

View File

@ -1,6 +1,6 @@
- variable: global
label: Global Settings
group: Controller
group: "General Settings"
schema:
type: dict
hidden: true

View File

@ -1,10 +1,8 @@
groups:
- name: Container Image
description: Image to be used for container
- name: Controller
description: Configure Workload Deployment
- name: Container Configuration
description: Additional Container Configuration
- name: General Settings
description: General Deployment Settings
- name: App Configuration
description: App Specific Config Options
- name: Networking and Services
@ -21,6 +19,8 @@ groups:
description: Traefik Middlewares
- name: Metrics
description: Metrics
- name: VPN
description: VPN
- name: Addons
description: Addon Configuration
- name: Advanced

View File

@ -1,14 +1,6 @@
- variable: advancedresources
label: Set Custom Resource Limits/Requests (Advanced)
group: Resources and Devices
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: resources
label: ""
group: Resources and Devices
label: "Resource Limits"
schema:
additional_attrs: true
type: dict
@ -38,6 +30,7 @@
schema:
additional_attrs: true
type: dict
hidden: true
attrs:
- variable: cpu
label: CPU
@ -45,6 +38,7 @@
schema:
type: string
default: 10m
hidden: true
valid_chars: '^(?!^0(\.0|m|)$)([0-9]+)(\.[0-9]|m?)$'
- variable: memory
label: "RAM"
@ -52,6 +46,7 @@
schema:
type: string
default: 50Mi
hidden: true
valid_chars: '^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$'
- variable: deviceList
label: Mount USB Devices

View File

@ -1,58 +0,0 @@
- variable: expert
label: Show Expert Configuration Options
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: enableFixedMiddlewares
description: These middlewares enforce a number of best practices.
label: Enable Default Middlewares
schema:
type: boolean
default: true
- variable: ingressClassName
label: IngressClass Name
schema:
type: string
default: ""
- variable: labelsList
label: Labels
schema:
type: list
default: []
items:
- variable: labelItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string
- variable: annotationsList
label: Annotations
schema:
type: list
default: []
items:
- variable: annotationItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string

View File

@ -1,176 +0,0 @@
- variable: ingressList
label: Add Manual Custom Ingresses
group: Ingress
schema:
type: list
default: []
items:
- variable: ingressListEntry
label: Custom Ingress
schema:
additional_attrs: true
type: dict
attrs:
- variable: enabled
label: Enable Ingress
schema:
type: boolean
default: true
hidden: true
- variable: name
label: Name
schema:
type: string
default: ""
- variable: ingressClassName
label: IngressClass Name
schema:
type: string
default: ""
- variable: labelsList
label: Labels
schema:
type: list
default: []
items:
- variable: labelItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string
- variable: annotationsList
label: Annotations
schema:
type: list
default: []
items:
- variable: annotationItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string
- variable: hosts
label: Hosts
schema:
type: list
default: []
items:
- variable: hostEntry
label: Host
schema:
additional_attrs: true
type: dict
attrs:
- variable: host
label: HostName
schema:
type: string
default: ""
required: true
- variable: paths
label: Paths
schema:
type: list
default: []
items:
- variable: pathEntry
label: Host
schema:
additional_attrs: true
type: dict
attrs:
- variable: path
label: Path
schema:
type: string
required: true
default: "/"
- variable: pathType
label: Path Type
schema:
type: string
required: true
default: Prefix
- variable: service
label: Linked Service
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Service Name
schema:
type: string
default: ""
- variable: port
label: Service Port
schema:
type: int
- variable: tls
label: TLS-Settings
schema:
type: list
default: []
items:
- variable: tlsEntry
label: Host
schema:
additional_attrs: true
type: dict
attrs:
- variable: hosts
label: Certificate Hosts
schema:
type: list
default: []
items:
- variable: host
label: Host
schema:
type: string
default: ""
required: true
- variable: scaleCert
label: Select TrueNAS SCALE Certificate
schema:
type: int
$ref:
- "definitions/certificate"
- variable: entrypoint
label: Traefik Entrypoint
description: Entrypoint used by Traefik when using Traefik as Ingress Provider
schema:
type: string
default: websecure
required: true
- variable: middlewares
label: Traefik Middlewares
description: Add previously created Traefik Middlewares to this Ingress
schema:
type: list
default: []
items:
- variable: name
label: Name
schema:
type: string
default: ""
required: true

View File

@ -5,6 +5,11 @@
type: string
default: websecure
required: true
- variable: ingressClassName
label: (Advanced/Optional) IngressClass Name
schema:
type: string
default: ""
- variable: middlewares
label: Traefik Middlewares
description: Add previously created Traefik Middlewares to this Ingress

View File

@ -4,94 +4,3 @@
show_if: [["type", "=", "pvc"]]
type: string
default: 256Gi
- variable: hostPathType
label: (Advanced) hostPath Type
schema:
show_if: [["type", "=", "hostPath"]]
type: string
default: ""
enum:
- value: ""
description: Default
- value: DirectoryOrCreate
description: DirectoryOrCreate
- value: Directory
description: Directory
- value: FileOrCreate
description: FileOrCreate
- value: File
description: File
- value: Socket
description: Socket
- value: CharDevice
description: CharDevice
- value: BlockDevice
description: BlockDevice
- variable: storageClass
label: (Advanced) storageClass
description: "Warning: Anything other than SCALE-ZFS or empty will break rollback!"
schema:
show_if: [["type", "=", "pvc"]]
type: string
default: SCALE-ZFS
- variable: accessMode
label: (Advanced) Access Mode
description: Allow or disallow multiple PVC's writhing to the same PV
schema:
show_if: [["type", "=", "pvc"]]
type: string
default: ReadWriteOnce
enum:
- value: ReadWriteOnce
description: ReadWriteOnce
- value: ReadOnlyMany
description: ReadOnlyMany
- value: ReadWriteMany
description: ReadWriteMany
- variable: advanced
label: Show Advanced Options
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: labelsList
label: Labels
schema:
type: list
default: []
items:
- variable: labelItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string
- variable: annotationsList
label: Annotations
schema:
type: list
default: []
items:
- variable: annotationItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string

View File

@ -3,18 +3,14 @@
description: Sets the persistence type, Anything other than PVC could break rollback!
schema:
type: string
default: simplePVC
default: pvc
enum:
- value: simplePVC
description: PVC (simple)
- value: simpleHP
description: Host Path (simple)
- value: emptyDir
description: emptyDir
- value: pvc
description: PVC
- value: hostPath
description: Host Path
- value: emptyDir
description: emptyDir
- value: nfs
description: NFS Share
- variable: server
@ -29,13 +25,6 @@
show_if: [["type", "=", "nfs"]]
type: string
default: ""
- variable: setPermissionsSimple
label: Automatic Permissions
description: Automatically set permissions on install
schema:
show_if: [["type", "=", "simpleHP"]]
type: boolean
default: false
- variable: setPermissions
label: Automatic Permissions
description: Automatically set permissions on install
@ -48,12 +37,6 @@
schema:
type: boolean
default: false
- variable: hostPathSimple
label: Host Path
description: Path inside the container the storage is mounted
schema:
show_if: [["type", "=", "simpleHP"]]
type: hostpath
- variable: hostPath
label: Host Path
description: Path inside the container the storage is mounted
@ -71,3 +54,9 @@
description: Default
- value: Memory
description: Memory
- variable: size
label: Size quotum of Storage
schema:
show_if: [["type", "=", "pvc"]]
type: string
default: 256Gi

View File

@ -27,18 +27,14 @@
description: Sets the persistence type, Anything other than PVC could break rollback!
schema:
type: string
default: simpleHP
default: hostPath
enum:
- value: simplePVC
description: PVC (Simple)
- value: simpleHP
description: Host Path (Simple)
- value: emptyDir
description: emptyDir
- value: pvc
description: PVC
- value: hostPath
description: Host Path
- value: emptyDir
description: emptyDir
- value: nfs
description: NFS Share
- variable: server
@ -53,13 +49,6 @@
show_if: [["type", "=", "nfs"]]
type: string
default: ""
- variable: setPermissionsSimple
label: Automatic Permissions
description: Automatically set permissions on install
schema:
show_if: [["type", "=", "simpleHP"]]
type: boolean
default: false
- variable: setPermissions
label: Automatic Permissions
description: Automatically set permissions on install
@ -72,12 +61,6 @@
schema:
type: boolean
default: false
- variable: hostPathSimple
label: Host Path
description: Path inside the container the storage is mounted
schema:
show_if: [["type", "=", "simpleHP"]]
type: hostpath
- variable: hostPath
label: Host Path
description: Path inside the container the storage is mounted
@ -109,94 +92,3 @@
show_if: [["type", "=", "pvc"]]
type: string
default: 256Gi
- variable: hostPathType
label: (Advanced) Host Path Type
schema:
show_if: [["type", "=", "hostPath"]]
type: string
default: ""
enum:
- value: ""
description: Default
- value: DirectoryOrCreate
description: DirectoryOrCreate
- value: Directory
description: Directory
- value: FileOrCreate
description: FileOrCreate
- value: File
description: File
- value: Socket
description: Socket
- value: CharDevice
description: CharDevice
- value: BlockDevice
description: BlockDevice
- variable: storageClass
label: (Advanced) StorageClass
description: "Warning: Anything other than SCALE-ZFS or empty will break rollback!"
schema:
show_if: [["type", "=", "pvc"]]
type: string
default: SCALE-ZFS
- variable: accessMode
label: (Advanced) Access Mode
description: Allow or disallow multiple PVC's writhing to the same PV
schema:
show_if: [["type", "=", "pvc"]]
type: string
default: ReadWriteOnce
enum:
- value: ReadWriteOnce
description: ReadWriteOnce
- value: ReadOnlyMany
description: ReadOnlyMany
- value: ReadWriteMany
description: ReadWriteMany
- variable: advanced
label: Show Advanced Options
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: labelsList
label: Labels
schema:
type: list
default: []
items:
- variable: labelItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string
- variable: annotationsList
label: Annotations
schema:
type: list
default: []
items:
- variable: annotationItem
label: Label
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string

View File

@ -1,26 +0,0 @@
- variable: capabilities
label: Capabilities
schema:
additional_attrs: true
type: dict
attrs:
- variable: drop
label: Drop Capability
schema:
type: list
default: []
items:
- variable: dropEntry
label: ""
schema:
type: string
- variable: add
label: Add Capability
schema:
type: list
default: []
items:
- variable: addEntry
label: ""
schema:
type: string

View File

@ -1,16 +1,3 @@
- variable: advanced
label: Show Advanced Settings
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: enabled
label: Enable the Port
schema:
type: boolean
hidden: true
default: true
- variable: protocol
label: Port Type
schema:
@ -25,10 +12,3 @@
description: TCP
- value: UDP
description: UDP
- variable: nodePort
label: Node Port (Optional)
description: This port gets exposed to the node. Only considered when service type is NodePort, Simple or LoadBalancer
schema:
type: int
min: 9000
max: 65535

View File

@ -1,16 +1,3 @@
- variable: advanced
label: Show Advanced Settings
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: enabled
label: Enable the Port
schema:
type: boolean
hidden: true
default: true
- variable: protocol
label: Port Type
schema:
@ -25,10 +12,3 @@
description: TCP
- value: UDP
description: UDP
- variable: nodePort
label: Node Port (Optional)
description: This port gets exposed to the node. Only considered when service type is NodePort, Simple or LoadBalancer
schema:
type: int
min: 9000
max: 65535

View File

@ -1,16 +1,3 @@
- variable: advanced
label: Show Advanced Settings
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: enabled
label: Enable the Port
schema:
type: boolean
hidden: true
default: true
- variable: protocol
label: Port Type
schema:
@ -25,10 +12,3 @@
description: TCP
- value: UDP
description: UDP
- variable: nodePort
label: Node Port (Optional)
description: This port gets exposed to the node. Only considered when service type is NodePort, Simple or LoadBalancer
schema:
type: int
min: 9000
max: 65535

View File

@ -74,64 +74,3 @@
type: ipaddr
cidr: false
required: true
- variable: dnsPolicy
group: Networking and Services
label: dnsPolicy
schema:
type: string
default: ""
enum:
- value: ""
description: Default
- value: ClusterFirst
description: ClusterFirst
- value: None
description: None
- variable: dnsConfig
label: DNS Configuration
group: Networking and Services
description: Specify custom DNS configuration which will be applied to the pod
schema:
additional_attrs: true
type: dict
attrs:
- variable: nameservers
label: Name Servers
schema:
default: []
type: list
items:
- variable: nameserver
label: Name Server
schema:
type: string
- variable: options
label: Options
schema:
default: []
type: list
items:
- variable: option
label: Option Entry
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
- variable: value
label: Value
schema:
type: string
- variable: searches
label: Searches
schema:
default: []
type: list
items:
- variable: search
label: Search Entry
schema:
type: string

View File

@ -10,6 +10,7 @@
schema:
type: boolean
default: false
hidden: true
show_subquestions_if: true
subquestions:
- variable: externalIPs
@ -17,6 +18,7 @@
description: "External IP's"
schema:
type: list
hidden: true
default: []
items:
- variable: externalIP
@ -29,6 +31,7 @@
schema:
type: string
default: SingleStack
hidden: true
enum:
- value: SingleStack
description: SingleStack
@ -42,6 +45,7 @@
schema:
type: list
default: []
hidden: true
items:
- variable: ipFamily
label: IP Family

View File

@ -1 +0,0 @@
default: Recreate

View File

@ -1 +0,0 @@
default: RollingUpdate

View File

@ -1,13 +0,0 @@
- variable: strategy
description: Please specify type of workload to deploy
label: (Advanced) Update Strategy
schema:
type: string
required: true
enum:
- value: Recreate
description: "Recreate: Kill existing pods before creating new ones"
- value: RollingUpdate
description: "RollingUpdate: Create new pods and then kill old ones"
- value: OnDelete
description: "(Legacy) OnDelete: ignore .spec.template changes"

View File

@ -78,11 +78,6 @@ chart_runner(){
train=$(basename $(dirname "${1}"))
SCALESUPPORT=$(cat ${1}/Chart.yaml | yq '.annotations."truecharts.org/SCALE-support"' -r)
helm dependency build "${1}" --skip-refresh || (sleep 10 && helm dependency build "${1}" --skip-refresh) || (sleep 10 && helm dependency build "${1}" --skip-refresh)
sync_tag "${1}" "${chartname}" "$train" "${chartversion}" || echo "Tag sync failed..."
# create_changelog "${1}" "${chartname}" "$train" "${chartversion}" || echo "changelog generation failed..."
# generate_docs "${1}" "${chartname}" "$train" "${chartversion}" || echo "Docs generation failed..."
#copy_docs "${1}" "${chartname}" "$train" "${chartversion}" || echo "Docs Copy failed..."
#package_chart "${1}"
if [[ "${SCALESUPPORT}" == "true" ]]; then
clean_apps "${1}" "${chartname}" "$train" "${chartversion}"
copy_apps "${1}" "${chartname}" "$train" "${chartversion}"
@ -133,61 +128,6 @@ clean_catalog() {
}
export -f clean_catalog
gen_dh_cat() {
rm -rf dh_catalog/*.*
rm -rf dh_catalog/*
cp -rf catalog/* dh_catalog
cd dh_catalog
find ./ -type f -name *.yaml -exec sed -i 's/tccr.io/dh.tccr.io/gI' {} \;
cd -
}
export -f gen_dh_cat
# Designed to ensure the appversion in Chart.yaml is in sync with the primary Chart tag if found
# Also makes sure that home link is pointing to the correct url
sync_tag() {
local chart="$1"
local chartname="$2"
local train="$3"
local chartversion="$4"
echo "Attempting to sync primary tag with appversion for: ${chartname}"
local tag="$(cat ${chart}/values.yaml | grep '^ tag: ' | awk -F" " '{ print $2 }' | head -1)"
tag="${tag%%@*}"
tag="${tag:-auto}"
tag=$(echo $tag | sed "s/release-//g")
tag=$(echo $tag | sed "s/release_//g")
tag=$(echo $tag | sed "s/version-//g")
tag=$(echo $tag | sed "s/version_//g")
tag="${tag#*V.}"
tag="${tag#*v-}"
tag="${tag#*v}"
tag="${tag%-*}"
tag="${tag:0:10}"
tag="${tag%-}"
tag="${tag%_}"
tag="${tag%.}"
echo "Updating tag of ${chartname} to ${tag}..."
sed -i -e "s|appVersion: .*|appVersion: \"${tag}\"|" "${chart}/Chart.yaml"
echo "Updating icon of ${chartname}..."
sed -i -e "s|icon: .*|icon: https:\/\/truecharts.org\/img\/hotlink-ok\/chart-icons\/${chartname}.png|" "${chart}/Chart.yaml"
echo "Updating home of ${chartname}..."
sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml"
echo "Attempting to update sources of ${chartname}..."
echo "Using go-yq verion: <$(go-yq -V)>"
# Get all sources (except truecharts)
curr_sources=$(go-yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml")
# Empty sources list in-place
go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
# Add truechart source
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
# Add the rest of the sources
while IFS= read -r line; do
src="$line" go-yq -i '.sources += env(src)' "${chart}/Chart.yaml"
done <<< "$curr_sources"
echo "Sources of ${chartname} updated!"
}
export -f sync_tag
pre_commit() {
if [[ -z "$standalone" ]]; then
echo "Running pre-commit test-and-cleanup..."
@ -238,46 +178,6 @@ copy_general_docs() {
}
export -f copy_general_docs
generate_docs() {
local chart="$1"
local chartname="$2"
local train="$3"
local chartversion="$4"
if [[ -z "$standalone" ]]; then
echo "Generating Docs"
if [ "${chartname}" == "common" ]; then
helm-docs \
--ignore-file=".helmdocsignore" \
--output-file="README.md" \
--template-files="/__w/apps/apps/templates/docs/common-README.md.gotmpl" \
--chart-search-root="${chart}"
helm-docs \
--ignore-file=".helmdocsignore" \
--output-file="helm-values.md" \
--template-files="/__w/apps/apps/templates/docs/common-helm-values.md.gotmpl" \
--chart-search-root="${chart}"
else
helm-docs \
--ignore-file=".helmdocsignore" \
--output-file="README.md" \
--template-files="/__w/apps/apps/templates/docs/README.md.gotmpl" \
--chart-search-root="${chart}"
helm-docs \
--ignore-file=".helmdocsignore" \
--output-file="CONFIG.md" \
--template-files="/__w/apps/apps/templates/docs/CONFIG.md.gotmpl" \
--chart-search-root="${chart}"
helm-docs \
--ignore-file=".helmdocsignore" \
--output-file="helm-values.md" \
--template-files="/__w/apps/apps/templates/docs/helm-values.md.gotmpl" \
--chart-search-root="${chart}"
fi
sed -i "s/TRAINPLACEHOLDER/${train}/" "${chart}/README.md"
fi
}
export -f generate_docs
copy_docs() {
local chart="$1"
@ -285,13 +185,7 @@ copy_docs() {
local train="$3"
local chartversion="$4"
echo "Copying docs for: ${chart}"
if [ "${chartname}" == "common" ]; then
mkdir -p docs/charts/common || :
yes | cp -rf charts/library/common/README.md docs/charts/common/index.md 2>/dev/null || :
yes | cp -rf charts/library/common/helm-values.md docs/charts/common/helm-values.md 2>/dev/null || :
else
mkdir -p docs/charts/${train}/${chartname} || echo "chart path already exists, continuing..."
yes | cp -rf ${chart}/README.md docs/charts/${train}/${chartname}/index.md 2>/dev/null || :
yes | cp -rf ${chart}/CHANGELOG.md docs/charts/${train}/${chartname}/CHANGELOG.md 2>/dev/null || :
yes | cp -rf ${chart}/security.md docs/charts/${train}/${chartname}/security.md 2>/dev/null || :
yes | cp -rf ${chart}/CONFIG.md docs/charts/${train}/${chartname}/CONFIG.md 2>/dev/null || :
@ -299,7 +193,6 @@ copy_docs() {
rm docs/charts/${train}/${chartname}/LICENSE.md 2>/dev/null || :
yes | cp -rf ${chart}/LICENSE docs/charts/${train}/${chartname}/LICENSE.md 2>/dev/null || :
sed -i '1s/^/# License<br>\n\n/' docs/charts/${train}/${chartname}/LICENSE.md 2>/dev/null || :
fi
}
export -f copy_docs
@ -308,8 +201,7 @@ prep_helm() {
helm repo add truecharts https://charts.truecharts.org
helm repo add truecharts-library https://library-charts.truecharts.org
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add metallb https://metallb.github.io/metallb
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo update
fi
@ -388,21 +280,6 @@ upload_catalog() {
}
export -f upload_catalog
upload_dhcatalog() {
echo "Uploading DH-Catalog..."
cd dh_catalog
git config user.name "TrueCharts-Bot"
git config user.email "bot@truecharts.org"
git add --all
git commit -sm "Commit new Chart releases for TrueCharts" || exit 0
git push
cd -
rm -rf dh_catalog
}
export -f upload_dhcatalog
parse_command_line() {
while :; do
case "${1:-}" in
@ -533,56 +410,4 @@ lookup_changed_charts() {
}
export -f lookup_changed_charts
package_chart() {
local chart="$1"
local args=("$chart" --package-path .cr-release-packages)
if [[ -n "$config" ]]; then
args+=(--config "$config")
fi
if [[ -z "$standalone" ]]; then
echo "Packaging chart '$chart'..."
cr package "${args[@]}"
fi
}
export -f package_chart
release_charts() {
local args=(-o "$owner" -r "$repo" -c "$(git rev-parse HEAD)")
if [[ -n "$config" ]]; then
args+=(--config "$config")
fi
if [[ -z "$standalone" ]]; then
echo 'Releasing charts...'
cr upload "${args[@]}"
fi
}
export -f release_charts
update_index() {
local args=(-o "$owner" -r "$repo" -c "$charts_repo_url")
if [[ -n "$config" ]]; then
args+=(--config "$config")
fi
if [[ -z "$standalone" ]]; then
echo 'Updating charts repo index...'
cr index "${args[@]}"
fi
}
export -f update_index
upload_index() {
cd .cr-index
git config user.name "TrueCharts-Bot"
git config user.email "bot@truecharts.org"
git add --all
git commit -sm "Commit released Helm Chart and docs for TrueCharts" || exit 0
git push
cd -
rm -rf .cr-index
}
export -f upload_index
main "$@"