From 5e2dc34ba4ad13666c2459555bc1753cb1361e45 Mon Sep 17 00:00:00 2001 From: Jochem Date: Tue, 9 Jul 2024 11:42:36 +0200 Subject: [PATCH 1/5] Test pipeline --- .github/workflows/chart-testing.yml | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/chart-testing.yml diff --git a/.github/workflows/chart-testing.yml b/.github/workflows/chart-testing.yml new file mode 100644 index 0000000..4c42eee --- /dev/null +++ b/.github/workflows/chart-testing.yml @@ -0,0 +1,51 @@ +name: Lint and Test Charts + +on: pull_request + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v4.2.0 + with: + version: v3.14.4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + check-latest: true + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.7.0 + + - name: Add repositories + run: | + for dir in $(ls -d charts/*/); do + helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done + done + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + + - name: Run chart-testing (lint) + if: steps.list-changed.outputs.changed == 'true' + run: ct lint --target-branch ${{ github.event.repository.default_branch }} + + - name: Create kind cluster + if: steps.list-changed.outputs.changed == 'true' + uses: helm/kind-action@v1.10.0 + + - name: Run chart-testing (install) + if: steps.list-changed.outputs.changed == 'true' + run: ct install --target-branch ${{ github.event.repository.default_branch }} \ No newline at end of file From 50ec0b04b6f33a99d3d8fe1426c764cbfac77651 Mon Sep 17 00:00:00 2001 From: Jochem Date: Tue, 9 Jul 2024 11:43:58 +0200 Subject: [PATCH 2/5] Test pipeline --- .github/workflows/chart-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chart-testing.yml b/.github/workflows/chart-testing.yml index 4c42eee..5395580 100644 --- a/.github/workflows/chart-testing.yml +++ b/.github/workflows/chart-testing.yml @@ -22,7 +22,7 @@ jobs: check-latest: true - name: Set up chart-testing - uses: helm/chart-testing-action@v2.7.0 + uses: helm/chart-testing-action@v2.6.1 - name: Add repositories run: | From 0784ed39f26b410d52b49f19d4c674997392b950 Mon Sep 17 00:00:00 2001 From: Jochem Date: Tue, 9 Jul 2024 11:47:55 +0200 Subject: [PATCH 3/5] Test pipeline --- charts/librenms/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/librenms/Chart.yaml b/charts/librenms/Chart.yaml index a4bed15..230189e 100644 --- a/charts/librenms/Chart.yaml +++ b/charts/librenms/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: librenms description: LibreNMS is an autodiscovering PHP/MySQL-based network monitoring system. type: application -version: 3.10.0 +version: 3.10.1 appVersion: "24.5.0" dependencies: - name: redis From 251e29fafe807d9e176b1e698b82846cd7b07fa5 Mon Sep 17 00:00:00 2001 From: Jochem Date: Tue, 9 Jul 2024 12:15:35 +0200 Subject: [PATCH 4/5] Fix pipeline --- .github/workflows/chart-testing.yml | 2 +- charts/librenms/ci/test-values.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 charts/librenms/ci/test-values.yaml diff --git a/.github/workflows/chart-testing.yml b/.github/workflows/chart-testing.yml index 5395580..cb21966 100644 --- a/.github/workflows/chart-testing.yml +++ b/.github/workflows/chart-testing.yml @@ -48,4 +48,4 @@ jobs: - name: Run chart-testing (install) if: steps.list-changed.outputs.changed == 'true' - run: ct install --target-branch ${{ github.event.repository.default_branch }} \ No newline at end of file + run: ct install --target-branch ${{ github.event.repository.default_branch }} --skip-clean-up \ No newline at end of file diff --git a/charts/librenms/ci/test-values.yaml b/charts/librenms/ci/test-values.yaml new file mode 100644 index 0000000..da1f3e9 --- /dev/null +++ b/charts/librenms/ci/test-values.yaml @@ -0,0 +1,2 @@ +librenms: + appkey: base64:RTMmh+i10E2RMcDxookMu47BTzJQy87hOU+k/zcuPnA= From c608f26117ba03b4cacf25ad9bc2a3a8ad03b251 Mon Sep 17 00:00:00 2001 From: Jochem Date: Tue, 9 Jul 2024 12:15:46 +0200 Subject: [PATCH 5/5] Fix liting --- charts/librenms/Chart.lock | 4 ++-- charts/librenms/Chart.yaml | 7 +++++-- charts/librenms/values.yaml | 16 +++++++--------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/charts/librenms/Chart.lock b/charts/librenms/Chart.lock index 11d99e3..d8b29e7 100644 --- a/charts/librenms/Chart.lock +++ b/charts/librenms/Chart.lock @@ -5,5 +5,5 @@ dependencies: - name: mysql repository: https://charts.bitnami.com/bitnami version: 10.3.0 -digest: sha256:7b8a3f1182b70837c842c8a9fe7c1fa913cadd6800f1f780f94c357af7fca21f -generated: "2024-07-05T12:50:36.211666249Z" +digest: sha256:f1e63eec3d96520ef7cd365ece9a281d57e48f811fd9e19d47baefa37fceee76 +generated: "2024-07-09T11:51:38.284682+02:00" diff --git a/charts/librenms/Chart.yaml b/charts/librenms/Chart.yaml index 230189e..be5744f 100644 --- a/charts/librenms/Chart.yaml +++ b/charts/librenms/Chart.yaml @@ -4,12 +4,15 @@ description: LibreNMS is an autodiscovering PHP/MySQL-based network monitoring s type: application version: 3.10.1 appVersion: "24.5.0" +maintainers: + - name: TheChef23 + url: https://github.com/TheChef23 dependencies: - name: redis version: "~19.6.0" repository: "https://charts.bitnami.com/bitnami" - when: redis.enabled == true + condition: redis.enabled - name: mysql version: "~10.3.0" repository: "https://charts.bitnami.com/bitnami" - when: mysql.enabled == true + condition: mysql.enabled diff --git a/charts/librenms/values.yaml b/charts/librenms/values.yaml index fad7e12..cc29378 100644 --- a/charts/librenms/values.yaml +++ b/charts/librenms/values.yaml @@ -9,7 +9,7 @@ librenms: # Laravel appkey used by LibreNMS, a default is set for useability it is # recommended to replace this with your own key # THIS A REQUIRED SETTINGS - appkey: + appkey: # Timezone used by librenms for communication with RRD cached timezone: UTC @@ -20,9 +20,7 @@ librenms: configuration: |- $config['distributed_poller_group'] = '0'; $config['distributed_poller'] = true; - - # Frontend container configurations options frontend: replicas: 1 @@ -47,9 +45,9 @@ librenms: # memory: 200M # SNMP network discovery scanner cron job. This job is optional and only use - # when having snmp network discovery enabled. For this to work either set the + # when having snmp network discovery enabled. For this to work either set the # 'nets' confifuration in the custom config on in the admin interface - # See the following link for more information: + # See the following link for more information: # https://docs.librenms.org/Extensions/Auto-Discovery/ snmp_scanner: enabled: false @@ -65,7 +63,7 @@ librenms: extraEnvs: {} # RRD cached is the tool that allows for distributed polling and is mandatory - # in this LibreNMS helm chart. See the rrdcached documentation for more + # in this LibreNMS helm chart. See the rrdcached documentation for more # information: https://oss.oetiker.ch/rrdtool/doc/rrdcached.en.html rrdcached: image: @@ -97,7 +95,7 @@ librenms: # Extra environment variable for RRDCACHED container extraEnvs: {} -# Configuration for MySQL dependency chart by Bitnami. See their chart for +# Configuration for MySQL dependency chart by Bitnami. See their chart for # more information: https://github.com/bitnami/charts/tree/master/bitnami/mysql mysql: enabled: true @@ -105,7 +103,7 @@ mysql: username: librenms database: librenms -# Configuration for redis dependency chart by Bitnami. See their chart for +# Configuration for redis dependency chart by Bitnami. See their chart for # more information: https://github.com/bitnami/charts/tree/master/bitnami/redis redis: enabled: true @@ -119,4 +117,4 @@ redis: master: disableCommands: [] - architecture: standalone \ No newline at end of file + architecture: standalone