mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-05 15:46:21 -03:00
BREAKING CHANGE: Common Refactor (#110)
* Split and reorganise some file for refactorign and add docs (#15) * refactor(general): initial restructure, renaming, documenting changes and splitting some files for clearity * bump to make clear this is refactor work * fix(deviceList): fix perdict missing var * fix(common-test): rename loader * remove targz from common-test * different perdict name * reshuffle * reorder more * fix device and persistence lists * no message * Add secret spawner (#17) * add secret spawner (cherry picked from commit 19be71210adb17534da3a380630c8a6548d6c2fd) * move secret spawner * some more cleanup * whoopps * minor env cleanup * more * certs * update test * misc fixes * Move hpa to class (#18) * Move hpa to class * use spawner instead of direct class * Fix some tests * Allow for multiple networkPolicies (#19) * Allow for multiple networkPolicies * also update values.yaml * fix mistake * update tests * lowercase * hmm * refactor serviceAccount creation (#77) * make serviceAccounts more flexible * fixup * fixup * fixup 3 * refactor RBAC creation (#76) * Add support for more than one RBAC to be configured * adapt values.yaml * fixup * fixup2 * rbac tweak * hmmm * work on cleaning things up (#81) * restructure folders a bit * cleanup some references * merge autopermissions with hostpatch and remove docker-compose disable * fixup * SCALE->scale * portal to scale folder * remove dep-common * hmm * render prep as script * fix some permission mistakes * patch auto-permissions tests * More TPL usage for containers and pods (#82) * tpl pod content * fix * fix2 * more mainContainer tpl support * fix again * volume and volumemount tpl options expansion * missing space * readonly fix * finish tpl addition to non-class files * fix port * no tpl for group number * more tpl and test fixes * allow to disable inotify patch * no message * add nfs support to persistence and port a patch from KAH * allow externalTrafficPolicy on all types of services * change fix * Ensure SCALE specific code is not run outside of SCALE (#83) * only apply SCALE specific non-storage settings when running as SCALE App * fix ingress and portal tests * significantly simplify SCALE PVC naming and make it only run when used as SCALE App * fix certificate tests * use global ixChartContext where suitable * Add auto-permissions support for (NFSv4) ACL's (#84) * initial work on NFS4 ACL support * remove automatic permission tests for now... * more verbosity * test another solution * set rights for both user AND group * test auto permissions during run tests * hmmm * hmm2 * fix quoting issues * different quotes * ahhh * Update charts/common/templates/lib/controller/_prepare.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * improve acl detector * invert acl detector * stick to group permissions * ensure chown uses a path Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Tests and small fixes Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1d1945f20a
commit
f267828efe
2
.github/ct-lint.yaml
vendored
2
.github/ct-lint.yaml
vendored
@@ -4,4 +4,4 @@ helm-extra-args: --timeout 600s
|
||||
chart-dirs:
|
||||
- charts
|
||||
chart-repos:
|
||||
- k8s-at-home-libraries=https://library-charts.truecharts.org
|
||||
- truecharts-libraries=https://library-charts.truecharts.org
|
||||
|
||||
99
.github/workflows/charts-lint-test.yaml
vendored
Normal file
99
.github/workflows/charts-lint-test.yaml
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
name: "Charts: Lint and test"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/charts-lint-test.yaml'
|
||||
- 'charts/**'
|
||||
- 'helper-charts/**'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint charts
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
changed: ${{ steps.list-changed.outputs.changed }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.4
|
||||
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.2.1
|
||||
|
||||
- name: Run chart-testing (list-changed)
|
||||
id: list-changed
|
||||
run: |
|
||||
changed=$(ct list-changed --config .github/ct-lint.yaml)
|
||||
if [[ -n "$changed" ]]; then
|
||||
echo "::set-output name=changed::true"
|
||||
fi
|
||||
- name: Run chart-testing (lint)
|
||||
id: lint
|
||||
if: steps.list-changed.outputs.changed == 'true'
|
||||
run: ct lint --config .github/ct-lint.yaml
|
||||
|
||||
unittest:
|
||||
needs:
|
||||
- lint
|
||||
name: Run unit tests
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.4
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
helm plugin install https://github.com/vbehar/helm3-unittest --version v1.0.16
|
||||
cd helper-charts/common-test/
|
||||
helm dependency update
|
||||
helm unittest -f "tests/**/*_test.yaml" .
|
||||
install:
|
||||
needs:
|
||||
- lint
|
||||
name: Install charts
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.4
|
||||
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.2.1
|
||||
|
||||
- name: Create k3d cluster
|
||||
uses: nolar/setup-k3d-k3s@v1
|
||||
with:
|
||||
version: v1.22.4+k3s1
|
||||
if: needs.lint.outputs.changed == 'true'
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
if: needs.lint.outputs.changed == 'true'
|
||||
run: find ./ -type f -name *.yaml -exec sed -i 's/tccr.io/ghcr.io/gI' {} \; && ct install --config .github/ct-install.yaml
|
||||
78
.github/workflows/common.test.yaml
vendored
78
.github/workflows/common.test.yaml
vendored
@@ -1,78 +0,0 @@
|
||||
name: "common: Tests"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
tags-ignore:
|
||||
- '**'
|
||||
paths:
|
||||
- 'charts/**'
|
||||
- 'helper-charts/**'
|
||||
- 'tests/**'
|
||||
- '.github/workflows/common.test.yaml'
|
||||
- '.github/ct-install.yaml'
|
||||
- '.github/ct-lint.yaml'
|
||||
|
||||
jobs:
|
||||
unit-and-lint:
|
||||
name: Unit and Lint tests
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: tccr.io/truecharts/devcontainer:v2.2.1@sha256:4ace13c049bf00f85c63e0070f86b71656a7c3b2113aa3e21c3107f3d1f7bf87
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
name: Checkout
|
||||
with:
|
||||
fetch-depth: 100
|
||||
|
||||
- name: Run chart-testing (lint)
|
||||
run: ct lint --config .github/ct-lint.yaml --charts 'helper-charts/common-test'
|
||||
|
||||
- name: Run common unit tests
|
||||
run: |
|
||||
bundle exec m -r tests
|
||||
|
||||
run-tests:
|
||||
name: Run tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: [unit-and-lint]
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
name: Checkout
|
||||
with:
|
||||
fetch-depth: 100
|
||||
|
||||
- name: Install Helm
|
||||
if: ${{ matrix.app != '.gitkee' }}
|
||||
uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab # renovate: tag=v1
|
||||
with:
|
||||
version: v3.7.1
|
||||
|
||||
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # tag=v3
|
||||
if: ${{ matrix.app != '.gitkee' }}
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Set up chart-testing
|
||||
if: ${{ matrix.app != '.gitkee' }}
|
||||
uses: helm/chart-testing-action@dae259e86a35ff09145c0805e2d7dd3f7207064a # tag=v2.2.1
|
||||
|
||||
##
|
||||
# Chart-Testing Section
|
||||
##
|
||||
|
||||
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # tag=v3
|
||||
if: ${{ matrix.app != '.gitkee' }}
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Create k3d cluster
|
||||
uses: nolar/setup-k3d-k3s@v1
|
||||
with:
|
||||
version: v1.22.4+k3s1
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: find ./ -type f -name *.yaml -exec sed -i 's/tccr.io/ghcr.io/gI' {} \; && ct install --config .github/ct-install.yaml --charts 'helper-charts/common-test'
|
||||
Reference in New Issue
Block a user