diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1636366074d..05ce29ffa5f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,5 +5,5 @@ /charts/dependency/ @truecharts/enterprise-maintainers @ornias1993 /charts/enterprise/ @truecharts/enterprise-maintainers @ornias1993 /charts/dev/ @ornias1993 -/.github/ @truecharts/ci-maintainers @ornias1993 +/.github/ @truecharts/ci-maintainers @ornias1993 docs/ @truecharts/docs-maintainers @ornias1993 diff --git a/.github/scripts/fetch_helm_deps.sh b/.github/scripts/fetch_helm_deps.sh index f5705e889b7..c81f9906565 100755 --- a/.github/scripts/fetch_helm_deps.sh +++ b/.github/scripts/fetch_helm_deps.sh @@ -25,8 +25,8 @@ load_gpg_key() { echo "" echo "⏬ Downloading and Loading TrueCharts pgp Public Key" gpg_dir=.cr-gpg -mkdir "$gpg_dir" -curl https://keybase.io/truecharts/pgp_keys.asc | gpg --dearmor > $gpg_dir/pubring.gpg || echo "❌ Couldn't load Public Key." +mkdir -p "$gpg_dir" +curl --silent https://keybase.io/truecharts/pgp_keys.asc | gpg --dearmor > $gpg_dir/pubring.gpg || echo "❌ Couldn't load Public Key." echo "✅ Public Key loaded successfully..." echo "" } @@ -100,17 +100,20 @@ for idx in $(eval echo "{0..$length}"); do if [ ! $? ]; then echo "❌ wget encountered an error..." - helm dependency build "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || helm dependency update "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || exit 1 + helm dependency build "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || \ + helm dependency update "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || exit 1 fi if [ -f "$cache_path/$repo_dir/$name-$version.tgz" ]; then echo "✅ Dependency Downloaded!" echo "Validating dependency signature..." - helm verify $cache_path/$repo_dir/$name-$version.tgz --keyring $gpg_dir/pubring.gpg || helm verify $cache_path/$repo_dir/$name-$version.tgz --keyring $gpg_dir/pubring.gpg || exit 1 + helm verify $cache_path/$repo_dir/$name-$version.tgz --keyring $gpg_dir/pubring.gpg || \ + helm verify $cache_path/$repo_dir/$name-$version.tgz --keyring $gpg_dir/pubring.gpg || exit 1 else echo "❌ Failed to download dependency" # Try helm dependency build/update or otherwise fail fast if a dep fails to download... - helm dependency build "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || helm dependency update "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || exit 1 + helm dependency build "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || \ + helm dependency update "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || exit 1 fi fi echo "" @@ -125,12 +128,13 @@ for idx in $(eval echo "{0..$length}"); do else echo "❌ Failed to copy dependency" # Try helm dependency build/update or otherwise fail fast if a dep fails to copy... - helm dependency build "$charts_path/$train_chart/Chart.yaml" || helm dependency update "$charts_path/$train_chart/Chart.yaml" || exit 1 + helm dependency build "$charts_path/$train_chart/Chart.yaml" || \ + helm dependency update "$charts_path/$train_chart/Chart.yaml" || exit 1 fi fi done } -export -f +export -f download_deps load_gpg_key diff --git a/.github/scripts/tc-lint.sh b/.github/scripts/tc-lint.sh new file mode 100755 index 00000000000..1f53ea27521 --- /dev/null +++ b/.github/scripts/tc-lint.sh @@ -0,0 +1,182 @@ +#!/bin/bash + +function check_version() { + chart_path=${1:?"No chart path provided to [Version Check]"} + target_branch=${2:?"No target branch provided to [Version Check]"} + + new=$(git diff "$target_branch" -- "$chart_path" | sed -nr 's/^\+version: (.*)$/\1/p') + old=$(git diff "$target_branch" -- "$chart_path" | sed -nr 's/^\-version: (.*)$/\1/p') + + if [[ -z "$new" ]]; then + echo -e "\t❌ Chart version: Not changed" + curr_result=1 + fi + + echo -e "\t🔙 Old Chart Version: $old" + echo -e "\t🆕 New Chart Version: $new" + + if [[ $(echo "$new\n$old" | sort -V -r | head -n1) != "$old" ]]; then + echo -e "\t✅ Chart version: Bumped" + else + echo -e "\t❌ Chart version: Not bumped or downgraded" + curr_result=1 + fi +} +export -f check_version + +function check_chart_schema(){ + chart_path=${1:?"No chart path provided to [Chart.yaml lint]"} + + yamale_output=$(yamale --schema .github/chart_schema.yaml "$chart_path/Chart.yaml") + yamale_exit_code=$? + while IFS= read -r line; do + echo -e "\t$line" + done <<< "$yamale_output" + + if [ $yamale_exit_code -ne 0 ]; then + echo -e "\t❌ Chart Schema: Failed" + curr_result=1 + else + echo -e "\t✅ Chart Schema: Passed" + fi +} +export -f check_chart_schema + +function helm_lint(){ + chart_path=${1:?"No chart path provided to [Helm lint]"} + + # Print only errors and warnings + helm_lint_output=$(helm lint --quiet "$chart_path") + helm_lint_exit_code=$? + while IFS= read -r line; do + echo -e "\t$line" + done <<< "$helm_lint_output" + + if [ $helm_lint_exit_code -ne 0 ]; then + echo -e "\t❌ Helm Lint: Failed" + curr_result=1 + else + echo -e "\t✅ Helm Lint: Passed" + fi +} +export -f helm_lint + +function yaml_lint(){ + file_path=${1:?"No file path provided to [YAML lint]"} + + yaml_lint_output=$(yamllint --config-file .github/yaml-lint-conf.yaml "$file_path") + yaml_lint_exit_code=$? + while IFS= read -r line; do + echo -e "\t$line" + done <<< "$yaml_lint_output" + + if [ $yaml_lint_exit_code -ne 0 ]; then + echo -e "\t❌ YAML Lint: Failed [$file_path]" + curr_result=1 + else + echo -e "\t✅ YAML Lint: Passed [$file_path]" + fi +} +export -f yaml_lint + +function lint_chart(){ + chart_path=${1:?"No chart path provided to [Lint Chart]"} + target_branch=${2:?"No target branch provided to [Lint Chart]"} + status_file=${3:?"No status file provided to [Lint Chart]"} + + curr_result_file=/tmp/$(basename "$chart_path") + curr_result=0 + { + start_time=$(date +%s) + echo '---------------------------------------------------------------------------------------' + echo "## 🔍Linting [$chart_path]" + echo '----------------------------------------------' + echo '' + echo "👣 Helm Lint - [$chart_path]" + helm_lint "$chart_path" + + echo "👣 Chart Version - [$chart_path] against [$target_branch]" + check_version "$chart_path" "$target_branch" + + echo "👣 Chart Schema - [$chart_path]" + check_chart_schema "$chart_path" + + echo "👣 YAML Lint - [$chart_path/Chart.yaml]" + yaml_lint "$chart_path/Chart.yaml" + + echo "👣 YAML Lint - [$chart_path/values.yaml]" + yaml_lint "$chart_path/values.yaml" + + for values in $chart_path/ci/*values.yaml; do + if [ -f "${values}" ]; then + echo "👣 YAML Lint - [$values]" + yaml_lint "$values" + fi + done + + end_time=$(date +%s) + diff_time=$((end_time - start_time)) + + echo -e "\nResult:" + if [ $curr_result -ne 0 ]; then + echo "❌ Linting [$chart_path]: Failed - Took $diff_time seconds" | tee -a "$result_file" + else + echo "✅ Linting [$chart_path]: Passed - Took $diff_time seconds" | tee -a "$result_file" + fi + echo '---------------------------------------------------------------------------------------' + echo '' + } > "$curr_result_file" + cat "$curr_result_file" + echo $curr_result >> "$status_file" +} +export -f lint_chart + +# Start of script + +charts=$1 +target_branch=${2:-"origin/master"} +status_file="/tmp/status" +exit_code=0 + +result_file=${result_file:?"No result file provided"} + +changed=$(echo $charts | jq --raw-output '.[]') + +echo "📂 Charts to lint:" +for chart in $changed; do + echo -e "\t- 📄 $chart" +done +echo '' + +start_time=$(date +%s) +# Run lint_chart in parallel +parallel --jobs $(($(nproc) * 2)) "lint_chart {} $target_branch $status_file" ::: $changed || true +if grep -q 1 "$status_file"; then + exit_code=1 +fi +end_time=$(date +%s) +diff_time=$((end_time - start_time)) + +echo '------------------------------------' + +# Print summary +sorted=$(cat "$result_file" | sort) +sorted=$(echo "$sorted" | sed 's/✅/:heavy_check_mark:/g') +sorted=$(echo "$sorted" | sed 's/❌/:heavy_multiplication_x:/g') +echo "# 📝 Linting results:" | tee "$result_file" +echo '=====================================================================================' +echo "$sorted" | tee -a "$result_file" +echo '' +echo -e "Total Charts Linted: **$(echo "$sorted" | wc -l)**" | tee -a "$result_file" +echo -e "Total Charts Passed: **$(echo "$sorted" | grep -c 'heavy_check_mark')**" | tee -a "$result_file" +echo -e "Total Charts Failed: **$(echo "$sorted" | grep -c 'heavy_multiplication_x')**" | tee -a "$result_file" +echo '=====================================================================================' +echo '' | tee -a "$result_file" + +if [ $exit_code -ne 0 ]; then + echo "❌ Linting: **Failed** - Took $diff_time seconds" | tee -a "$result_file" +else + echo "✅ Linting: **Passed** - Took $diff_time seconds" | tee -a "$result_file" +fi + +exit $exit_code diff --git a/.github/workflows/charts-lint.yaml b/.github/workflows/charts-lint.yaml index 22f228f1655..1f8a7ad7852 100644 --- a/.github/workflows/charts-lint.yaml +++ b/.github/workflows/charts-lint.yaml @@ -11,400 +11,80 @@ on: type: string jobs: - verify-dep-sig: + lint-and-verify: + name: Lint Charts and Verify Dependencies runs-on: ubuntu-latest - name: Verify Dependency Signatures container: - image: ghcr.io/truecharts/devcontainer:3.1.10@sha256:c239addf725eb5cedf79517f8089fdafdc32b5270d1893ee87ae6e511b9bcae3 + image: tccr.io/truecharts/devcontainer:v3.1.38@sha256:2fd9355bc6791461430db87a04f5fe7b49c46bc5957bc348f1efbff4c6c7913d steps: - - name: Install Kubernetes tools - uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3 - with: - setup-tools: | - helmv3 - helm: "3.8.0" - - - 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 truecharts-deps https://deps.truecharts.org - helm repo update - - name: Checkout uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 with: fetch-depth: 0 + ref: ${{ inputs.checkoutCommit }} - name: Setting repo parent dir as safe safe.directory run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - name: Collect changes - id: collect-changes - uses: ./.github/actions/collect-changes - - - name: Fetch and Verify dependencies - shell: bash - if: | - steps.collect-changes.outputs.changesDetectedAfterTag == 'true' + - name: Prep Helm run: | - CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }}) - charts_path="charts" - for changed in ${CHARTS[@]}; do - .github/scripts/fetch_helm_deps.sh "${changed}" - done + helm repo add truecharts https://charts.truecharts.org + helm repo add truecharts-deps https://deps.truecharts.org + helm repo add truecharts-library https://library-charts.truecharts.org + helm repo add truecharts-deps https://deps.truecharts.org + helm repo update - generate-lint-matrix: - name: Generate matrix for lint - runs-on: ubuntu-latest - outputs: - matrix1: | - { - "chart": ${{ steps.list-changed.outputs.charts1 }} - } - matrix2: | - { - "chart": ${{ steps.list-changed.outputs.charts2 }} - } - matrix3: | - { - "chart": ${{ steps.list-changed.outputs.charts3 }} - } - matrix4: | - { - "chart": ${{ steps.list-changed.outputs.charts4 }} - } - matrix5: | - { - "chart": ${{ steps.list-changed.outputs.charts5 }} - } - matrix6: | - { - "chart": ${{ steps.list-changed.outputs.charts6 }} - } - detected1: ${{ steps.list-changed.outputs.detected1 }} - detected2: ${{ steps.list-changed.outputs.detected2 }} - detected3: ${{ steps.list-changed.outputs.detected3 }} - detected4: ${{ steps.list-changed.outputs.detected4 }} - detected5: ${{ steps.list-changed.outputs.detected5 }} - detected6: ${{ steps.list-changed.outputs.detected6 }} - steps: - - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - fetch-depth: 0 - ref: ${{ inputs.checkoutCommit }} - - - name: Set up chart-testing - uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 - - - name: Collect changes + - name: Collect changes (branch-based) id: list-changed if: inputs.chartChangesDetected == 'true' shell: bash run: | - EXCLUDED=$(yq eval -o=json '.excluded-charts // []' .github/ct-lint.yaml) CHARTS=$(ct list-changed --config .github/ct-lint.yaml) - CHARTS_JSON=$(echo "${CHARTS}" | jq -R -s -c 'split("\n")[:-1]') - OUTPUT_JSON=$(echo "{\"excluded\": ${EXCLUDED}, \"all\": ${CHARTS_JSON}}" | jq -c '.all-.excluded') - OUTPUT_JSON1=$((echo $OUTPUT_JSON | jq -r -c '.[:50]'; echo $OUTPUT_JSON | jq -r -c '.[301:350]'; echo $OUTPUT_JSON | jq -r -c '.[601:650]'; echo $OUTPUT_JSON | jq -r -c '.[901:950]'; echo $OUTPUT_JSON | jq -r -c '.[1201:1250]') | jq -s add) - OUTPUT_JSON2=$((echo $OUTPUT_JSON | jq -r -c '.[51:100]'; echo $OUTPUT_JSON | jq -r -c '.[351:400]'; echo $OUTPUT_JSON | jq -r -c '.[651:700]'; echo $OUTPUT_JSON | jq -r -c '.[951:1000]'; echo $OUTPUT_JSON | jq -r -c '.[1251:1300]') | jq -s add) - OUTPUT_JSON3=$((echo $OUTPUT_JSON | jq -r -c '.[101:150]'; echo $OUTPUT_JSON | jq -r -c '.[401:450]'; echo $OUTPUT_JSON | jq -r -c '.[701:750]'; echo $OUTPUT_JSON | jq -r -c '.[1001:1050]'; echo $OUTPUT_JSON | jq -r -c '.[1301:1350]') | jq -s add) - OUTPUT_JSON4=$((echo $OUTPUT_JSON | jq -r -c '.[151:200]'; echo $OUTPUT_JSON | jq -r -c '.[451:500]'; echo $OUTPUT_JSON | jq -r -c '.[751:800]'; echo $OUTPUT_JSON | jq -r -c '.[1051:1100]'; echo $OUTPUT_JSON | jq -r -c '.[1351:1400]') | jq -s add) - OUTPUT_JSON5=$((echo $OUTPUT_JSON | jq -r -c '.[201:250]'; echo $OUTPUT_JSON | jq -r -c '.[501:550]'; echo $OUTPUT_JSON | jq -r -c '.[801:850]'; echo $OUTPUT_JSON | jq -r -c '.[1101:1150]'; echo $OUTPUT_JSON | jq -r -c '.[1401:1450]') | jq -s add) - OUTPUT_JSON6=$((echo $OUTPUT_JSON | jq -r -c '.[251:300]'; echo $OUTPUT_JSON | jq -r -c '.[551:600]'; echo $OUTPUT_JSON | jq -r -c '.[851:900]'; echo $OUTPUT_JSON | jq -r -c '.[1151:1200]'; echo $OUTPUT_JSON | jq -r -c '.[1451:1500]') | jq -s add) - echo ::set-output name=charts1::${OUTPUT_JSON1} - echo ::set-output name=charts2::${OUTPUT_JSON2} - echo ::set-output name=charts3::${OUTPUT_JSON3} - echo ::set-output name=charts4::${OUTPUT_JSON4} - echo ::set-output name=charts5::${OUTPUT_JSON5} - echo ::set-output name=charts6::${OUTPUT_JSON6} - if [[ $(echo ${OUTPUT_JSON1} | jq -c '. | length') -gt 0 ]]; then - echo "::set-output name=detected1::true" - fi - if [[ $(echo ${OUTPUT_JSON2} | jq -c '. | length') -gt 0 ]]; then - echo "::set-output name=detected2::true" - fi - if [[ $(echo ${OUTPUT_JSON3} | jq -c '. | length') -gt 0 ]]; then - echo "::set-output name=detected3::true" - fi - if [[ $(echo ${OUTPUT_JSON4} | jq -c '. | length') -gt 0 ]]; then - echo "::set-output name=detected4::true" - fi - if [[ $(echo ${OUTPUT_JSON5} | jq -c '. | length') -gt 0 ]]; then - echo "::set-output name=detected5::true" - fi - if [[ $(echo ${OUTPUT_JSON6} | jq -c '. | length') -gt 0 ]]; then - echo "::set-output name=detected6::true" + EXCLUDED_JSON=$(go-yq eval -o=json '.excluded-charts // []' .github/ct-lint.yaml) + CHARTS_JSON=$(echo "${CHARTS}" | jq --raw-input '.' | jq --compact-output --slurp '.') + OUTPUT_JSON=$(echo "{\"excluded\": ${EXCLUDED_JSON}, \"all\": ${CHARTS_JSON}}" | jq --compact-output '.all-.excluded') + + echo CHANGED_CHARTS=${OUTPUT_JSON} >> "$GITHUB_OUTPUT" + if [[ $(echo ${OUTPUT_JSON} | jq --compact-output '. | length') -gt 0 ]]; then + echo "detected=true" >> "$GITHUB_OUTPUT" fi - lint-charts1: - needs: - - generate-lint-matrix - if: needs.generate-lint-matrix.outputs.detected1 == 'true' - name: Lint charts Part 1 - strategy: - matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix1) }} - fail-fast: false - max-parallel: 10 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - fetch-depth: 0 - ref: ${{ inputs.checkoutCommit }} - - - name: lint Kubernetes tools - uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3 - with: - setup-tools: | - helmv3 - helm: "3.8.0" - - - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4 - with: - python-version: "3.10" - - - name: Set up chart-testing - uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 - - - name: Run chart-testing (lint) - run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" - - lint-charts2: - needs: - - generate-lint-matrix - if: needs.generate-lint-matrix.outputs.detected2 == 'true' - name: Lint charts Part 2 - strategy: - matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix2) }} - fail-fast: false - max-parallel: 10 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - fetch-depth: 0 - ref: ${{ inputs.checkoutCommit }} - - - name: lint Kubernetes tools - uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3 - with: - setup-tools: | - helmv3 - helm: "3.8.0" - - - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4 - with: - python-version: "3.10" - - - name: Set up chart-testing - uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 - - - name: Run chart-testing (lint) - run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" - - lint-charts3: - needs: - - generate-lint-matrix - if: needs.generate-lint-matrix.outputs.detected3 == 'true' - name: Lint charts Part 3 - strategy: - matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix3) }} - fail-fast: false - max-parallel: 10 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - fetch-depth: 0 - ref: ${{ inputs.checkoutCommit }} - - - name: lint Kubernetes tools - uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3 - with: - setup-tools: | - helmv3 - helm: "3.8.0" - - - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4 - with: - python-version: "3.10" - - - name: Set up chart-testing - uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 - - - name: Run chart-testing (lint) - run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" - - lint-charts4: - needs: - - generate-lint-matrix - if: needs.generate-lint-matrix.outputs.detected4 == 'true' - name: Lint charts Part 4 - strategy: - matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix4) }} - fail-fast: false - max-parallel: 10 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - fetch-depth: 0 - ref: ${{ inputs.checkoutCommit }} - - - name: lint Kubernetes tools - uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3 - with: - setup-tools: | - helmv3 - helm: "3.8.0" - - - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4 - with: - python-version: "3.10" - - - name: Set up chart-testing - uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 - - - name: Run chart-testing (lint) - run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" - - lint-charts5: - needs: - - generate-lint-matrix - if: needs.generate-lint-matrix.outputs.detected5 == 'true' - name: Lint charts Part 5 - strategy: - matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix5) }} - fail-fast: false - max-parallel: 10 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - fetch-depth: 0 - ref: ${{ inputs.checkoutCommit }} - - - name: lint Kubernetes tools - uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3 - with: - setup-tools: | - helmv3 - helm: "3.8.0" - - - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4 - with: - python-version: "3.10" - - - name: Set up chart-testing - uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 - - - name: Run chart-testing (lint) - run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" - - lint-charts6: - needs: - - generate-lint-matrix - if: needs.generate-lint-matrix.outputs.detected6 == 'true' - name: Lint charts Part 6 - strategy: - matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix6) }} - fail-fast: false - max-parallel: 10 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - fetch-depth: 0 - ref: ${{ inputs.checkoutCommit }} - - - name: lint Kubernetes tools - uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3 - with: - setup-tools: | - helmv3 - helm: "3.8.0" - - - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4 - with: - python-version: "3.10" - - - name: Set up chart-testing - uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 - - - name: Run chart-testing (lint) - run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" - - # Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7 - lint_success: - needs: - - generate-lint-matrix - - lint-charts1 - - lint-charts2 - - lint-charts3 - - lint-charts4 - - lint-charts5 - - lint-charts6 - if: | - always() - name: Lint successful - runs-on: ubuntu-latest - steps: - - name: Check lint matrix status + - name: Fetch and Verify dependencies + shell: bash + if: steps.list-changed.outputs.detected == 'true' + env: + charts_path: "./" run: | - res1="${{needs.lint-charts1.result}}" - res2="${{needs.lint-charts2.result}}" - res3="${{needs.lint-charts3.result}}" - res4="${{needs.lint-charts4.result}}" - res5="${{needs.lint-charts5.result}}" - res6="${{needs.lint-charts6.result}}" + CHANGED=$(echo '${{ steps.list-changed.outputs.CHANGED_CHARTS }}' | jq --raw-output '.[]') + for changed in ${CHANGED}; do + .github/scripts/fetch_helm_deps.sh "${changed}" + done - if [[ $res1 == "success" || $res1 == "skipped" ]]; then - echo "lint tests 1 successfull..." - else - echo "lint tests 1 error, stopping due to failure..." - exit 1 - fi + - name: Run Chart Linting + continue-on-error: true + id: lint + if: steps.list-changed.outputs.detected == 'true' + env: + result_file: /tmp/lint_result.txt + run: | + CHANGED=$(echo '${{ steps.list-changed.outputs.CHANGED_CHARTS }}' | jq --raw-output '.[]') + # If the github.base_ref is empty (eg it runs outside of a PR) it fails back to origin/master + .github/scripts/tc-lint.sh '${{ steps.list-changed.outputs.CHANGED_CHARTS }}' "origin/${{ github.base_ref }}" - if [[ $res2 == "success" || $res2 == "skipped" ]]; then - echo "lint tests 2 successfull..." - else - echo "lint tests 2 error, stopping due to failure..." - exit 1 - fi + - name: Create/Update comment + if: steps.list-changed.outputs.detected == 'true' + uses: thollander/actions-comment-pull-request@632cf9ce90574d125be56b5f3405cda41a84e2fd # v2 + with: + filePath: /tmp/lint_result.txt + comment_tag: lint_results + mode: recreate - if [[ $res3 == "success" || $res3 == "skipped" ]]; then - echo "lint tests 3 successfull..." - else - echo "lint tests 3 error, stopping due to failure..." - exit 1 - fi - - if [[ $res4 == "success" || $res4 == "skipped" ]]; then - echo "lint tests 4 successfull..." - else - echo "lint tests 4 error, stopping due to failure..." - exit 1 - fi - - if [[ $res5 == "success" || $res5 == "skipped" ]]; then - echo "lint tests 5 successfull..." - else - echo "lint tests 5 error, stopping due to failure..." - exit 1 - fi - - if [[ $res6 == "success" || $res6 == "skipped" ]]; then - echo "lint tests 6 successfull..." - else - echo "lint tests 6 error, stopping due to failure..." + - name: Lint Result + if: steps.list-changed.outputs.detected == 'true' + shell: bash + run: | + if [ "${{ steps.lint.outcome }}" != "success" ]; then + echo "Linting failed" exit 1 fi diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index 5cc5ff4b45e..d3e586ec3f3 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -11,7 +11,6 @@ on: - "charts/**" jobs: - release-helm: runs-on: ubuntu-latest container: @@ -238,7 +237,6 @@ jobs: git commit -sm "Commit released docs for TrueCharts" || exit 0 git push - - name: Checkout Catalog uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 if: | diff --git a/.github/yaml-lint-conf.yaml b/.github/yaml-lint-conf.yaml new file mode 100644 index 00000000000..4e478549d30 --- /dev/null +++ b/.github/yaml-lint-conf.yaml @@ -0,0 +1,56 @@ +--- +rules: + anchors: + forbid-undeclared-aliases: true + braces: + forbid: non-empty + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + brackets: + forbid: non-empty + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + colons: + max-spaces-before: 0 + max-spaces-after: 1 + commas: + max-spaces-before: 0 + min-spaces-after: 1 + max-spaces-after: 1 + comments: + require-starting-space: true + min-spaces-from-content: 2 + # No --- to start a file + document-start: disable + document-end: disable + empty-lines: + max: 1 + max-start: 0 + max-end: 0 + float-values: + require-numeral-before-decimal: true + forbid-scientific-notation: true + forbid-nan: true + forbid-inf: true + hyphens: + max-spaces-after: 1 + indentation: + spaces: 2 + indent-sequences: true + check-multi-line-strings: false + key-duplicates: enable + # Lines can be any length + line-length: disable + new-line-at-end-of-file: enable + new-lines: + type: unix + octal-values: + forbid-implicit-octal: true + forbid-explicit-octal: true + trailing-spaces: enable + truthy: + allowed-values: ["true", "false"] diff --git a/charts/dependency/kube-state-metrics/Chart.yaml b/charts/dependency/kube-state-metrics/Chart.yaml index 9796874ddc0..293852f5b09 100644 --- a/charts/dependency/kube-state-metrics/Chart.yaml +++ b/charts/dependency/kube-state-metrics/Chart.yaml @@ -21,7 +21,7 @@ name: kube-state-metrics sources: - https://github.com/truecharts/charts/tree/master/charts/dependency/kube-state-metrics type: application -version: 1.0.2 +version: 1.0.3 annotations: truecharts.org/catagories: | - metrics diff --git a/charts/dependency/kube-state-metrics/values.yaml b/charts/dependency/kube-state-metrics/values.yaml index f376854cb58..271e339b696 100644 --- a/charts/dependency/kube-state-metrics/values.yaml +++ b/charts/dependency/kube-state-metrics/values.yaml @@ -79,118 +79,206 @@ rbac: primary: true clusterWide: true rules: - - apiGroups: ["certificates.k8s.io"] + - apiGroups: + - certificates.k8s.io resources: - certificatesigningrequests - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - configmaps - verbs: ["list", "watch"] - - apiGroups: ["batch"] + verbs: + - list + - watch + - apiGroups: + - batch resources: - cronjobs - verbs: ["list", "watch"] - - apiGroups: ["extensions", "apps"] + verbs: + - list + - watch + - apiGroups: + - extensions + - apps resources: - daemonsets - verbs: ["list", "watch"] - - apiGroups: ["extensions", "apps"] + verbs: + - list + - watch + - apiGroups: + - extensions + - apps resources: - deployments - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - endpoints - verbs: ["list", "watch"] - - apiGroups: ["autoscaling"] + verbs: + - list + - watch + - apiGroups: + - autoscaling resources: - horizontalpodautoscalers - verbs: ["list", "watch"] - - apiGroups: ["extensions", "networking.k8s.io"] + verbs: + - list + - watch + - apiGroups: + - extensions + - networking.k8s.io resources: - ingresses - verbs: ["list", "watch"] - - apiGroups: ["batch"] + verbs: + - list + - watch + - apiGroups: + - batch resources: - jobs - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - limitranges - verbs: ["list", "watch"] - - apiGroups: ["admissionregistration.k8s.io"] + verbs: + - list + - watch + - apiGroups: + - admissionregistration.k8s.io resources: - mutatingwebhookconfigurations - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - namespaces - verbs: ["list", "watch"] - - apiGroups: ["networking.k8s.io"] + verbs: + - list + - watch + - apiGroups: + - networking.k8s.io resources: - networkpolicies - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - nodes - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - persistentvolumeclaims - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - persistentvolumes - verbs: ["list", "watch"] - - apiGroups: ["policy"] + verbs: + - list + - watch + - apiGroups: + - policy resources: - poddisruptionbudgets - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - pods - verbs: ["list", "watch"] - - apiGroups: ["extensions", "apps"] + verbs: + - list + - watch + - apiGroups: + - extensions + - apps resources: - replicasets - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - replicationcontrollers - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - resourcequotas - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - secrets - verbs: ["list", "watch"] - - apiGroups: [""] + verbs: + - list + - watch + - apiGroups: + - "" resources: - services - verbs: ["list", "watch"] - - apiGroups: ["apps"] + verbs: + - list + - watch + - apiGroups: + - apps resources: - statefulsets - verbs: ["list", "watch"] - - apiGroups: ["storage.k8s.io"] + verbs: + - list + - watch + - apiGroups: + - storage.k8s.io resources: - storageclasses - verbs: ["list", "watch"] - - apiGroups: ["autoscaling.k8s.io"] + verbs: + - list + - watch + - apiGroups: + - autoscaling.k8s.io resources: - verticalpodautoscalers - verbs: ["list", "watch"] - - apiGroups: ["admissionregistration.k8s.io"] + verbs: + - list + - watch + - apiGroups: + - admissionregistration.k8s.io resources: - validatingwebhookconfigurations - verbs: ["list", "watch"] - - apiGroups: ["storage.k8s.io"] + verbs: + - list + - watch + - apiGroups: + - storage.k8s.io resources: - volumeattachments - verbs: ["list", "watch"] + verbs: + - list + - watch metrics: main: diff --git a/charts/enterprise/authelia/Chart.yaml b/charts/enterprise/authelia/Chart.yaml index 3b8efa7f111..e11fac93c02 100644 --- a/charts/enterprise/authelia/Chart.yaml +++ b/charts/enterprise/authelia/Chart.yaml @@ -35,7 +35,7 @@ sources: - https://github.com/authelia/chartrepo - https://github.com/authelia/authelia type: application -version: 15.1.17 +version: 15.1.19 annotations: truecharts.org/catagories: | - security diff --git a/charts/enterprise/authelia/values.yaml b/charts/enterprise/authelia/values.yaml index c3709516e76..323b09a1958 100644 --- a/charts/enterprise/authelia/values.yaml +++ b/charts/enterprise/authelia/values.yaml @@ -10,8 +10,10 @@ workload: podSpec: containers: main: - command: ["authelia"] - args: ["--config=/configuration.yaml"] + command: + - authelia + args: + - --config=/configuration.yaml envFrom: - configMapRef: name: authelia-paths diff --git a/charts/enterprise/prometheus/Chart.yaml b/charts/enterprise/prometheus/Chart.yaml index de70be027c4..1552d2f697a 100644 --- a/charts/enterprise/prometheus/Chart.yaml +++ b/charts/enterprise/prometheus/Chart.yaml @@ -29,7 +29,7 @@ sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus type: application -version: 9.0.6 +version: 9.0.7 annotations: truecharts.org/catagories: | - metrics diff --git a/charts/enterprise/prometheus/values.yaml b/charts/enterprise/prometheus/values.yaml index 58ccfa9c7f5..4700f095ba5 100644 --- a/charts/enterprise/prometheus/values.yaml +++ b/charts/enterprise/prometheus/values.yaml @@ -972,7 +972,8 @@ alertmanager: global: resolve_timeout: 5m route: - group_by: ["job"] + group_by: + - job group_wait: 30s group_interval: 5m repeat_interval: 12h diff --git a/charts/stable/gitea/Chart.yaml b/charts/stable/gitea/Chart.yaml index 8722809674e..4c0ebfa2354 100644 --- a/charts/stable/gitea/Chart.yaml +++ b/charts/stable/gitea/Chart.yaml @@ -30,7 +30,7 @@ sources: - https://gitea.com/gitea/helm-chart - https://github.com/go-gitea/gitea type: application -version: 13.0.7 +version: 13.0.8 annotations: truecharts.org/catagories: | - GIT diff --git a/charts/stable/gitea/values.yaml b/charts/stable/gitea/values.yaml index 4f24f407821..cc61d457119 100644 --- a/charts/stable/gitea/values.yaml +++ b/charts/stable/gitea/values.yaml @@ -100,7 +100,8 @@ workload: enabled: true imageSelector: image type: init - command: ["/usr/sbin/init_directory_structure.sh"] + command: + - "/usr/sbin/init_directory_structure.sh" securityContext: runAsUser: 0 runAsNonRoot: false @@ -111,7 +112,8 @@ workload: enabled: true imageSelector: image type: init - command: ["/usr/sbin/configure_gitea.sh"] + command: + - "/usr/sbin/configure_gitea.sh" envFrom: - configMapRef: name: gitea-env diff --git a/charts/stable/kiwix-serve/Chart.yaml b/charts/stable/kiwix-serve/Chart.yaml index 5a21e5fd1e2..47021be2834 100644 --- a/charts/stable/kiwix-serve/Chart.yaml +++ b/charts/stable/kiwix-serve/Chart.yaml @@ -22,7 +22,7 @@ sources: - https://www.kiwix.org/ - https://github.com/kiwix/kiwix-tools/blob/master/docker/server type: application -version: 4.0.16 +version: 4.0.17 annotations: truecharts.org/SCALE-support: "true" truecharts.org/catagories: | diff --git a/charts/stable/kiwix-serve/values.yaml b/charts/stable/kiwix-serve/values.yaml index 2b92905ce48..e82a49d2710 100644 --- a/charts/stable/kiwix-serve/values.yaml +++ b/charts/stable/kiwix-serve/values.yaml @@ -29,4 +29,5 @@ workload: env: DOWNLOAD: http://download.kiwix.org/zim/wikipedia_en_chemistry_nopic.zim PORT: "{{ .Values.service.main.ports.main.port }}" - args: ["*.zim"] + args: + - "*.zim" diff --git a/charts/stable/lldap/Chart.yaml b/charts/stable/lldap/Chart.yaml index bed4628975f..516cb6cafa8 100644 --- a/charts/stable/lldap/Chart.yaml +++ b/charts/stable/lldap/Chart.yaml @@ -23,7 +23,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/lldap - https://github.com/nitnelave/lldap type: application -version: 1.1.5 +version: 1.1.6 annotations: truecharts.org/catagories: | - ldap diff --git a/charts/stable/lldap/values.yaml b/charts/stable/lldap/values.yaml index 592d469c333..577eb942b97 100644 --- a/charts/stable/lldap/values.yaml +++ b/charts/stable/lldap/values.yaml @@ -26,8 +26,10 @@ workload: podSpec: containers: main: - command: ["/app/lldap"] - args: ["run"] + command: + - "/app/lldap" + args: + - "run" env: LLDAP_LDAP_BASE_DN: "dc=example,dc=com" LLDAP_JWT_SECRET: diff --git a/charts/stable/minio-console/Chart.yaml b/charts/stable/minio-console/Chart.yaml index fd892b6107f..faf559e439a 100644 --- a/charts/stable/minio-console/Chart.yaml +++ b/charts/stable/minio-console/Chart.yaml @@ -20,7 +20,7 @@ name: minio-console sources: - https://github.com/truecharts/charts/tree/master/charts/stable/minio-console - https://github.com/minio/console -version: 6.0.17 +version: 6.0.18 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/minio-console/values.yaml b/charts/stable/minio-console/values.yaml index 51f75612abe..e470031f41e 100644 --- a/charts/stable/minio-console/values.yaml +++ b/charts/stable/minio-console/values.yaml @@ -29,4 +29,5 @@ workload: CONSOLE_MINIO_SERVER: "" CONSOLE_PBKDF_PASSPHRASE: "changeme" CONSOLE_PBKDF_SALT: "changeme" - args: ["server"] + args: + - "server" diff --git a/charts/stable/minio/Chart.yaml b/charts/stable/minio/Chart.yaml index 60a656e87e6..d8cf68c15d3 100644 --- a/charts/stable/minio/Chart.yaml +++ b/charts/stable/minio/Chart.yaml @@ -20,7 +20,7 @@ name: minio sources: - https://github.com/truecharts/charts/tree/master/charts/stable/minio - https://github.com/minio/minio -version: 6.0.18 +version: 6.0.19 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/minio/values.yaml b/charts/stable/minio/values.yaml index ca59c498ea1..0017fb93218 100644 --- a/charts/stable/minio/values.yaml +++ b/charts/stable/minio/values.yaml @@ -49,14 +49,12 @@ workload: path: "/minio/health/ready" port: 10106 args: - [ - "server", - "/data", - "--address", - ":10106", - "--console-address", - ":10107", - ] + - "server" + - "/data" + - "--address" + - ":10106" + - "--console-address" + - ":10107" env: MINIO_ROOT_USER: "minio" MINIO_BROWSER_REDIRECT_URL: "" diff --git a/charts/stable/netdata/Chart.yaml b/charts/stable/netdata/Chart.yaml index e72f28fd8aa..e6139637296 100644 --- a/charts/stable/netdata/Chart.yaml +++ b/charts/stable/netdata/Chart.yaml @@ -19,7 +19,7 @@ name: netdata sources: - https://github.com/truecharts/charts/tree/master/charts/stable/netdata - https://github.com/netdata -version: 5.0.14 +version: 5.0.15 annotations: truecharts.org/catagories: | - utilities diff --git a/charts/stable/netdata/values.yaml b/charts/stable/netdata/values.yaml index a95dede7b33..3a9032ade59 100644 --- a/charts/stable/netdata/values.yaml +++ b/charts/stable/netdata/values.yaml @@ -41,7 +41,8 @@ rbac: - "get" - "list" - "watch" - - apiGroups: [""] + - apiGroups: + - "" resources: - "namespaces" verbs: @@ -142,7 +143,9 @@ workload: enabled: true imageSelector: image type: init - command: ["/bin/bash", "-c"] + command: + - /bin/bash + - -c args: - |- copy_config () { diff --git a/charts/stable/ntfy/Chart.yaml b/charts/stable/ntfy/Chart.yaml index d29ef14972d..1e06718b96c 100644 --- a/charts/stable/ntfy/Chart.yaml +++ b/charts/stable/ntfy/Chart.yaml @@ -18,7 +18,7 @@ name: ntfy sources: - https://github.com/truecharts/charts/tree/master/charts/stable/ntfy - https://github.com/binwiederhier/ntfy/ -version: 5.0.7 +version: 5.0.9 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/ntfy/values.yaml b/charts/stable/ntfy/values.yaml index d9fa989e899..2d3d0c4c2b6 100644 --- a/charts/stable/ntfy/values.yaml +++ b/charts/stable/ntfy/values.yaml @@ -39,7 +39,8 @@ workload: type: tcp startup: type: tcp - args: ["serve"] + args: + - "serve" env: NTFY_LISTEN_HTTP: ":{{ .Values.service.main.ports.main.port }}" # User Defined diff --git a/charts/stable/pinry/Chart.yaml b/charts/stable/pinry/Chart.yaml index f54647952e6..3fef5773f8d 100644 --- a/charts/stable/pinry/Chart.yaml +++ b/charts/stable/pinry/Chart.yaml @@ -18,7 +18,7 @@ name: pinry sources: - https://github.com/truecharts/charts/tree/master/charts/stable/pinry - https://github.com/pinry/pinry/ -version: 5.0.11 +version: 5.0.13 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/pinry/values.yaml b/charts/stable/pinry/values.yaml index 4e93ac67ca4..7d5f3e0d5d5 100644 --- a/charts/stable/pinry/values.yaml +++ b/charts/stable/pinry/values.yaml @@ -36,11 +36,13 @@ workload: secretKeyRef: name: secrets key: SECRET_KEY - command: ["sh", "-c"] + command: + - sh + - -c args: - | - keyfile="/data/production_secret_key.txt"; if [ ! -f ${keyfile} ]; then - + keyfile="/data/production_secret_key.txt"; + if [ ! -f ${keyfile} ]; then echo "No ${keyfile} File..."; echo "Creating ${keyfile} file..."; echo "${SECRET_KEY}" > ${keyfile}; @@ -51,7 +53,6 @@ workload: echo "Failed."; fi; else - echo "${keyfile} File exists. Skipping..."; fi; containers: diff --git a/charts/stable/projectsend/Chart.yaml b/charts/stable/projectsend/Chart.yaml index fb68dd73c4b..3d6e1f73fc6 100644 --- a/charts/stable/projectsend/Chart.yaml +++ b/charts/stable/projectsend/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 kubeVersion: ">=1.16.0-0" name: projectsend -version: 7.0.12 +version: 7.0.14 appVersion: "2021.12.10" description: Projectsend is a self-hosted application that lets you upload files and assign them to specific clients that you create yourself. type: application diff --git a/charts/stable/projectsend/values.yaml b/charts/stable/projectsend/values.yaml index 6a85e29deb5..6b83480fcca 100644 --- a/charts/stable/projectsend/values.yaml +++ b/charts/stable/projectsend/values.yaml @@ -53,7 +53,9 @@ workload: expandObjectName: false name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}' key: plainhost - command: ["/bin/sh", "-c"] + command: + - /bin/sh + - -c args: - |- export configFile="/config/projectsend/sys.config.php"; diff --git a/charts/stable/recyclarr/Chart.yaml b/charts/stable/recyclarr/Chart.yaml index cf93eea8d09..09368b5551f 100644 --- a/charts/stable/recyclarr/Chart.yaml +++ b/charts/stable/recyclarr/Chart.yaml @@ -22,7 +22,7 @@ sources: - https://github.com/recyclarr/recyclarr - https://github.com/recyclarr/recyclarr/pkgs/container/recyclarr type: application -version: 4.0.15 +version: 4.0.16 annotations: truecharts.org/SCALE-support: "true" truecharts.org/catagories: | diff --git a/charts/stable/recyclarr/values.yaml b/charts/stable/recyclarr/values.yaml index 5136b966143..b9af9774eb4 100644 --- a/charts/stable/recyclarr/values.yaml +++ b/charts/stable/recyclarr/values.yaml @@ -28,7 +28,9 @@ workload: type: install enabled: true imageSelector: "image" - command: ["recyclarr", "create-config"] + command: + - recyclarr + - create-config containers: main: probes: diff --git a/charts/stable/ser2sock/Chart.yaml b/charts/stable/ser2sock/Chart.yaml index 775922fe917..5998bda3021 100644 --- a/charts/stable/ser2sock/Chart.yaml +++ b/charts/stable/ser2sock/Chart.yaml @@ -19,7 +19,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/ser2sock - https://github.com/nutechsoftware/ser2sock - https://github.com/tenstartups/ser2sock -version: 9.0.14 +version: 9.0.15 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/ser2sock/ci/test-values.yaml b/charts/stable/ser2sock/ci/test-values.yaml index 55723df0092..dc92ed3df94 100644 --- a/charts/stable/ser2sock/ci/test-values.yaml +++ b/charts/stable/ser2sock/ci/test-values.yaml @@ -3,3 +3,11 @@ persistence: enabled: false type: hostPath mountPath: /dev/ttyUSB0 + +workload: + main: + podSpec: + containers: + main: + env: + SERIAL_DEVICE: "{{ .Values.persistence.usb.mountPath }}" diff --git a/charts/stable/ser2sock/values.yaml b/charts/stable/ser2sock/values.yaml index 027b29c0619..307ad22de6c 100644 --- a/charts/stable/ser2sock/values.yaml +++ b/charts/stable/ser2sock/values.yaml @@ -35,5 +35,5 @@ workload: main: env: LISTENER_PORT: "{{ .Values.service.main.ports.main.port }}" - SERIAL_DEVICE: "{{ .Values.persistence.usb.mountPath }}" + SERIAL_DEVICE: "" BAUD_RATE: 115200 diff --git a/charts/stable/zigbee2mqtt/Chart.yaml b/charts/stable/zigbee2mqtt/Chart.yaml index 96a49079285..fe04a7f1521 100644 --- a/charts/stable/zigbee2mqtt/Chart.yaml +++ b/charts/stable/zigbee2mqtt/Chart.yaml @@ -20,7 +20,7 @@ name: zigbee2mqtt sources: - https://github.com/truecharts/charts/tree/master/charts/stable/zigbee2mqtt - https://github.com/Koenkk/zigbee2mqtt -version: 7.0.16 +version: 7.0.17 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/zigbee2mqtt/values.yaml b/charts/stable/zigbee2mqtt/values.yaml index e15d4ef39f7..919174aaefa 100644 --- a/charts/stable/zigbee2mqtt/values.yaml +++ b/charts/stable/zigbee2mqtt/values.yaml @@ -41,7 +41,9 @@ workload: ZIGBEE2MQTT_CONFIG_SERIAL_PORT: "{{ .Values.workload.main.podSpec.containers.main.env.ZIGBEE2MQTT_CONFIG_SERIAL_PORT }}" ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER: "{{ .Values.workload.main.podSpec.containers.main.env.ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER }}" USE_CUSTOM_CONFIG_FILE: "{{ .Values.workload.main.podSpec.containers.main.env.USE_CUSTOM_CONFIG_FILE }}" - command: ["/bin/sh", "-c"] + command: + - /bin/sh + - -c" args: - > if [ -f /data/configuration.yaml ] || [ ${USE_CUSTOM_CONFIG_FILE} == true ]; then diff --git a/templates/questions/ingress/ingressTLS.yaml b/templates/questions/ingress/ingressTLS.yaml index 123642f032b..431a71ee8bb 100644 --- a/templates/questions/ingress/ingressTLS.yaml +++ b/templates/questions/ingress/ingressTLS.yaml @@ -29,7 +29,7 @@ type: string default: "" required: true - + - variable: certificateIssuer label: Use Cert-Manager clusterIssuer description: 'add the name of your cert-manager clusterIssuer here for automatic tls certificates.' diff --git a/tools/bump.sh b/tools/bump.sh index 194d7e9d238..57c0ebb1946 100755 --- a/tools/bump.sh +++ b/tools/bump.sh @@ -40,14 +40,16 @@ function incr_semver() { BUMPTYPE=${1} if [ -z ${2+x} ]; then -for train in dependency enterprise; do +for train in dependency incubator stable enterprise; do for chart in charts/${train}/*; do if [ -d "${chart}" ]; then - echo "Bumping version for ${train}/${chart}" - OLDVER=$(cat ${chart}/Chart.yaml | grep "^version: ") - OLDVER=${OLDVER#version: } - NEWVER=$(incr_semver ${OLDVER} ${BUMPTYPE}) - sed -i "s|^version:.*|version: ${NEWVER}|g" ${chart}/Chart.yaml + if [ -f "${chart}/Chart.yaml" ]; then + echo "Bumping version for ${train}/${chart}" + OLDVER=$(cat ${chart}/Chart.yaml | grep "^version: ") + OLDVER=${OLDVER#version: } + NEWVER=$(incr_semver ${OLDVER} ${BUMPTYPE}) + sed -i "s|^version:.*|version: ${NEWVER}|g" ${chart}/Chart.yaml + fi fi done done