Compare commits

..

10 Commits

Author SHA1 Message Date
Jochem
6f020f2ba4 Make sure develop branch does cleanup 2024-07-09 12:57:23 +02:00
Jochem
6daed4ee78 Adjust workflow 2024-07-09 12:54:21 +02:00
Jochem
7486084b6b Skip version increment check 2024-07-09 12:24:03 +02:00
renovate[bot]
7518848f99
Update Helm release mysql to v11 2024-07-09 10:22:30 +00:00
Jochem
201961fe28
Merge pull request #9 from librenms/testing
Add testing for helm chart and lint cleanup
2024-07-09 12:20:39 +02:00
Jochem
c608f26117 Fix liting 2024-07-09 12:15:46 +02:00
Jochem
251e29fafe Fix pipeline 2024-07-09 12:15:35 +02:00
Jochem
0784ed39f2 Test pipeline 2024-07-09 11:47:55 +02:00
Jochem
50ec0b04b6 Test pipeline 2024-07-09 11:43:58 +02:00
Jochem
5e2dc34ba4 Test pipeline 2024-07-09 11:42:36 +02:00
18 changed files with 61 additions and 458 deletions

View File

@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up Helm - name: Set up Helm
uses: azure/setup-helm@v4.3.0 uses: azure/setup-helm@v4.2.0
with: with:
version: v3.14.4 version: v3.14.4
@ -22,7 +22,7 @@ jobs:
check-latest: true check-latest: true
- name: Set up chart-testing - name: Set up chart-testing
uses: helm/chart-testing-action@v2.7.0 uses: helm/chart-testing-action@v2.6.1
- name: Add repositories - name: Add repositories
run: | run: |
@ -43,17 +43,17 @@ jobs:
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --check-version-increment=false run: ct lint --target-branch ${{ github.event.repository.default_branch }} --check-version-increment=false
- name: Run chart-testing (lint & version) - name: Run chart-testing (lint & version)
if: github.event.pull_request.base.ref == 'main' if: github.ref == 'refs/heads/develop'
run: ct lint --target-branch main run: ct lint --target-branch main
- name: Create kind cluster - name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true' || github.event.pull_request.base.ref == 'main' if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.12.0 uses: helm/kind-action@v1.10.0
- name: Run chart-testing (install) - name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/develop' 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 run: ct install --target-branch ${{ github.event.repository.default_branch }} --skip-clean-up
- name: Run chart-testing (install & upgrades) - name: Run chart-testing (install & upgrades)
if: github.event.pull_request.base.ref == 'main' if: github.ref == 'refs/heads/develop'
run: ct install --target-branch main --upgrade run: ct install --target-branch main --upgrade

View File

@ -7,8 +7,6 @@ jobs:
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
permissions: permissions:
contents: write contents: write
packages: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -22,7 +20,7 @@ jobs:
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm - name: Install Helm
uses: azure/setup-helm@v4 uses: azure/setup-helm@v3
- name: Add repositories - name: Add repositories
run: | run: |
@ -31,24 +29,6 @@ jobs:
done done
- name: Run chart-releaser - name: Run chart-releaser
uses: helm/chart-releaser-action@v1.7.0 uses: helm/chart-releaser-action@v1.6.0
env: env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# see https://github.com/helm/chart-releaser/issues/183
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push charts to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts"
done

View File

@ -1,40 +0,0 @@
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/$*

View File

@ -1,9 +1,9 @@
dependencies: dependencies:
- name: redis - name: redis
repository: https://charts.bitnami.com/bitnami repository: https://charts.bitnami.com/bitnami
version: 21.1.3 version: 19.6.1
- name: mysql - name: mysql
repository: https://charts.bitnami.com/bitnami repository: https://charts.bitnami.com/bitnami
version: 13.0.0 version: 11.1.8
digest: sha256:ab48525b17834c3b7e491483bb35fad9d11ddbf74368a352cafd59dbbe34d940 digest: sha256:4b82fafdf2c4c72a003d1dc6df9343a089eb5d2f686927d134821854f9633c83
generated: "2025-05-19T07:25:23.570909791Z" generated: "2024-07-09T10:22:10.255911997Z"

View File

