From a84673810398f82280967a8780d8f126185c8147 Mon Sep 17 00:00:00 2001 From: Jochem Date: Fri, 5 Jul 2024 11:03:57 +0200 Subject: [PATCH 01/16] Adjust README to new repo --- charts/librenms/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/librenms/README.md b/charts/librenms/README.md index 3cb9ff8..c8aff8b 100644 --- a/charts/librenms/README.md +++ b/charts/librenms/README.md @@ -6,8 +6,8 @@ data center infrastructure management (DCIM) tool. ## TL;DR ```shell -$ helm repo add thechef23 https://thechef23.github.io/helm-librenms -$ helm install my-release thechef23-librenms/librenms --set appkey= +$ helm repo add librenms https://www.librenms.org/helm-charts +$ helm install my-release librenms/librenms --set appkey= ``` ## Prerequisites @@ -20,12 +20,12 @@ $ helm install my-release thechef23-librenms/librenms --set appkey= +$ helm repo add librenms https://www.librenms.org/helm-charts +$ helm install my-release librenms/librenms --set appkey= ``` ## Values -Check the [values.yaml](/TheChef23/helm-librenms/blob/main/values.yaml) file for the available settings for this chart and its +Check the [values.yaml](/librenms/helm-charts/charts/librenms/blob/main/values.yaml) file for the available settings for this chart and its dependencies. ### Required values: From 880175b05f6d3b293f32b62c7ae1e7e2d7203047 Mon Sep 17 00:00:00 2001 From: Jochem Date: Fri, 5 Jul 2024 11:23:30 +0200 Subject: [PATCH 02/16] Bump version --- 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 aafa1bc..2a97e2f 100644 --- a/charts/librenms/Chart.yaml +++ b/charts/librenms/Chart.yaml @@ -4,7 +4,7 @@ description: LibreNMS is an autodiscovering PHP/MySQL-based network monitoring s type: application -version: 3.8.0 +version: 3.9.0 appVersion: "24.5.0" dependencies: From a56570e4fe73aa42a592230279d73bdd89a458b4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:23:48 +0000 Subject: [PATCH 03/16] Add renovate.json --- renovate.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..5db72dd --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ] +} From a03ca0a2165741fc1ae23dc8b2bce138d84bc0ca Mon Sep 17 00:00:00 2001 From: Jochem Date: Fri, 5 Jul 2024 14:49:15 +0200 Subject: [PATCH 04/16] Add set appversion workflow --- .github/workflows/set-appVersion.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/set-appVersion.yml diff --git a/.github/workflows/set-appVersion.yml b/.github/workflows/set-appVersion.yml new file mode 100644 index 0000000..2b10ec1 --- /dev/null +++ b/.github/workflows/set-appVersion.yml @@ -0,0 +1,34 @@ +name: Updste LibreNMS appVersion +on: + push: + branches: + - renovate/* + +jobs: + set-appverions: + runs-on: ubuntu-24.04 + + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + + - name: Find image version + run: | + wget https://github.com/mikefarah/yq/releases/download/v4.44.2/yq_linux_amd64.tar.gz -O /tmp/yq.tgz + tar -xvf /tmp/yq.tgz --directory /tmp + chmod +x /tmp/yq_linux_amd64 + + export VERSION=$(/tmp/yq_linux_amd64 '.librenms.image.tag' charts/librenms/values.yaml) + echo "DETECTED VERSION $VERSION" + /tmp/yq_linux_amd64 -e -i '.appVersion = env(VERSION)' charts/librenms/Chart.yaml + + + # Commit all changed files back to the repository + - uses: stefanzweifel/git-auto-commit-action@v5 \ No newline at end of file From 79372bdb2fc0bc4556b3fbe0d6edd784987f8828 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:51:06 +0000 Subject: [PATCH 05/16] Update Helm release redis to ~19.6.0 --- charts/librenms/Chart.lock | 6 +++--- charts/librenms/Chart.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/librenms/Chart.lock b/charts/librenms/Chart.lock index d665d61..11d99e3 100644 --- a/charts/librenms/Chart.lock +++ b/charts/librenms/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: redis repository: https://charts.bitnami.com/bitnami - version: 19.5.5 + version: 19.6.1 - name: mysql repository: https://charts.bitnami.com/bitnami version: 10.3.0 -digest: sha256:e3cdff9ae055655aacaa8e64187b42cc1834bd5ddbbc6f9dbb01fa214586cf68 -generated: "2024-06-20T07:46:30.599412737Z" +digest: sha256:7b8a3f1182b70837c842c8a9fe7c1fa913cadd6800f1f780f94c357af7fca21f +generated: "2024-07-05T12:50:36.211666249Z" diff --git a/charts/librenms/Chart.yaml b/charts/librenms/Chart.yaml index 2a97e2f..47aab0d 100644 --- a/charts/librenms/Chart.yaml +++ b/charts/librenms/Chart.yaml @@ -9,7 +9,7 @@ appVersion: "24.5.0" dependencies: - name: redis - version: "~19.5.0" + version: "~19.6.0" repository: "https://charts.bitnami.com/bitnami" when: redis.enabled == true - name: mysql From be368a6bba37820a1e2fe336a0a2c978a591da31 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 5 Jul 2024 12:51:19 +0000 Subject: [PATCH 06/16] Apply automatic changes --- charts/librenms/Chart.yaml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/charts/librenms/Chart.yaml b/charts/librenms/Chart.yaml index 47aab0d..55fe662 100644 --- a/charts/librenms/Chart.yaml +++ b/charts/librenms/Chart.yaml @@ -1,18 +1,15 @@ apiVersion: v2 name: librenms description: LibreNMS is an autodiscovering PHP/MySQL-based network monitoring system. - type: application - version: 3.9.0 appVersion: "24.5.0" - dependencies: -- name: redis - version: "~19.6.0" - repository: "https://charts.bitnami.com/bitnami" - when: redis.enabled == true -- name: mysql - version: "~10.3.0" - repository: "https://charts.bitnami.com/bitnami" - when: mysql.enabled == true + - name: redis + version: "~19.6.0" + repository: "https://charts.bitnami.com/bitnami" + when: redis.enabled == true + - name: mysql + version: "~10.3.0" + repository: "https://charts.bitnami.com/bitnami" + when: mysql.enabled == true From 5d91501038872425ec70b0a46372163d79ce89d1 Mon Sep 17 00:00:00 2001 From: Jochem Date: Fri, 5 Jul 2024 15:17:41 +0200 Subject: [PATCH 07/16] Bump version --- 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 55fe662..a4bed15 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.9.0 +version: 3.10.0 appVersion: "24.5.0" dependencies: - name: redis From 92baa22db2f57b004f4d8721e4877adabfc42b2b Mon Sep 17 00:00:00 2001 From: Jochem Date: Fri, 5 Jul 2024 16:32:28 +0200 Subject: [PATCH 08/16] Add README --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index e69de29..a28ed9e 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,31 @@ +# LibreNMS Helm Charts + +Welcome to the repository for the Helm charts of the LibreNMS community. This repository holds all the Helm charts you need to deploy LibreNMS and related components using Kubernetes. + +## Main Chart + +The primary chart in this repository is located at `charts/librenms`. This chart allows you to deploy LibreNMS, an open-source network monitoring system, on your Kubernetes cluster. + +## Documentation + +Each chart within this repository comes with its own set of documentation. To get started with a specific chart, please refer to the README.md file located in the respective chart's directory. + +## Getting Started + +To install a chart from this repository, you can use the following Helm commands: + +```sh +helm repo add librenms https://www.librenms.org/helm-charts +helm repo update +helm install my-release librenms/ +``` + +Replace `` with the name of the chart you wish to install (e.g., `librenms`). + +## Contributing + +We welcome contributions from the community. If you have improvements or fixes, please submit a pull request. Make sure to follow our contribution guidelines. + +--- + +Thank you for using LibreNMS Helm charts! For any issues or questions, please refer to the documentation of the respective chart or open an issue in this repository. \ No newline at end of file From 19569659508de50b88ade24d47b2193055daef59 Mon Sep 17 00:00:00 2001 From: Jochem Date: Tue, 9 Jul 2024 11:42:36 +0200 Subject: [PATCH 09/16] Test pipeline Test pipeline Test pipeline Fix pipeline Fix liting --- .github/workflows/chart-testing.yml | 51 +++++++++++++++++++++++++++++ charts/librenms/Chart.lock | 4 +-- charts/librenms/Chart.yaml | 9 +++-- charts/librenms/ci/test-values.yaml | 2 ++ charts/librenms/values.yaml | 16 ++++----- 5 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/chart-testing.yml create mode 100644 charts/librenms/ci/test-values.yaml diff --git a/.github/workflows/chart-testing.yml b/.github/workflows/chart-testing.yml new file mode 100644 index 0000000..cb21966 --- /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.6.1 + + - 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 }} --skip-clean-up \ No newline at end of file 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 a4bed15..be5744f 100644 --- a/charts/librenms/Chart.yaml +++ b/charts/librenms/Chart.yaml @@ -2,14 +2,17 @@ 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" +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/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= 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 From b952aa4c5fe810c867912891566d1f23b31aba50 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:21:34 +0000 Subject: [PATCH 10/16] Update actions/checkout action to v4 --- .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 cb21966..f7ac7a3 100644 --- a/.github/workflows/chart-testing.yml +++ b/.github/workflows/chart-testing.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 From 2cfc457f5a5f42ec6a43de1ed1c9b3c0c446cde5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:22:30 +0000 Subject: [PATCH 11/16] Update Helm release mysql to v11 --- charts/librenms/Chart.lock | 6 +++--- charts/librenms/Chart.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/librenms/Chart.lock b/charts/librenms/Chart.lock index d8b29e7..54c9664 100644 --- a/charts/librenms/Chart.lock +++ b/charts/librenms/Chart.lock @@ -4,6 +4,6 @@ dependencies: version: 19.6.1 - name: mysql repository: https://charts.bitnami.com/bitnami - version: 10.3.0 -digest: sha256:f1e63eec3d96520ef7cd365ece9a281d57e48f811fd9e19d47baefa37fceee76 -generated: "2024-07-09T11:51:38.284682+02:00" + version: 11.1.8 +digest: sha256:4b82fafdf2c4c72a003d1dc6df9343a089eb5d2f686927d134821854f9633c83 +generated: "2024-07-09T10:22:10.255911997Z" diff --git a/charts/librenms/Chart.yaml b/charts/librenms/Chart.yaml index be5744f..77382f8 100644 --- a/charts/librenms/Chart.yaml +++ b/charts/librenms/Chart.yaml @@ -13,6 +13,6 @@ dependencies: repository: "https://charts.bitnami.com/bitnami" condition: redis.enabled - name: mysql - version: "~10.3.0" + version: "~11.1.0" repository: "https://charts.bitnami.com/bitnami" condition: mysql.enabled From e55ddb5781c07272146e596594392daacd2ca7e1 Mon Sep 17 00:00:00 2001 From: Jochem Date: Tue, 9 Jul 2024 12:24:03 +0200 Subject: [PATCH 12/16] Skip version increment check Adjust workflow --- .github/workflows/chart-testing.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/chart-testing.yml b/.github/workflows/chart-testing.yml index f7ac7a3..8c197bd 100644 --- a/.github/workflows/chart-testing.yml +++ b/.github/workflows/chart-testing.yml @@ -39,13 +39,21 @@ jobs: fi - name: Run chart-testing (lint) - if: steps.list-changed.outputs.changed == 'true' - run: ct lint --target-branch ${{ github.event.repository.default_branch }} + if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/develop' + run: ct lint --target-branch ${{ github.event.repository.default_branch }} --check-version-increment=false + + - name: Run chart-testing (lint & version) + if: github.ref == 'refs/heads/develop' + run: ct lint --target-branch main - 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 }} --skip-clean-up \ No newline at end of file + if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/develop' + run: ct install --target-branch ${{ github.event.repository.default_branch }} --skip-clean-up + + - name: Run chart-testing (install & upgrades) + if: github.ref == 'refs/heads/develop' + run: ct install --target-branch main --skip-clean-up --upgrade \ No newline at end of file From df41fab40f67c44bcae01bd2936fd5b0c4fc7531 Mon Sep 17 00:00:00 2001 From: Jochem Date: Tue, 9 Jul 2024 12:57:23 +0200 Subject: [PATCH 13/16] Make sure develop branch does cleanup Adjust testing flow Bump chart version --- .github/workflows/chart-testing.yml | 10 +++++----- charts/librenms/Chart.yaml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/chart-testing.yml b/.github/workflows/chart-testing.yml index 8c197bd..681942e 100644 --- a/.github/workflows/chart-testing.yml +++ b/.github/workflows/chart-testing.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: fetch-depth: 0 @@ -43,11 +43,11 @@ jobs: run: ct lint --target-branch ${{ github.event.repository.default_branch }} --check-version-increment=false - name: Run chart-testing (lint & version) - if: github.ref == 'refs/heads/develop' + if: github.event.pull_request.base.ref == 'main' run: ct lint --target-branch main - name: Create kind cluster - if: steps.list-changed.outputs.changed == 'true' + if: steps.list-changed.outputs.changed == 'true' || github.event.pull_request.base.ref == 'main' uses: helm/kind-action@v1.10.0 - name: Run chart-testing (install) @@ -55,5 +55,5 @@ jobs: run: ct install --target-branch ${{ github.event.repository.default_branch }} --skip-clean-up - name: Run chart-testing (install & upgrades) - if: github.ref == 'refs/heads/develop' - run: ct install --target-branch main --skip-clean-up --upgrade \ No newline at end of file + if: github.event.pull_request.base.ref == 'main' + run: ct install --target-branch main --upgrade \ No newline at end of file diff --git a/charts/librenms/Chart.yaml b/charts/librenms/Chart.yaml index 77382f8..31f09dd 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.1 +version: 3.11.0 appVersion: "24.5.0" maintainers: - name: TheChef23 From 18d0d369b45f4979ce94f245efcd32f0d6d8219c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:05:43 +0000 Subject: [PATCH 14/16] Update actions/checkout action to v4 --- .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 681942e..626b5b0 100644 --- a/.github/workflows/chart-testing.yml +++ b/.github/workflows/chart-testing.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 From ad1590bbf02b9dfa31c48a7f2a4285e8cd253fae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:25:53 +0000 Subject: [PATCH 15/16] Update azure/setup-helm action to v4 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e4a04c6..714391c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: Install Helm - uses: azure/setup-helm@v3 + uses: azure/setup-helm@v4 - name: Add repositories run: | From c9551703a01ee36aece3e237a4c5615980bbd2e0 Mon Sep 17 00:00:00 2001 From: Jochem Date: Thu, 11 Jul 2024 11:32:12 +0200 Subject: [PATCH 16/16] Add Makefile and helm-docs for value injection into readme Adjust readme, add comments to values Bump chart version --- Makefile | 40 +++++++++++++++ charts/librenms/Chart.yaml | 2 +- charts/librenms/README.gotmpl | 66 +++++++++++++++++++++++++ charts/librenms/README.md | 93 ++++++++++++++++++++++++++--------- charts/librenms/values.yaml | 50 ++++++++++++++----- ct.yaml | 9 ++++ 6 files changed, 226 insertions(+), 34 deletions(-) create mode 100644 Makefile create mode 100644 charts/librenms/README.gotmpl create mode 100644 ct.yaml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ddd37fb --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +DOCS_IMAGE_VERSION="v1.14.2" + +LINT_IMAGE_VERSION="v3.8.0" + +# Charts's path relative to the current directory. +CHARTS := $(wildcard ./charts/*) + +CHARTS_NAMES := $(notdir $(CHARTS)) + +.PHONY: lint +lint: helm-deps-update $(addprefix lint-, $(CHARTS_NAMES)) + +lint-%: + @docker run \ + -it \ + -e HOME=/home/ct \ + --mount type=tmpfs,destination=/home/ct \ + --workdir=/data \ + --volume $$(pwd):/data \ + -u $$(id -u) \ + quay.io/helmpack/chart-testing:$(LINT_IMAGE_VERSION) \ + ct lint --config ./ct.yaml --charts ./charts/$* + +.PHONY: docs +docs: $(addprefix docs-, $(CHARTS_NAMES)) + +docs-%: + @docker run \ + --rm \ + --workdir=/helm-docs \ + --volume "$$(pwd):/helm-docs" \ + -u $$(id -u) \ + jnorwood/helm-docs:$(DOCS_IMAGE_VERSION) \ + helm-docs -c ./charts/$* -t ./README.gotmpl -o ./README.md + +.PHONY: helm-deps-update +helm-deps-update: $(addprefix helm-deps-update-, $(CHARTS_NAMES)) + +helm-deps-update-%: + helm dependency update ./charts/$* \ No newline at end of file diff --git a/charts/librenms/Chart.yaml b/charts/librenms/Chart.yaml index 31f09dd..15d2741 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.11.0 +version: 3.11.1 appVersion: "24.5.0" maintainers: - name: TheChef23 diff --git a/charts/librenms/README.gotmpl b/charts/librenms/README.gotmpl new file mode 100644 index 0000000..204b959 --- /dev/null +++ b/charts/librenms/README.gotmpl @@ -0,0 +1,66 @@ +# LibreNMS +{{ template "chart.badgesSection" . }} + +## TL;DR + +```shell +$ helm repo add librenms https://www.librenms.org/helm-charts +$ helm install my-release librenms/librenms --set appkey= +``` + +## Prerequisites + +- This chart has only been tested on Kubernetes 1.18+, but should work on 1.14+ +- Recent versions of Helm 3 are supported + +## Installing the Chart + +To install the chart with the release name `my-release` and default configuration: + +```shell +$ helm repo add librenms https://www.librenms.org/helm-charts +$ helm install my-release librenms/librenms --set appkey= +``` + +## Values +Check the [values.yaml](./values.yaml) file for the available settings for this chart and its +dependencies. + +### Required values: +``` +librenms: + appkey: +``` + +This should be filled with a laravel appkey, this can be generated using the laravel artisan command: +``` +php artisan key:generate +``` +The value should look like: +``` +librenms: + appkey: base64:RTMmh+i10E2RMcDxookMu47BTzJQy87hOU+k/zcuPnA= +``` +### Recommendations + +* `librenms.poller.replicas`: Depending on the scale of your installation, the amount of poller pods needs to b scaled up. Use the poller page in the LibreNMS interface to check for scaling issues. + +### Available values + +The following table lists the main configurable parameters of the {{ template "chart.name" . }} chart v{{ template "chart.version" . }} and their default values. Please, refer to [values.yaml](./values.yaml) for the full list of configurable parameters. + +{{ template "chart.valuesSection" . }} + +## Uninstalling the Chart + +To delete the chart: + +```shell +$ helm delete my-release +``` + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.maintainersSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/librenms/README.md b/charts/librenms/README.md index c8aff8b..46050b8 100644 --- a/charts/librenms/README.md +++ b/charts/librenms/README.md @@ -1,7 +1,5 @@ # LibreNMS - -[LibreNMS](https://docs.librenms.org/) is an IP address management (IPAM) and -data center infrastructure management (DCIM) tool. +![Version: 3.11.0](https://img.shields.io/badge/Version-3.11.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 24.5.0](https://img.shields.io/badge/AppVersion-24.5.0-informational?style=flat-square) ## TL;DR @@ -25,15 +23,69 @@ $ helm install my-release librenms/librenms --set appkey= The following notice applies to all files contained within this Helm Chart and -> the Git repository which contains it: -> -> Copyright 2022 Jochem Bruijns -> -> Licensed under the Apache License, Version 2.0 (the "License"); -> you may not use this file except in compliance with the License. -> You may obtain a copy of the License at -> -> http://www.apache.org/licenses/LICENSE-2.0 -> -> Unless required by applicable law or agreed to in writing, software -> distributed under the License is distributed on an "AS IS" BASIS, -> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -> See the License for the specific language governing permissions and -> limitations under the License. +| Repository | Name | Version | +|------------|------|---------| +| https://charts.bitnami.com/bitnami | mysql | ~11.1.0 | +| https://charts.bitnami.com/bitnami | redis | ~19.6.0 | + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| TheChef23 | | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/charts/librenms/values.yaml b/charts/librenms/values.yaml index cc29378..883957a 100644 --- a/charts/librenms/values.yaml +++ b/charts/librenms/values.yaml @@ -3,88 +3,116 @@ # Declare variables to be passed into your templates. librenms: image: + # -- repository is the image repository to pull from. repository: librenms/librenms + # -- tag is image tag to pull. tag: 24.5.0 - # 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 + # -- Laravel appkey used by LibreNMS, this should be generated by you and is a + # required setting. See the README for more information appkey: - # Timezone used by librenms for communication with RRD cached + # -- Timezone used by librenms for communication with RRD cached timezone: UTC - # Custom configuration options for LibreNMS. Fore more infomation on options + # -- Custom configuration options for LibreNMS. Fore more infomation on options # in this file check the following link: # https://docs.librenms.org/Support/Configuration/ - configuration: |- + configuration: | $config['distributed_poller_group'] = '0'; $config['distributed_poller'] = true; # Frontend container configurations options frontend: + # -- Frontend replicas replicas: 1 readinessProbe: httpGet: + # -- Check endpoint path path: /login + # -- Check endpoint port port: 8000 initialDelaySeconds: 30 periodSeconds: 60 timeoutSeconds: 10 + # -- resources defines the computing resources (CPU and memory) + # that are allocated to the containers running within the Pod. resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. # requests: # cpu: 50m # memory: 150M # Distributed poller container configurations options poller: + # -- Poller replicas replicas: 2 + # -- resources defines the computing resources (CPU and memory) + # that are allocated to the containers running within the Pod. resources: {} # requests: # cpu: 500m # memory: 200M - # SNMP network discovery scanner cron job. This job is optional and only use + # -- 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 # 'nets' confifuration in the custom config on in the admin interface # See the following link for more information: # https://docs.librenms.org/Extensions/Auto-Discovery/ snmp_scanner: + # -- SNMP scanner enabled enabled: false + # -- SNMP scanner cornjob syntac interval cron: 15 * * * * + # -- resources defines the computing resources (CPU and memory) + # that are allocated to the containers running within the Pod. resources: {} # requests: # cpu: 500m # memory: 200M # Extra environment variable for LibreNMS SNMP scanner container + # -- SNMP scanner extra envs extraEnvs: {} # Extra environment variable for LibreNMS container + # -- LibreNMS frontend extra envs extraEnvs: {} - # RRD cached is the tool that allows for distributed polling and is mandatory + # -- RRD cached is the tool that allows for distributed polling and is mandatory # in this LibreNMS helm chart. See the rrdcached documentation for more # information: https://oss.oetiker.ch/rrdtool/doc/rrdcached.en.html rrdcached: image: + # -- repository is the image repository to pull from. repository: crazymax/rrdcached + # -- tag is image tag to pull. tag: 1.8.0 persistence: + # -- RRDCached persistent volume enabled enabled: true journal: + # -- RRDCached journal PV size size: 1Gi rrdcached: + # -- RRDCached RRD storage PV size size: 10Gi + # -- resources defines the computing resources (CPU and memory) + # that are allocated to the containers running within the Pod. resources: {} # requests: # cpu: 100m # memory: 500M livenessProbe: + # -- RRD cached liveness probe tcpSocket: port: 42217 initialDelaySeconds: 15 periodSeconds: 20 envs: + # -- env variables RRD Cached - name: TZ value: "Europe/Amsterdam" - name: WRITE_JITTER @@ -92,10 +120,10 @@ librenms: - name: WRITE_TIMEOUT value: '1800' - # Extra environment variable for RRDCACHED container + # -- 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 @@ -103,7 +131,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 diff --git a/ct.yaml b/ct.yaml new file mode 100644 index 0000000..5a92a21 --- /dev/null +++ b/ct.yaml @@ -0,0 +1,9 @@ +remote: origin +validate-maintainers: false +target-branch: main +chart-repos: + - librenms=https://www.librenms.org/helm-charts/ + - bitnami=https://charts.bitnami.com/bitnami/ +helm-extra-args: --timeout 800s +chart-dirs: + - charts \ No newline at end of file