diff --git a/charts/neolink/.helmignore b/charts/neolink/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/neolink/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/neolink/Chart.yaml b/charts/neolink/Chart.yaml new file mode 100644 index 00000000..791cc9d8 --- /dev/null +++ b/charts/neolink/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +appVersion: 0.3.0 +description: Neolink - RTSP bridge to Reolink IP cameras +name: neolink +version: 1.0.0 +keywords: + - reolink + - rtsp +home: https://github.com/k8s-at-home/charts/tree/master/charts/neolink +sources: + - https://github.com/thirtythreeforty/neolink +maintainers: + - name: mr-onion-2 +dependencies: + - name: common + repository: https://k8s-at-home.com/charts/ + version: 2.1.1 diff --git a/charts/neolink/README.md b/charts/neolink/README.md new file mode 100644 index 00000000..e46001f4 --- /dev/null +++ b/charts/neolink/README.md @@ -0,0 +1,46 @@ +# Neolink + +This is a helm chart for [Neolink](https://github.com/thirtythreeforty/neolink). + +**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose).** + +## TL;DR; + +```shell +$ helm repo add k8s-at-home https://k8s-at-home.com/charts/ +$ helm install k8s-at-home/neolink +``` + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +helm install my-release k8s-at-home/neolink +``` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +helm delete my-release --purge +``` +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration +The chart's [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/neolink/values.yaml) file contains a set of suggested values for a minimal deployment. Further configuration options are found in the [common library](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml). + +The configuration for the application itself is set as a configmap and mounted in the container as /etc/neolink.toml. Refer to the sample config [here.](https://github.com/thirtythreeforty/neolink/blob/master/sample_config.toml) + + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, +```console +helm install neolink \ + --set env.TZ="America/New_York" \ + k8s-at-home/neolink +``` +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example, +```console +helm install neolink k8s-at-home/neolink --values values.yaml +``` \ No newline at end of file diff --git a/charts/neolink/templates/NOTES.txt b/charts/neolink/templates/NOTES.txt new file mode 100644 index 00000000..a4b771eb --- /dev/null +++ b/charts/neolink/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "common.notes.defaultNotes" . -}} \ No newline at end of file diff --git a/charts/neolink/templates/common.yaml b/charts/neolink/templates/common.yaml new file mode 100644 index 00000000..b5a69205 --- /dev/null +++ b/charts/neolink/templates/common.yaml @@ -0,0 +1,31 @@ +{{/* Make sure all variables are set properly */}} +{{- include "common.values.setup" . }} + +{{/* Append the configMap to the additionalVolumes */}} +{{- define "neolink.configmap.volume" -}} +name: neolink-settings +configMap: + name: {{ template "common.names.fullname" . }}-settings +{{- end -}} + +{{- $volume := include "neolink.configmap.volume" . | fromYaml -}} +{{- if $volume -}} + {{- $additionalVolumes := append .Values.additionalVolumes $volume }} + {{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}} +{{- end -}} + +{{/* Append the configMap volume to the additionalVolumeMounts */}} +{{- define "neolink.configmap.volumeMount" -}} +name: neolink-settings +mountPath: /etc/neolink.toml +subPath: neolink.toml +{{- end -}} + +{{- $volumeMount := include "neolink.configmap.volumeMount" . | fromYaml -}} +{{- if $volumeMount -}} + {{- $additionalVolumeMounts := append .Values.additionalVolumeMounts $volumeMount }} + {{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}} +{{- end -}} + +{{/* Render the templates */}} +{{ include "common.all" . }} diff --git a/charts/neolink/templates/configmap.yaml b/charts/neolink/templates/configmap.yaml new file mode 100644 index 00000000..ea5417d1 --- /dev/null +++ b/charts/neolink/templates/configmap.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "common.names.fullname" . }}-settings + labels: + {{- include "common.labels" . | nindent 4 }} +data: + neolink.toml: +{{- with .Values.config }} + {{- toYaml . | nindent 4 }} +{{- end }} diff --git a/charts/neolink/values.yaml b/charts/neolink/values.yaml new file mode 100644 index 00000000..81f5be77 --- /dev/null +++ b/charts/neolink/values.yaml @@ -0,0 +1,23 @@ +# Default values for Neolink. + +image: + repository: thirtythreeforty/neolink + pullPolicy: IfNotPresent + tag: latest + +strategy: + type: Recreate + +service: + port: + port: 8554 + +# Neolink configuration settings +# https://github.com/thirtythreeforty/neolink/blob/master/sample_config.toml +config: | + bind = "0.0.0.0" + [[cameras]] + name = "driveway" + username = "admin" + password = "12345678" + address = "192.168.1.187:9000"