@ -2,17 +2,17 @@ apiVersion: v2
name: librenms name: librenms
description: LibreNMS is an autodiscovering PHP/MySQL-based network monitoring system. description: LibreNMS is an autodiscovering PHP/MySQL-based network monitoring system.
type: application type: application
version: 5.0.2 version: 3.10.1
appVersion: "25.5.0" appVersion: "24.5.0"
maintainers: maintainers:
- name: jacobw - name: TheChef23
url: https://github.com/jacobw url: https://github.com/TheChef23
dependencies: dependencies:
- name: redis - name: redis
version: "~21.1.0" version: "~19.6.0"
repository: "https://charts.bitnami.com/bitnami" repository: "https://charts.bitnami.com/bitnami"
condition: redis.enabled condition: redis.enabled
- name: mysql - name: mysql
version: "~13.0.0" version: "~11.1.0"
repository: "https://charts.bitnami.com/bitnami" repository: "https://charts.bitnami.com/bitnami"
condition: mysql.enabled condition: mysql.enabled

View File

@ -1,66 +0,0 @@
# 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=<LibreNMS Application key>
```
## 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=<LibreNMS Application key>
```
## 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" . }}

View File

@ -1,5 +1,7 @@
# LibreNMS # LibreNMS
![Version: 3.12.0](https://img.shields.io/badge/Version-3.12.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)
[LibreNMS](https://docs.librenms.org/) is an IP address management (IPAM) and
data center infrastructure management (DCIM) tool.
## TL;DR ## TL;DR
@ -23,74 +25,15 @@ $ helm install my-release librenms/librenms --set appkey=<LibreNMS Application k
``` ```
## Values ## Values
Check the [values.yaml](./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. dependencies.
### Required values: ### Required values:
``` ```
librenms: librenms:
appkey: 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 librenms chart v3.12.0 and their default values. Please, refer to [values.yaml](./values.yaml) for the full list of configurable parameters.
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| ingress | object | `{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | LibreNMS ingress configuration |
| ingress.annotations | object | `{}` | Ingress annotations |
| ingress.className | string | `""` | Ingress class name |
| ingress.enabled | bool | `false` | Enable or disable ingress |
| ingress.hosts | list | `[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}]` | Ingress ingress rules |
| librenms.appkey | string | `nil` | Laravel appkey used by LibreNMS, this should be generated by you and is a required setting. See the README for more information |
| librenms.configuration | string | `"$config['distributed_poller_group'] = '0';\n$config['distributed_poller'] = true;\n"` | Custom configuration options for LibreNMS. Fore more infomation on options in this file check the following link: https://docs.librenms.org/Support/Configuration/ |
| librenms.extraEnvs | object | `{}` | LibreNMS frontend extra envs |
| librenms.frontend.readinessProbe.httpGet.path | string | `"/login"` | Check endpoint path |
| librenms.frontend.readinessProbe.httpGet.port | int | `8000` | Check endpoint port |
| librenms.frontend.readinessProbe.initialDelaySeconds | int | `30` | |
| librenms.frontend.readinessProbe.periodSeconds | int | `60` | |
| librenms.frontend.readinessProbe.timeoutSeconds | int | `10` | |
| librenms.frontend.replicas | int | `1` | Frontend replicas |
| librenms.frontend.resources | object | `{}` | resources defines the computing resources (CPU and memory) that are allocated to the containers running within the Pod. |
| librenms.image.repository | string | `"librenms/librenms"` | repository is the image repository to pull from. |
| librenms.image.tag | string | `"24.5.0"` | tag is image tag to pull. |
| librenms.poller.replicas | int | `2` | Poller replicas |
| librenms.poller.resources | object | `{}` | resources defines the computing resources (CPU and memory) that are allocated to the containers running within the Pod. |
| librenms.rrdcached | object | `{"envs":[{"name":"TZ","value":"Europe/Amsterdam"},{"name":"WRITE_JITTER","value":"1800"},{"name":"WRITE_TIMEOUT","value":"1800"}],"extraEnvs":{},"image":{"repository":"crazymax/rrdcached","tag":"1.8.0"},"livenessProbe":{"initialDelaySeconds":15,"periodSeconds":20,"tcpSocket":{"port":42217}},"persistence":{"enabled":true,"journal":{"size":"1Gi"},"rrdcached":{"size":"10Gi"}},"resources":{}}` | 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 |
| librenms.rrdcached.envs[0] | object | `{"name":"TZ","value":"Europe/Amsterdam"}` | env variables RRD Cached |
| librenms.rrdcached.extraEnvs | object | `{}` | Extra environment variable for RRDCACHED container |
| librenms.rrdcached.image.repository | string | `"crazymax/rrdcached"` | repository is the image repository to pull from. |
| librenms.rrdcached.image.tag | string | `"1.8.0"` | tag is image tag to pull. |
| librenms.rrdcached.livenessProbe.tcpSocket | object | `{"port":42217}` | RRD cached liveness probe |
| librenms.rrdcached.persistence.enabled | bool | `true` | RRDCached persistent volume enabled |
| librenms.rrdcached.persistence.journal.size | string | `"1Gi"` | RRDCached journal PV size |
| librenms.rrdcached.persistence.rrdcached.size | string | `"10Gi"` | RRDCached RRD storage PV size |
| librenms.rrdcached.resources | object | `{}` | resources defines the computing resources (CPU and memory) that are allocated to the containers running within the Pod. |
| librenms.snmp_scanner | object | `{"cron":"15 * * * *","enabled":false,"extraEnvs":{},"resources":{}}` | 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/ |
| librenms.snmp_scanner.cron | string | `"15 * * * *"` | SNMP scanner cornjob syntac interval |
| librenms.snmp_scanner.enabled | bool | `false` | SNMP scanner enabled |
| librenms.snmp_scanner.extraEnvs | object | `{}` | SNMP scanner extra envs |
| librenms.snmp_scanner.resources | object | `{}` | resources defines the computing resources (CPU and memory) that are allocated to the containers running within the Pod. |
| librenms.timezone | string | `"UTC"` | Timezone used by librenms for communication with RRD cached |
| mysql | object | `{"auth":{"database":"librenms","username":"librenms"},"enabled":true}` | Configuration for MySQL dependency chart by Bitnami. See their chart for more information: https://github.com/bitnami/charts/tree/master/bitnami/mysql |
| redis | object | `{"architecture":"standalone","auth":{"enabled":false,"sentinel":false},"enabled":true,"master":{"disableCommands":[]},"sentinel":{"enabled":false}}` | Configuration for redis dependency chart by Bitnami. See their chart for more information: https://github.com/bitnami/charts/tree/master/bitnami/redis |
## Uninstalling the Chart ## Uninstalling the Chart
To delete the chart: To delete the chart:
@ -99,18 +42,21 @@ To delete the chart:
$ helm delete my-release $ helm delete my-release
``` ```
## Requirements ## License
| Repository | Name | Version | > The following notice applies to all files contained within this Helm Chart and
|------------|------|---------| > the Git repository which contains it:
| https://charts.bitnami.com/bitnami | mysql | ~11.1.0 | >
| https://charts.bitnami.com/bitnami | redis | ~19.6.0 | > Copyright 2022 Jochem Bruijns
>
## Maintainers > Licensed under the Apache License, Version 2.0 (the "License");
> you may not use this file except in compliance with the License.
| Name | Email | Url | > You may obtain a copy of the License at
| ---- | ------ | --- | >
| TheChef23 | | <https://github.com/TheChef23> | > http://www.apache.org/licenses/LICENSE-2.0
>
---------------------------------------------- > Unless required by applicable law or agreed to in writing, software
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) > 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.

View File

@ -1,4 +1,2 @@
librenms: librenms:
appkey: base64:RTMmh+i10E2RMcDxookMu47BTzJQy87hOU+k/zcuPnA= appkey: base64:RTMmh+i10E2RMcDxookMu47BTzJQy87hOU+k/zcuPnA=
ingress:
enabled: true

View File

@ -0,0 +1 @@
APP_KEY={{.Values.librenms.appkey}}

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
TARGET="/data/env-volume/env" TARGET="/data/env-volume/env"
echo "Target: $TARGET" echo "Target: $TARGET"
echo "APP_KEY=$(cat /data/key/appkey)" > $TARGET cp /data/files/env $TARGET
echo "NODE_ID=$(hostname)" >> $TARGET echo -e "\nNODE_ID=`hostname`" >> $TARGET
cat $TARGET cat $TARGET

View File

@ -1,77 +1,3 @@
{{- define "librenms.configChecksum" -}} {{- define "librenms.configChecksum" -}}
{{- include (print $.Template.BasePath "/librenms-configmap.yml") . | sha256sum -}} {{- include (print $.Template.BasePath "/librenms-configmap.yml") . | sha256sum -}}
{{- end -}}
{{/*
Expand the name of the chart.
*/}}
{{- define "librenms.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "librenms.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "librenms.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "librenms.labels" -}}
helm.sh/chart: {{ include "librenms.chart" . }}
{{ include "librenms.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "librenms.selectorLabels" -}}
app.kubernetes.io/name: {{ include "librenms.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "librenms.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "librenms.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Create the name of the secret to use
*/}}
{{- define "librenms.secretName" -}}
{{- if .Values.librenms.existingSecret -}}
{{- .Values.librenms.existingSecret -}}
{{- else -}}
{{- .Release.Name -}}
{{- end -}}
{{- end -}} {{- end -}}

View File

@ -1,62 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := .Release.Name -}}
{{- $svcPort := 8000 -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/instance: frontend
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -23,5 +23,7 @@ metadata:
data: data:
custom.php: |- custom.php: |-
{{ tpl (.Files.Get "files/custom.php") . | indent 4 }} {{ tpl (.Files.Get "files/custom.php") . | indent 4 }}
env: |-
{{ tpl (.Files.Get "files/env") . | indent 4 }}
init.sh: |- init.sh: |-
{{ .Files.Get "files/init.sh" | indent 4 }} {{ tpl (.Files.Get "files/init.sh") . | indent 4 }}

View File

@ -19,9 +19,6 @@ spec:
volumes: volumes:
- name: env-volume - name: env-volume
emptyDir: {} emptyDir: {}
- name: key
secret:
secretName: {{ include "librenms.secretName" . }}
- name: files - name: files
configMap: configMap:
name: {{ .Release.Name }}-files name: {{ .Release.Name }}-files
@ -36,8 +33,6 @@ spec:
volumeMounts: volumeMounts:
- name: env-volume - name: env-volume
mountPath: /data/env-volume mountPath: /data/env-volume
- name: key
mountPath: /data/key
- name: files - name: files
mountPath: /data/files mountPath: /data/files
containers: containers:
@ -60,7 +55,7 @@ spec:
- name: files - name: files
mountPath: /data/files mountPath: /data/files
- name: files - name: files
mountPath: /data/config/custom.php mountPath: /opt/librenms/custom.php
subPath: custom.php subPath: custom.php
readOnly: true readOnly: true
- name: mysql - name: mysql

View File

@ -20,9 +20,6 @@ spec:
volumes: volumes:
- name: env-volume - name: env-volume
emptyDir: {} emptyDir: {}
- name: key
secret:
secretName: {{ include "librenms.secretName" . }}
- name: files - name: files
configMap: configMap:
name: {{ .Release.Name }}-files name: {{ .Release.Name }}-files
@ -36,8 +33,6 @@ spec:
volumeMounts: volumeMounts:
- name: env-volume - name: env-volume
mountPath: /data/env-volume mountPath: /data/env-volume
- name: key
mountPath: /data/key
- name: files - name: files
mountPath: /data/files mountPath: /data/files
containers: containers:

View File

@ -1,10 +0,0 @@
{{- if not .Values.librenms.existingSecret }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}
type: Opaque
data:
appkey: {{ .Values.librenms.appkey | b64enc | quote }}
{{- end }}

View File

@ -3,120 +3,88 @@
# Declare variables to be passed into your templates. # Declare variables to be passed into your templates.
librenms: librenms:
image: image:
# -- repository is the image repository to pull from.
repository: librenms/librenms repository: librenms/librenms
# -- tag is image tag to pull. tag: 24.5.0
tag: 25.5.0
# -- Laravel appkey used by LibreNMS, this should be generated by you and is a # Laravel appkey used by LibreNMS, a default is set for useability it is
# required setting. See the README for more information # recommended to replace this with your own key
# THIS A REQUIRED SETTINGS
appkey: appkey:
# -- Existing secret name to use for appkey # Timezone used by librenms for communication with RRD cached
# Must have the key 'appkey' as above
existingSecret: false
# -- Timezone used by librenms for communication with RRD cached
timezone: UTC 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: # in this file check the following link:
# https://docs.librenms.org/Support/Configuration/ # https://docs.librenms.org/Support/Configuration/
configuration: | configuration: |-
$config['distributed_poller_group'] = '0'; $config['distributed_poller_group'] = '0';
$config['distributed_poller'] = true; $config['distributed_poller'] = true;
# Frontend container configurations options # Frontend container configurations options
frontend: frontend:
# -- Frontend replicas
replicas: 1 replicas: 1
readinessProbe: readinessProbe:
httpGet: httpGet:
# -- Check endpoint path
path: /login path: /login
# -- Check endpoint port
port: 8000 port: 8000
initialDelaySeconds: 30 initialDelaySeconds: 30
periodSeconds: 60 periodSeconds: 60
timeoutSeconds: 10 timeoutSeconds: 10
# -- resources defines the computing resources (CPU and memory)
# that are allocated to the containers running within the Pod.
resources: {} 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: # requests:
# cpu: 50m # cpu: 50m
# memory: 150M # memory: 150M
# Distributed poller container configurations options # Distributed poller container configurations options
poller: poller:
# -- Poller replicas
replicas: 2 replicas: 2
# -- resources defines the computing resources (CPU and memory)
# that are allocated to the containers running within the Pod.
resources: {} resources: {}
# requests: # requests:
# cpu: 500m # cpu: 500m
# memory: 200M # 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 # when having snmp network discovery enabled. For this to work either set the
# 'nets' confifuration in the custom config on in the admin interface # '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/ # https://docs.librenms.org/Extensions/Auto-Discovery/
snmp_scanner: snmp_scanner:
# -- SNMP scanner enabled
enabled: false enabled: false
# -- SNMP scanner cornjob syntac interval
cron: 15 * * * * cron: 15 * * * *
# -- resources defines the computing resources (CPU and memory)
# that are allocated to the containers running within the Pod.
resources: {} resources: {}
# requests: # requests:
# cpu: 500m # cpu: 500m
# memory: 200M # memory: 200M
# Extra environment variable for LibreNMS SNMP scanner container # Extra environment variable for LibreNMS SNMP scanner container
# -- SNMP scanner extra envs
extraEnvs: {} extraEnvs: {}
# Extra environment variable for LibreNMS container # Extra environment variable for LibreNMS container
# -- LibreNMS frontend extra envs
extraEnvs: {} 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 # in this LibreNMS helm chart. See the rrdcached documentation for more
# information: https://oss.oetiker.ch/rrdtool/doc/rrdcached.en.html # information: https://oss.oetiker.ch/rrdtool/doc/rrdcached.en.html
rrdcached: rrdcached:
image: image:
# -- repository is the image repository to pull from.
repository: crazymax/rrdcached repository: crazymax/rrdcached
# -- tag is image tag to pull.
tag: 1.8.0 tag: 1.8.0
persistence: persistence:
# -- RRDCached persistent volume enabled
enabled: true enabled: true
journal: journal:
# -- RRDCached journal PV size
size: 1Gi size: 1Gi
rrdcached: rrdcached:
# -- RRDCached RRD storage PV size
size: 10Gi size: 10Gi
# -- resources defines the computing resources (CPU and memory)
# that are allocated to the containers running within the Pod.
resources: {} resources: {}
# requests: # requests:
# cpu: 100m # cpu: 100m
# memory: 500M # memory: 500M
livenessProbe: livenessProbe:
# -- RRD cached liveness probe
tcpSocket: tcpSocket:
port: 42217 port: 42217
initialDelaySeconds: 15 initialDelaySeconds: 15
periodSeconds: 20 periodSeconds: 20
envs: envs:
# -- env variables RRD Cached
- name: TZ - name: TZ
value: "Europe/Amsterdam" value: "Europe/Amsterdam"
- name: WRITE_JITTER - name: WRITE_JITTER
@ -124,31 +92,10 @@ librenms:
- name: WRITE_TIMEOUT - name: WRITE_TIMEOUT
value: '1800' value: '1800'
# -- Extra environment variable for RRDCACHED container # Extra environment variable for RRDCACHED container
extraEnvs: {} extraEnvs: {}
# -- LibreNMS ingress configuration # Configuration for MySQL dependency chart by Bitnami. See their chart for
ingress:
# -- Enable or disable ingress
enabled: false
# -- Ingress class name
className: ""
# -- Ingress annotations
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# -- Ingress ingress rules
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
# -- Configuration for MySQL dependency chart by Bitnami. See their chart for
# more information: https://github.com/bitnami/charts/tree/master/bitnami/mysql # more information: https://github.com/bitnami/charts/tree/master/bitnami/mysql
mysql: mysql:
enabled: true enabled: true
@ -156,7 +103,7 @@ mysql:
username: librenms username: librenms
database: 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 # more information: https://github.com/bitnami/charts/tree/master/bitnami/redis
redis: redis:
enabled: true enabled: true

View File

@ -1,9 +0,0 @@
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