From 365626339a2b60bc559e43a498552185622e3148 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 7 May 2020 19:55:03 +0100 Subject: [PATCH 1/7] Update documentation --- README.md | 32 ++++++++++++++++++++++++++++++++ charts/calibre-web/README.md | 7 ++++--- charts/deluge/README.md | 7 ++++--- 3 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c2c7394 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# Helm Charts + +A small set of custom Helm charts to cover some smaller applications not covered by Stable and other repos. + +[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) +[![](https://github.com/nikdoof/helm-charts/workflows/Release%20Charts/badge.svg?branch=master)](https://github.com/nikdoof/helm-charts/actions) + +## Usage + +[Helm](https://helm.sh) must be installed to use the charts. +Please refer to Helm's [documentation](https://helm.sh/docs/) to get started. + +Once Helm is set up properly, add the repo as follows: + +```console +helm repo add nikdoof https://nikdoof.github.io/helm-charts/ +``` + +You can then run `helm search nikdoof` to see the charts. + +## Charts + +See [charts folder](./charts) for a complete list. + +* [aaisp-to-mqtt](./charts/aaisp-to-mqtt) - A tool to pull information from [Andrews & Arnold](https://www.aa.net.uk/) CHAOSv2 API and output to MQTT +* [calibre-web](./charts/calibre-web) - Web app for browsing, reading and downloading eBooks stored in a Calibre database +* [deluge](./charts/deluge) - Deluge torrent client + + +## License + +[MIT License](./LICENSE) \ No newline at end of file diff --git a/charts/calibre-web/README.md b/charts/calibre-web/README.md index f51660d..9aecb12 100644 --- a/charts/calibre-web/README.md +++ b/charts/calibre-web/README.md @@ -5,7 +5,8 @@ This is a helm chart for [calibre-web](https://calibre-web.com/) leveraging the ## TL;DR; ```shell -$ helm install ./calibre-web +$ helm repo add nikdoof https://nikdoof.github.io/helm-charts/ +$ helm install calibre-web ``` ## Installing the Chart @@ -13,7 +14,7 @@ $ helm install ./calibre-web To install the chart with the release name `my-release`: ```console -helm install --name my-release ./calibre-web +helm install --name my-release calibre-web ``` ## Uninstalling the Chart @@ -101,4 +102,4 @@ If you get `Error: rendered manifests contain a resource that already exists. Un --- -Read through the [values.yaml](https://github.com/nikdoof/home-k8s-flux/blob/master/charts/calibre-web/values.yaml) file. It has several commented out suggested values. +Read through the [values.yaml](https://github.com/nikdoof/helm-charts/tree/master/charts/calibre-web/values.yaml) file. It has several commented out suggested values. diff --git a/charts/deluge/README.md b/charts/deluge/README.md index 1714501..194b8f8 100644 --- a/charts/deluge/README.md +++ b/charts/deluge/README.md @@ -5,7 +5,8 @@ This is a helm chart for [deluge](https://deluge.com/) leveraging the [Linuxserv ## TL;DR; ```shell -$ helm install ./deluge +$ helm repo add nikdoof https://nikdoof.github.io/helm-charts/ +$ helm install deluge ``` ## Installing the Chart @@ -13,7 +14,7 @@ $ helm install ./deluge To install the chart with the release name `my-release`: ```console -helm install --name my-release ./deluge +helm install --name my-release deluge ``` ## Uninstalling the Chart @@ -105,4 +106,4 @@ If you get `Error: rendered manifests contain a resource that already exists. Un --- -Read through the [values.yaml](https://github.com/nikdoof/home-k8s-flux/blob/master/charts/deluge/values.yaml) file. It has several commented out suggested values. +Read through the [values.yaml](https://github.com/nikdoof/helm-charts/tree/master/charts/deluge/values.yaml) file. It has several commented out suggested values. From 338beeead82f4934fedf21c5e1d6c0de24cbf8cf Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 7 May 2020 20:46:16 +0100 Subject: [PATCH 2/7] Add chart testing --- charts/aaisp-to-mqtt/Chart.yaml | 2 +- charts/aaisp-to-mqtt/ci/existingsecret-values.yaml | 4 ++++ charts/aaisp-to-mqtt/ci/test-values.yaml | 6 ++++++ charts/deluge/ci/test-values.yaml | 1 + charts/vsphere-influxdb-go/Chart.yaml | 2 +- charts/vsphere-influxdb-go/ci/test-values.yaml | 7 +++++++ ct.yaml | 2 ++ 7 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 charts/aaisp-to-mqtt/ci/existingsecret-values.yaml create mode 100644 charts/aaisp-to-mqtt/ci/test-values.yaml create mode 100644 charts/deluge/ci/test-values.yaml create mode 100644 charts/vsphere-influxdb-go/ci/test-values.yaml create mode 100644 ct.yaml diff --git a/charts/aaisp-to-mqtt/Chart.yaml b/charts/aaisp-to-mqtt/Chart.yaml index f3d4ef5..cbfc1cd 100644 --- a/charts/aaisp-to-mqtt/Chart.yaml +++ b/charts/aaisp-to-mqtt/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "0.2" description: Pulls data from the AAISP CHAOSv2 API into MQTT name: aaisp-to-mqtt -version: 0.2.4 +version: 0.2.5 diff --git a/charts/aaisp-to-mqtt/ci/existingsecret-values.yaml b/charts/aaisp-to-mqtt/ci/existingsecret-values.yaml new file mode 100644 index 0000000..09bbda0 --- /dev/null +++ b/charts/aaisp-to-mqtt/ci/existingsecret-values.yaml @@ -0,0 +1,4 @@ +mqtt: + broker: localhost + +existingSecretName: aaisp-to-mqtt-secret \ No newline at end of file diff --git a/charts/aaisp-to-mqtt/ci/test-values.yaml b/charts/aaisp-to-mqtt/ci/test-values.yaml new file mode 100644 index 0000000..2268454 --- /dev/null +++ b/charts/aaisp-to-mqtt/ci/test-values.yaml @@ -0,0 +1,6 @@ +aaisp: + username: test1@a + password: TesttestTest + +mqtt: + broker: localhost \ No newline at end of file diff --git a/charts/deluge/ci/test-values.yaml b/charts/deluge/ci/test-values.yaml new file mode 100644 index 0000000..73b314f --- /dev/null +++ b/charts/deluge/ci/test-values.yaml @@ -0,0 +1 @@ +--- \ No newline at end of file diff --git a/charts/vsphere-influxdb-go/Chart.yaml b/charts/vsphere-influxdb-go/Chart.yaml index 19e445b..8b8fded 100644 --- a/charts/vsphere-influxdb-go/Chart.yaml +++ b/charts/vsphere-influxdb-go/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "0.8.5" description: Collect VMware vCenter and ESXi performance metrics and send them to InfluxDB name: vsphere-influxdb-go -version: 0.1.0 +version: 0.1.1 diff --git a/charts/vsphere-influxdb-go/ci/test-values.yaml b/charts/vsphere-influxdb-go/ci/test-values.yaml new file mode 100644 index 0000000..5e22ced --- /dev/null +++ b/charts/vsphere-influxdb-go/ci/test-values.yaml @@ -0,0 +1,7 @@ +vsphere: + hostname: vcenter + username: test + password: test + +influxdb: + hostname: test \ No newline at end of file diff --git a/ct.yaml b/ct.yaml new file mode 100644 index 0000000..68e4572 --- /dev/null +++ b/ct.yaml @@ -0,0 +1,2 @@ +chart-dirs: + - charts From c1461dd0835f15666d6e216e1b256460b196ee1f Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 7 May 2020 21:02:53 +0100 Subject: [PATCH 3/7] Update Chart.yaml files --- charts/aaisp-to-mqtt/Chart.yaml | 10 ++++++++++ charts/calibre-web/Chart.yaml | 3 +-- charts/deluge/Chart.yaml | 3 +-- charts/vsphere-influxdb-go/Chart.yaml | 11 +++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/charts/aaisp-to-mqtt/Chart.yaml b/charts/aaisp-to-mqtt/Chart.yaml index cbfc1cd..d6fd678 100644 --- a/charts/aaisp-to-mqtt/Chart.yaml +++ b/charts/aaisp-to-mqtt/Chart.yaml @@ -3,3 +3,13 @@ appVersion: "0.2" description: Pulls data from the AAISP CHAOSv2 API into MQTT name: aaisp-to-mqtt version: 0.2.5 +keywords: + - aaisp + - mqtt +home: https://github.com/nikdoof/aaisp-to-mqtt +sources: + - https://hub.docker.com/r/nikdoof/aaisp-to-mqtt/ + - https://github.com/natm/aaisp-to-mqtt +maintainers: + - name: nikdoof + email: andy@tensixtyone.com \ No newline at end of file diff --git a/charts/calibre-web/Chart.yaml b/charts/calibre-web/Chart.yaml index 4336d3c..2a694a7 100644 --- a/charts/calibre-web/Chart.yaml +++ b/charts/calibre-web/Chart.yaml @@ -6,11 +6,10 @@ version: 1.1.2 keywords: - calibre-web - calibre -home: https://github.com/nikdoof/home-k8s-flux/tree/master/charts/calibre-web +home: https://github.com/janeczku/calibre-web icon: https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/calibre-web-icon.png sources: - https://hub.docker.com/r/linuxserver/calibre-web/ - - https://github.com/janeczku/calibre-web maintainers: - name: nikdoof email: andy@tensixtyone.com diff --git a/charts/deluge/Chart.yaml b/charts/deluge/Chart.yaml index 8ff3a3c..e4589f4 100644 --- a/charts/deluge/Chart.yaml +++ b/charts/deluge/Chart.yaml @@ -5,10 +5,9 @@ version: 1.1.1 keywords: - deluge - libtorrent -home: https://github.com/nikdoof/helm-charts/charts/deluge +home: https://github.com/deluge-torrent/deluge sources: - https://hub.docker.com/r/linuxserver/deluge/ - - https://github.com/janeczku/deluge dependencies: [] maintainers: - name: nikdoof diff --git a/charts/vsphere-influxdb-go/Chart.yaml b/charts/vsphere-influxdb-go/Chart.yaml index 8b8fded..b4739d4 100644 --- a/charts/vsphere-influxdb-go/Chart.yaml +++ b/charts/vsphere-influxdb-go/Chart.yaml @@ -3,3 +3,14 @@ appVersion: "0.8.5" description: Collect VMware vCenter and ESXi performance metrics and send them to InfluxDB name: vsphere-influxdb-go version: 0.1.1 +keywords: + - vsphere + - influxdb + - esx +home: https://github.com/Oxalide/vsphere-influxdb-go +sources: + - https://hub.docker.com/r/nikdoof/vsphere-influxdb-go/ + - https://github.com/janeczku/calibre-web +maintainers: + - name: nikdoof + email: andy@tensixtyone.com From 10a68e25b9d7f2f5061437fe9d8eb427f3171221 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 7 May 2020 21:04:29 +0100 Subject: [PATCH 4/7] Add missing newlines --- charts/aaisp-to-mqtt/Chart.yaml | 2 +- charts/calibre-web/Chart.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/aaisp-to-mqtt/Chart.yaml b/charts/aaisp-to-mqtt/Chart.yaml index d6fd678..e4bb628 100644 --- a/charts/aaisp-to-mqtt/Chart.yaml +++ b/charts/aaisp-to-mqtt/Chart.yaml @@ -12,4 +12,4 @@ sources: - https://github.com/natm/aaisp-to-mqtt maintainers: - name: nikdoof - email: andy@tensixtyone.com \ No newline at end of file + email: andy@tensixtyone.com diff --git a/charts/calibre-web/Chart.yaml b/charts/calibre-web/Chart.yaml index 2a694a7..825d354 100644 --- a/charts/calibre-web/Chart.yaml +++ b/charts/calibre-web/Chart.yaml @@ -13,3 +13,4 @@ sources: maintainers: - name: nikdoof email: andy@tensixtyone.com + From 4f8a41ab168039cda3b2138d818dca2b2c15768d Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 7 May 2020 21:17:52 +0100 Subject: [PATCH 5/7] Fix all lint issues --- charts/aaisp-to-mqtt/ci/existingsecret-values.yaml | 2 +- charts/aaisp-to-mqtt/ci/test-values.yaml | 2 +- charts/calibre-web/Chart.yaml | 1 - charts/deluge/ci/test-values.yaml | 2 +- charts/vsphere-influxdb-go/ci/test-values.yaml | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/charts/aaisp-to-mqtt/ci/existingsecret-values.yaml b/charts/aaisp-to-mqtt/ci/existingsecret-values.yaml index 09bbda0..6a84cd3 100644 --- a/charts/aaisp-to-mqtt/ci/existingsecret-values.yaml +++ b/charts/aaisp-to-mqtt/ci/existingsecret-values.yaml @@ -1,4 +1,4 @@ mqtt: broker: localhost -existingSecretName: aaisp-to-mqtt-secret \ No newline at end of file +existingSecretName: aaisp-to-mqtt-secret diff --git a/charts/aaisp-to-mqtt/ci/test-values.yaml b/charts/aaisp-to-mqtt/ci/test-values.yaml index 2268454..3289abd 100644 --- a/charts/aaisp-to-mqtt/ci/test-values.yaml +++ b/charts/aaisp-to-mqtt/ci/test-values.yaml @@ -3,4 +3,4 @@ aaisp: password: TesttestTest mqtt: - broker: localhost \ No newline at end of file + broker: localhost diff --git a/charts/calibre-web/Chart.yaml b/charts/calibre-web/Chart.yaml index 825d354..2a694a7 100644 --- a/charts/calibre-web/Chart.yaml +++ b/charts/calibre-web/Chart.yaml @@ -13,4 +13,3 @@ sources: maintainers: - name: nikdoof email: andy@tensixtyone.com - diff --git a/charts/deluge/ci/test-values.yaml b/charts/deluge/ci/test-values.yaml index 73b314f..ed97d53 100644 --- a/charts/deluge/ci/test-values.yaml +++ b/charts/deluge/ci/test-values.yaml @@ -1 +1 @@ ---- \ No newline at end of file +--- diff --git a/charts/vsphere-influxdb-go/ci/test-values.yaml b/charts/vsphere-influxdb-go/ci/test-values.yaml index 5e22ced..ad698b3 100644 --- a/charts/vsphere-influxdb-go/ci/test-values.yaml +++ b/charts/vsphere-influxdb-go/ci/test-values.yaml @@ -4,4 +4,4 @@ vsphere: password: test influxdb: - hostname: test \ No newline at end of file + hostname: test From 4dc7b0f9f222ede63a81c0dfc169d35f0c0e0500 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 7 May 2020 21:20:04 +0100 Subject: [PATCH 6/7] Bump versions --- charts/calibre-web/Chart.yaml | 2 +- charts/deluge/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/calibre-web/Chart.yaml b/charts/calibre-web/Chart.yaml index 2a694a7..37f0f9f 100644 --- a/charts/calibre-web/Chart.yaml +++ b/charts/calibre-web/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 0.6.6-ls58 description: A simple web viewer for Calibre libraries name: calibre-web -version: 1.1.2 +version: 1.1.3 keywords: - calibre-web - calibre diff --git a/charts/deluge/Chart.yaml b/charts/deluge/Chart.yaml index e4589f4..5a9b276 100644 --- a/charts/deluge/Chart.yaml +++ b/charts/deluge/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Deluge is a Python BitTorrent client based on libtorrent name: deluge -version: 1.1.1 +version: 1.1.2 keywords: - deluge - libtorrent From 0da018df2f0f0c1859f446321eb9eb056c7185bf Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 7 May 2020 21:47:48 +0100 Subject: [PATCH 7/7] Deluge fixes for #3 --- charts/deluge/Chart.yaml | 2 +- charts/deluge/templates/bttcp-service.yaml | 13 ++--- charts/deluge/templates/btudp-service.yaml | 6 ++- charts/deluge/templates/daemon-service.yaml | 53 +++++++++++++++++++++ charts/deluge/values.yaml | 32 ++++++++++++- 5 files changed, 92 insertions(+), 14 deletions(-) create mode 100644 charts/deluge/templates/daemon-service.yaml diff --git a/charts/deluge/Chart.yaml b/charts/deluge/Chart.yaml index 5a9b276..5d22964 100644 --- a/charts/deluge/Chart.yaml +++ b/charts/deluge/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Deluge is a Python BitTorrent client based on libtorrent name: deluge -version: 1.1.2 +version: 1.2.0 keywords: - deluge - libtorrent diff --git a/charts/deluge/templates/bttcp-service.yaml b/charts/deluge/templates/bttcp-service.yaml index 236349e..11860cc 100644 --- a/charts/deluge/templates/bttcp-service.yaml +++ b/charts/deluge/templates/bttcp-service.yaml @@ -1,3 +1,5 @@ +--- +{{ if .Values.btservice.enabled }} apiVersion: v1 kind: Service metadata: @@ -40,21 +42,14 @@ spec: externalTrafficPolicy: {{ .Values.btservice.externalTrafficPolicy }} {{- end }} ports: - - name: daemon - port: 58846 - protocol: TCP - targetPort: daemon -{{ if (eq .Values.btservice.type "NodePort") }} - nodePort: 58846 -{{ end }} - name: bt-tcp port: 58946 protocol: TCP targetPort: bt-tcp {{ if (eq .Values.btservice.type "NodePort") }} - nodePort: 58946 + nodePort: {{ default 30846 .Values.btservice.nodePort }} {{ end }} selector: app.kubernetes.io/name: {{ include "deluge.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} - \ No newline at end of file +{{ end }} diff --git a/charts/deluge/templates/btudp-service.yaml b/charts/deluge/templates/btudp-service.yaml index 9dc7f43..d3df898 100644 --- a/charts/deluge/templates/btudp-service.yaml +++ b/charts/deluge/templates/btudp-service.yaml @@ -1,3 +1,5 @@ +--- +{{ if .Values.btservice.enabled }} apiVersion: v1 kind: Service metadata: @@ -45,9 +47,9 @@ spec: protocol: UDP targetPort: bt-udp {{ if (eq .Values.btservice.type "NodePort") }} - nodePort: 58946 + nodePort: {{ default 30846 .Values.btservice.nodePort }} {{ end }} selector: app.kubernetes.io/name: {{ include "deluge.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} - \ No newline at end of file +{{ end }} diff --git a/charts/deluge/templates/daemon-service.yaml b/charts/deluge/templates/daemon-service.yaml new file mode 100644 index 0000000..bc9a409 --- /dev/null +++ b/charts/deluge/templates/daemon-service.yaml @@ -0,0 +1,53 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "deluge.fullname" . }}-daemon + labels: + app.kubernetes.io/name: {{ include "deluge.name" . }} + helm.sh/chart: {{ include "deluge.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- if .Values.daemonservice.labels }} +{{ toYaml .Values.daemonservice.labels | indent 4 }} +{{- end }} +{{- with .Values.daemonservice.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: +{{- if (or (eq .Values.daemonservice.type "ClusterIP") (empty .Values.daemonservice.type)) }} + type: ClusterIP + {{- if .Values.daemonservice.clusterIP }} + clusterIP: {{ .Values.daemonservice.clusterIP }} + {{end}} +{{- else if eq .Values.daemonservice.type "LoadBalancer" }} + type: {{ .Values.daemonservice.type }} + {{- if .Values.daemonservice.loadBalancerIP }} + loadBalancerIP: {{ .Values.daemonservice.loadBalancerIP }} + {{- end }} + {{- if .Values.daemonservice.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.daemonservice.loadBalancerSourceRanges | indent 4 }} + {{- end -}} +{{- else }} + type: {{ .Values.daemonservice.type }} +{{- end }} +{{- if .Values.daemonservice.externalIPs }} + externalIPs: +{{ toYaml .Values.daemonservice.externalIPs | indent 4 }} +{{- end }} + {{- if .Values.daemonservice.externalTrafficPolicy }} + externalTrafficPolicy: {{ .Values.daemonservice.externalTrafficPolicy }} + {{- end }} + ports: + - name: daemon + port: 58846 + protocol: TCP + targetPort: daemon +{{ if (eq .Values.daemonservice.type "NodePort") }} + nodePort: {{ default 30846 .Values.daemonservice.nodePort }} +{{ end }} + selector: + app.kubernetes.io/name: {{ include "deluge.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + \ No newline at end of file diff --git a/charts/deluge/values.yaml b/charts/deluge/values.yaml index 812c124..0070d70 100644 --- a/charts/deluge/values.yaml +++ b/charts/deluge/values.yaml @@ -32,6 +32,7 @@ pgid: 1001 ## # dockerMods: linuxserver/deluge:ssh +## Service for the WebUI port webuiservice: type: ClusterIP port: 8112 @@ -53,8 +54,10 @@ webuiservice: ## Set the externalTrafficPolicy in the Service to either Cluster or Local # externalTrafficPolicy: Cluster -btservice: - type: NodePort +## Service for the Daemon port +daemonservice: + type: ClusterIP + port: ## Specify the nodePort value for the LoadBalancer and NodePort service types. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport ## @@ -73,6 +76,31 @@ btservice: ## Set the externalTrafficPolicy in the Service to either Cluster or Local # externalTrafficPolicy: Cluster +## Service for the BT taffic port - ideally these should be a LB due to a high port +## and also sharing TCP and UDP services on the same port. +btservice: + enabled: false + type: LoadBalancer + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + ## Provide any additional annotations which may be required. This can be used to + ## set the LoadBalancer service type to internal only. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer + ## + annotations: {} + # annotations: + # metallb.universe.tf/allow-shared-ip: deluge + labels: {} + ## Use loadBalancerIP to request a specific static IP, + ## otherwise leave blank + ## + loadBalancerIP: + # loadBalancerSourceRanges: [] + ## Set the externalTrafficPolicy in the Service to either Cluster or Local + # externalTrafficPolicy: Cluster + ingress: enabled: false annotations: {}