Compare commits

...

13 Commits

Author SHA1 Message Date
Jeff Billimek
ee59e9ada2 set realistic resource defaults for valheim (#728)
Signed-off-by: Jeff Billimek <jeff@billimek.com>
2021-03-26 13:46:22 -04:00
Jeff Billimek
00d17bb5cc bump teslamate default image to 1.22.0 (#727)
Signed-off-by: Jeff Billimek <jeff@billimek.com>
2021-03-26 13:44:27 -04:00
ᗪєνιη ᗷυнʟ
2c9806a2fd [digitalocean-dyndns/ddclient] deprecate charts (#725) 2021-03-26 14:41:45 +01:00
Fabio Brito d'Araujo e Oliveira
dde260bef5 [home-assistant] upgrade image tag to 2021.3.4 (#724)
Signed-off-by: Fabio Brito d'Araujo e Oliveira <psychopenguin@gmail.com>
2021-03-26 05:31:24 -04:00
ᗪєνιη ᗷυнʟ
91aef6139f [ser2sock] migrate to common library (#719)
* migrate ser2sock to common
2021-03-26 08:12:08 +01:00
ᗪєνιη ᗷυнʟ
01983ee081 docs: fix contributors 2021-03-25 20:39:56 -04:00
allcontributors[bot]
09c6416bff docs: add onedr0p as a contributor (#723)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-25 20:37:09 -04:00
allcontributors[bot]
6683b9b293 docs: add Diaoul as a contributor (#722)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-25 20:35:54 -04:00
ᗪєνιη ᗷυнʟ
91c8466022 [prometheus-nut-exporter] migrate to common (#721)
* prometheus-nut-exporter common

* remove useless with
2021-03-25 20:22:00 -04:00
ᗪєνιη ᗷυнʟ
d8f9e8ce85 [rtorrent-flood] migrate to AIO image and common chart (#717)
* fix: rtorrent-flood

* fix: rtorrent-flood

* fix: newline

* fix: use latest
2021-03-25 18:25:39 -04:00
Zakaria ANBARI
8ec4a9ab93 [adguard-home] fix volumes subpath (#714) 2021-03-25 11:52:01 +01:00
ᗪєνιη ᗷυнʟ
12df5053ab [blocky] migrate to common (#701)
* migrate to common

* comment out additional services and podAnnotations

* requested changes

* requested changes

* Update Chart.yaml

Co-authored-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
2021-03-24 12:50:11 -04:00
Matt Gerega
3a78db20ad [unifi] Updated AppVersion to 6.0.45 (#705)
* Updated AppVersion to 6.0.45
Modified the Ingress definitions to use the latest Ingress spec (networking.k8s.io/v1) for clusters 1.18+ and the beta spec (networking.k8s.io/v1beta1) 1.14+.  Otherwise, continue using extensions/v1beta1

* Moved Labels and Selector Labels to _helpers (in following latest helm guidelines) and fixed ingress templates

* Modified logic in the ingress templates to reduce some of the nesting

Co-authored-by: ᗪєνιη ᗷυнʟ <onedr0p@users.noreply.github.com>
2021-03-24 08:38:32 +01:00
83 changed files with 852 additions and 1731 deletions

View File

@@ -85,6 +85,24 @@
"contributions": [
"code"
]
},
{
"login": "Diaoul",
"name": "Antoine Bertin",
"avatar_url": "https://avatars.githubusercontent.com/u/319220?v=4",
"profile": "https://github.com/Diaoul",
"contributions": [
"code"
]
},
{
"login": "onedr0p",
"name": "ᗪєνιη ᗷυнʟ",
"avatar_url": "https://avatars.githubusercontent.com/u/213795?v=4",
"profile": "https://github.com/onedr0p",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,

View File

@@ -167,7 +167,12 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check lint matrix status
if: ${{ needs.lint.result != 'success' }}
if: |
!contains(github.event.head_commit.message, '[ci-skip]')
&&
needs.changes-lint.outputs.detected == 'true'
&&
needs.lint.result != 'success'
run: exit 1
unittest:
@@ -255,5 +260,10 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check install matrix status
if: ${{ needs.install.result != 'success' }}
if: |
!contains(github.event.head_commit.message, '[ci-skip]')
&&
needs.changes-install.outputs.detected == 'true'
&&
needs.install.result != 'success'
run: exit 1

View File

@@ -1,6 +1,6 @@
# Helm charts
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-11-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![docs](https://img.shields.io/badge/docs-rtfm-yellow?logo=gitbook&logoColor=white&style=for-the-badge)](https://docs.k8s-at-home.com/)
@@ -47,10 +47,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/devfaz"><img src="https://avatars.githubusercontent.com/u/4060372?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Fabian Zimmermann</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=devfaz" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/bjw-s"><img src="https://avatars.githubusercontent.com/u/6213398?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bᴇʀɴᴅ Sʜʀɢᴇʀs</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=bjw-s" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/onedr0p"><img src="https://avatars.githubusercontent.com/u/213795?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ᗪєνιη ᗷυнʟ</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=onedr0p" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/angelnu"><img src="https://avatars.githubusercontent.com/u/4406403?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vegetto</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=angelnu" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/trly"><img src="https://avatars.githubusercontent.com/u/212733?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Travis Lyons</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=trly" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/bjw-s"><img src="https://avatars.githubusercontent.com/u/6213398?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bᴇʀɴᴅ Sʜʀɢᴇʀs</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=bjw-s" title="Code">💻</a></td>
<td align="center"><a href="http://schouten-lebbing.nl"><img src="https://avatars.githubusercontent.com/u/7613738?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kjeld Schouten-Lebbing</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=Ornias1993" title="Code">💻</a></td>
<td align="center"><a href="https://www.meetup.com/nl-NL/I-I-Inspiratie-Innovatie/"><img src="https://avatars.githubusercontent.com/u/30292281?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rolf Berkenbosch</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=rolfberkenbosch" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/auricom"><img src="https://avatars.githubusercontent.com/u/27022259?v=4?s=100" width="100px;" alt=""/><br /><sub><b>auricom</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=auricom" title="Code">💻</a></td>
@@ -58,6 +58,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<tr>
<td align="center"><a href="http://aaronjohnson.io"><img src="https://avatars.githubusercontent.com/u/1386238?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aaron Johnson</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=acjohnson" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/brujoand"><img src="https://avatars.githubusercontent.com/u/124421?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anders Brujordet</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=brujoand" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Diaoul"><img src="https://avatars.githubusercontent.com/u/319220?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Antoine Bertin</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=Diaoul" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/devfaz"><img src="https://avatars.githubusercontent.com/u/4060372?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Fabian Zimmermann</b></sub></a><br /><a href="https://github.com/k8s-at-home/charts/commits?author=devfaz" title="Code">💻</a></td>
</tr>
</table>

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v0.102.0
description: DNS proxy as ad-blocker for local network
name: adguard-home
version: 2.2.2
version: 2.2.3
keywords:
- adguard-home
- adguard

View File

@@ -59,9 +59,15 @@ spec:
volumeMounts:
- name: work
mountPath: /opt/adguardhome/work
{{- with .Values.persistence.work.subPath }}
subPath: {{ . }}
{{- end }}
readOnly: false
- name: config
mountPath: /opt/adguardhome/conf
{{- with .Values.persistence.config.subPath }}
subPath: {{ . }}
{{- end }}
readOnly: false
{{- end }}
{{- end }}
@@ -79,9 +85,15 @@ spec:
volumeMounts:
- name: work
mountPath: /opt/adguardhome/work
{{- with .Values.persistence.work.subPath }}
subPath: {{ . }}
{{- end }}
readOnly: false
- name: config
mountPath: /opt/adguardhome/conf
{{- with .Values.persistence.config.subPath }}
subPath: {{ . }}
{{- end }}
readOnly: false
{{- if .Values.tlsSecretName }}
- name: certs

View File

@@ -22,3 +22,5 @@
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl

View File

@@ -1,16 +1,21 @@
apiVersion: v2
appVersion: v0.12
appVersion: v0.13
description: DNS proxy as ad-blocker for local network
name: blocky
version: 5.0.2
version: 6.0.0
kubeVersion: ">=1.16.0-0"
keywords:
- blocky
- adblock
- dns
- blocky
- adblock
- dns
home: https://github.com/k8s-at-home/charts/tree/master/charts/stable/blocky
icon: https://github.com/0xERR0R/blocky/raw/master/docs/blocky.svg?sanitize=true
sources:
- https://github.com/0xERR0R/blocky
- https://github.com/0xERR0R/blocky
maintainers:
- name: billimek
email: jeff@billimek.com
- name: billimek
email: jeff@billimek.com
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com
version: 2.0.1

File diff suppressed because one or more lines are too long

View File

@@ -9,7 +9,7 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [5.0.1]
### [6.0.0]
#### Added
@@ -17,12 +17,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
#### Changed
- configuration inside `config` is no longer a yaml object, it is now a multiline string
- moved to helm-docs
- **BREAKING** Migrate Blocky to the common library, a lot of configuration has changed.
#### Removed
- N/A
[5.0.1]: #5.0.1
[6.0.0]: #6.0.0
{{- end -}}

View File

@@ -1,15 +1 @@
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.serviceUDP.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "blocky.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.serviceUDP.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ include "blocky.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "blocky.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.serviceUDP.port }}
{{- else if contains "ClusterIP" .Values.serviceUDP.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "blocky.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
{{- include "common.notes.defaultNotes" . -}}

View File

@@ -1,41 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "blocky.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 "blocky.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 a default fully qualified postgresql name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "blocky.postgresql.fullname" -}}
{{- $name := default "postgresql" .Values.postgresql.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "blocky.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -0,0 +1,31 @@
{{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }}
{{/* Append the configMap to the additionalVolumes */}}
{{- define "blocky.configmap.volume" -}}
name: blocky-config
configMap:
name: {{ template "common.names.fullname" . }}-config
{{- end -}}
{{- $volume := include "blocky.configmap.volume" . | fromYaml -}}
{{- if $volume -}}
{{- $additionalVolumes := append .Values.additionalVolumes $volume }}
{{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}}
{{- end -}}
{{/* Append the configMap volume to the additionalVolumeMounts */}}
{{- define "blocky.configmap.volumeMount" -}}
name: blocky-config
mountPath: /app/config.yml
subPath: config.yml
{{- end -}}
{{- $volumeMount := include "blocky.configmap.volumeMount" . | fromYaml -}}
{{- if $volumeMount -}}
{{- $additionalVolumeMounts := append .Values.additionalVolumeMounts $volumeMount }}
{{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}}
{{- end -}}
{{/* Render the templates */}}
{{ include "common.all" . }}

View File

@@ -1,13 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "blocky.fullname" . }}
namespace: {{ .Release.Namespace }}
name: {{ template "common.names.fullname" . }}-config
labels:
app.kubernetes.io/name: {{ include "blocky.name" . }}
helm.sh/chart: {{ include "blocky.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- include "common.labels" . | nindent 4 }}
data:
config.yml: |
{{ .Values.config | indent 4 }}

View File

@@ -1,120 +0,0 @@
{{- $blockyConfig := .Values.config | fromYaml }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "blocky.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "blocky.name" . }}
helm.sh/chart: {{ include "blocky.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/name: {{ include "blocky.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "blocky.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{ toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- if .Values.timeZone }}
- name: TZ
value: {{ .Values.timeZone | quote }}
{{- end }}
volumeMounts:
- name: config
mountPath: /app/config.yml
subPath: config.yml
readOnly: true
{{- range $name, $value := .Values.extraLists }}
- name: config
mountPath: /app/{{ $name }}
subPath: {{ $name }}
readOnly: true
{{- end }}
{{- if hasKey $blockyConfig "queryLog" }}
- name: data
mountPath: {{ $blockyConfig.queryLog.dir }}
{{- if .Values.persistence.subPath }}
subPath: {{ .Values.persistence.subPath }}
{{- end }}
{{- end }}
ports:
- name: api
containerPort: 4000
- name: dns
containerPort: 53
protocol: TCP
- name: dns-udp
containerPort: 53
protocol: UDP
livenessProbe:
httpGet:
path: /
port: api
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
readinessProbe:
httpGet:
path: /
port: api
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
startupProbe:
httpGet:
path: /
port: api
initialDelaySeconds: {{ .Values.probes.startup.initialDelaySeconds }}
failureThreshold: {{ .Values.probes.startup.failureThreshold }}
periodSeconds: {{ .Values.probes.startup.periodSeconds }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: config
projected:
defaultMode: 0444
sources:
- configMap:
name: {{ template "blocky.fullname" . }}
items:
- key: config.yml
path: config.yml
{{- range $name, $value := .Values.extraLists }}
- key: {{ $name }}
path: {{ $name }}
{{- end }}
{{- if hasKey $blockyConfig "queryLog" }}
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "blocky.fullname" . }}{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@@ -1,33 +0,0 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "blocky.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "blocky.name" . }}
helm.sh/chart: {{ include "blocky.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.persistence.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.persistence.finalizers }}
finalizers:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
{{- toYaml .Values.persistence.accessModes | nindent 4 }}
{{- if .Values.persistence.storageClassName }}
storageClassName: {{ .Values.persistence.storageClassName }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- with .Values.persistence.selectorLabels }}
selector:
matchLabels:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end -}}

View File

@@ -1,34 +0,0 @@
{{- if .Values.serviceTCP.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "blocky.fullname" . }}-tcp
labels:
app.kubernetes.io/name: {{ include "blocky.name" . }}
helm.sh/chart: {{ include "blocky.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.serviceTCP.annotations }}
annotations:
{{ toYaml .Values.serviceTCP.annotations | indent 4 }}
{{- end }}
spec:
type: {{ .Values.serviceTCP.type }}
{{- if .Values.serviceTCP.loadBalancerIP }}
loadBalancerIP: {{ .Values.serviceTCP.loadBalancerIP }}
{{- end }}
{{- if .Values.serviceTCP.externalIPs }}
externalIPs:
{{ toYaml .Values.serviceTCP.externalIPs | indent 4 }}
{{- end }}
externalTrafficPolicy: {{ .Values.serviceTCP.externalTrafficPolicy }}
ports:
- port: 53
targetPort: dns
protocol: TCP
name: dns
selector:
app.kubernetes.io/name: {{ include "blocky.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

View File

@@ -1,33 +0,0 @@
{{- if .Values.serviceUDP.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "blocky.fullname" . }}-udp
labels:
app.kubernetes.io/name: {{ include "blocky.name" . }}
helm.sh/chart: {{ include "blocky.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.serviceUDP.annotations }}
annotations:
{{ toYaml .Values.serviceUDP.annotations | indent 4 }}
{{- end }}
spec:
type: {{ .Values.serviceUDP.type }}
{{- if .Values.serviceUDP.loadBalancerIP }}
loadBalancerIP: {{ .Values.serviceUDP.loadBalancerIP }}
{{- end }}
{{- if .Values.serviceUDP.externalIPs }}
externalIPs:
{{ toYaml .Values.serviceUDP.externalIPs | indent 4 }}
{{- end }}
externalTrafficPolicy: {{ .Values.serviceUDP.externalTrafficPolicy }}
ports:
- port: 53
targetPort: dns-udp
protocol: UDP
name: dns-udp
selector:
app.kubernetes.io/name: {{ include "blocky.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

View File

@@ -1,45 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "blocky.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "blocky.name" . }}
helm.sh/chart: {{ include "blocky.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
spec:
{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
type: ClusterIP
{{- if .Values.service.clusterIP }}
clusterIP: {{ .Values.service.clusterIP }}
{{end}}
{{- else if eq .Values.service.type "LoadBalancer" }}
type: {{ .Values.service.type }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
{{- if .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
{{- end -}}
{{- else }}
type: {{ .Values.service.type }}
{{- end }}
{{- if .Values.service.externalIPs }}
externalIPs:
{{ toYaml .Values.service.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
{{- end }}
ports:
- name: api
port: 4000
targetPort: api
selector:
app.kubernetes.io/name: {{ include "blocky.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

View File

@@ -1,23 +1,21 @@
{{- if .Values.serviceMonitor.enabled }}
{{- if .Values.prometheus.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "blocky.fullname" . }}
name: {{ template "common.names.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "blocky.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "blocky.chart" . }}
{{- with .Values.serviceMonitor.additionalLabels }}
{{- include "common.labels" . | nindent 4 }}
{{- with .Values.prometheus.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "blocky.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "common.labels.selectorLabels" . | nindent 6 }}
endpoints:
- port: api
interval: 30s
- port: http
{{- with .Values.prometheus.serviceMonitor.interval }}
interval: {{ . }}
{{- end }}
path: /metrics
{{- end }}

View File

@@ -1,17 +1,77 @@
#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
#
image:
repository: spx01/blocky
tag: v0.12
tag: v0.13
pullPolicy: IfNotPresent
nameOverride: ""
fullnameOverride: ""
strategy:
type: Recreate
env: {}
# TZ:
# -- (int) Number of pods to load balance between
replicas: 1
timeZone: "UTC"
service:
port:
port: 4000
# additionalServices:
# - enabled: true
# nameSuffix: dns-tcp
# type: NodePort
# port:
# port: 53
# name: dns-tcp
# protocol: TCP
# targetPort: 53
# externalTrafficPolicy: Local
# - enabled: true
# nameSuffix: dns-udp
# type: NodePort
# port:
# port: 53
# name: dns-udp
# protocol: UDP
# targetPort: 53
# externalTrafficPolicy: Local
# Blocky configuration, for a full list of options see
# https://github.com/0xERR0R/blocky/blob/master/docs/config.yml
persistence:
logs:
enabled: false
emptyDir: false
mountPath: /logs
## Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
# storageClass: "-"
# accessMode: ReadWriteOnce
# size: 1Gi
## Do not delete the pvc upon helm uninstall
# skipuninstall: false
# existingClaim: ""
prometheus:
serviceMonitor:
enabled: false
interval: 30s
additionalLabels: {}
# podAnnotations:
# prometheus.io/scrape: "true"
# prometheus.io/port: "api"
# -- Full list of options https://github.com/0xERR0R/blocky/blob/master/docs/config.yml
# @default -- see URL to default config
config: |
upstream:
# these external DNS resolvers will be used. Blocky picks 2 random resolvers from the list for each query
@@ -136,94 +196,3 @@ config: |
logLevel: info
# optional: Log format (text or json). Default: text
logFormat: text
## Add persistence for query logs (if enabled)
persistence:
enabled: false
# storageClassName: default
accessModes:
- ReadWriteOnce
size: 10Gi
# annotations: {}
finalizers:
- kubernetes.io/pvc-protection
# selectorLabels: {}
# subPath: ""
# existingClaim:
# Probes configuration
probes:
liveness:
failureThreshold: 5
periodSeconds: 10
readiness:
failureThreshold: 5
periodSeconds: 10
startup:
initialDelaySeconds: 5
failureThreshold: 30
periodSeconds: 10
service:
type: ClusterIP
# externalTrafficPolicy: Local
# loadBalancerIP: ""
# a fixed LoadBalancer IP
annotations: {}
# metallb.universe.tf/address-pool: network-services
# metallb.universe.tf/allow-shared-ip: blocky-svc
serviceTCP:
enabled: false
externalIPs: []
type: NodePort
externalTrafficPolicy: Local
loadBalancerIP: ""
# a fixed LoadBalancer IP
annotations: {}
# metallb.universe.tf/address-pool: network-services
# metallb.universe.tf/allow-shared-ip: blocky-svc
serviceUDP:
enabled: true
externalIPs: []
type: NodePort
externalTrafficPolicy: Local
loadBalancerIP: ""
# a fixed LoadBalancer IP
annotations: {}
# metallb.universe.tf/address-pool: network-services
# metallb.universe.tf/allow-shared-ip: blocky-svc
serviceMonitor:
enabled: false
additionalLabels: {}
## Pod Annotations
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "api"
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:'.
# limits:
# memory: 500Mi
# requests:
# cpu: 50m
# memory: 275Mi
nodeSelector: {}
tolerations: []
affinity: {}
## Add any extra files you want populated to /app here, e.g.:
# extraLists:
# whitelist.txt: |
# analytics.google.com
# googleadservices.com
extraLists: {}

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 3.9.1
description: Perl client used to update dynamic DNS entries for accounts on Dynamic DNS Network Service Providers
name: ddclient
version: 4.0.1
version: 4.0.2
kubeVersion: ">=1.16.0-0"
keywords:
- ddclient
@@ -12,9 +12,7 @@ icon: https://raw.githubusercontent.com/linuxserver/docker-templates/master/linu
sources:
- https://github.com/ddclient/ddclient
- https://hub.docker.com/r/linuxserver/ddclient
maintainers:
- name: billimek
email: jeff@billimek.com
deprecated: true
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "1.0"
description: Dynamic DNS using DigitalOcean's DNS Services
name: digitalocean-dyndns
version: 2.0.3
version: 2.0.4
keywords:
- digitalocean
- dynamicdns
@@ -11,6 +11,4 @@ icon: https://i.imgur.com/cS6iqXD.png
sources:
- https://github.com/tunix/digitalocean-dyndns
- https://github.com/k8s-at-home/charts
maintainers:
- name: billimek
email: jeff@billimek.com
deprecated: true

View File

@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: 2021.1.5
appVersion: 2021.3.4
description: Home Assistant
name: home-assistant
version: 7.0.1
version: 7.1.0
kubeVersion: ">=1.16.0-0"
keywords:
- home-assistant

View File

@@ -8,7 +8,7 @@
image:
repository: homeassistant/home-assistant
pullPolicy: IfNotPresent
tag: 2021.1.5
tag: 2021.3.4
strategy:
type: Recreate

View File

@@ -14,10 +14,13 @@
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl

View File

@@ -1,9 +1,9 @@
apiVersion: v2
name: prometheus-nut-exporter
description: Prometheus NUT Exporter a service monitor to send NUT server metrics to a Prometheus instance.
type: application
version: 1.0.4
appVersion: 1.0.1
description: Prometheus NUT Exporter a service monitor to send NUT server metrics to a Prometheus instance.
name: prometheus-nut-exporter
version: 2.0.0
kubeVersion: ">=1.16.0-0"
keywords:
- nut
- prometheus
@@ -14,3 +14,7 @@ sources:
maintainers:
- name: billimek
email: jeff@billimek.com
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com
version: 2.0.1

View File

@@ -1,6 +1,6 @@
# prometheus-nut-exporter
![Version: 1.0.4](https://img.shields.io/badge/Version-1.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.1](https://img.shields.io/badge/AppVersion-1.0.1-informational?style=flat-square)
![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![AppVersion: 1.0.1](https://img.shields.io/badge/AppVersion-1.0.1-informational?style=flat-square)
Prometheus NUT Exporter a service monitor to send NUT server metrics to a Prometheus instance.
@@ -12,10 +12,13 @@ Prometheus NUT Exporter a service monitor to send NUT server metrics to a Promet
## Requirements
Kubernetes: `>=1.16.0-0`
## Dependencies
| Repository | Name | Version |
|------------|------|---------|
| https://library-charts.k8s-at-home.com | common | 2.0.1 |
## TL;DR
@@ -64,9 +67,7 @@ helm install prometheus-nut-exporter k8s-at-home/prometheus-nut-exporter -f valu
## Custom configuration
### Metrics
You can find the exported metrics here: [metrics](https://github.com/HON95/prometheus-nut-exporter/blob/master/metrics.md).
N/A
## Values
@@ -74,34 +75,14 @@ You can find the exported metrics here: [metrics](https://github.com/HON95/prome
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| env | object | `{}` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"hon95/prometheus-nut-exporter"` | |
| image.tag | string | `"1.0.1"` | |
| imagePullSecrets | list | `[]` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| probes.liveness.failureThreshold | int | `5` | |
| probes.liveness.initialDelaySeconds | int | `30` | |
| probes.liveness.timeoutSeconds | int | `10` | |
| probes.readiness.failureThreshold | int | `5` | |
| probes.readiness.initialDelaySeconds | int | `30` | |
| probes.readiness.timeoutSeconds | int | `10` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
| service.port | int | `9995` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| serviceMonitor.enabled | bool | `false` | |
| serviceMonitor.targets | list | `[]` | |
| tolerations | list | `[]` | |
| prometheus.serviceMonitor.enabled | bool | `false` | |
| prometheus.serviceMonitor.targets | list | `[]` | |
| service.port.port | int | `9995` | |
| strategy.type | string | `"Recreate"` | |
## Changelog
@@ -109,6 +90,20 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [2.0.0]
#### Added
- N/A
#### Changed
- **BREAKING** Migrate prometheus-nut-exporter to the common library, Helm configuration values have changed.
#### Removed
- N/A
### [1.0.2]
#### Added

View File

@@ -9,6 +9,20 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [2.0.0]
#### Added
- N/A
#### Changed
- **BREAKING** Migrate prometheus-nut-exporter to the common library, Helm configuration values have changed.
#### Removed
- N/A
### [1.0.2]
#### Added

View File

@@ -5,7 +5,5 @@
{{- define "custom.custom.configuration" -}}
{{ template "custom.custom.configuration.header" . }}
### Metrics
You can find the exported metrics here: [metrics](https://github.com/HON95/prometheus-nut-exporter/blob/master/metrics.md).
N/A
{{- end -}}

View File

@@ -1,15 +1 @@
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "prometheus-nut-exporter.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "prometheus-nut-exporter.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "prometheus-nut-exporter.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "prometheus-nut-exporter.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:{{ .Values.service.port }}
{{- end }}
{{- include "common.notes.defaultNotes" . -}}

View File

@@ -1,62 +0,0 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "prometheus-nut-exporter.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 "prometheus-nut-exporter.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 "prometheus-nut-exporter.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "prometheus-nut-exporter.labels" -}}
helm.sh/chart: {{ include "prometheus-nut-exporter.chart" . }}
{{ include "prometheus-nut-exporter.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "prometheus-nut-exporter.selectorLabels" -}}
app.kubernetes.io/name: {{ include "prometheus-nut-exporter.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "prometheus-nut-exporter.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "prometheus-nut-exporter.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1 @@
{{ include "common.all" . }}

View File

@@ -1,72 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "prometheus-nut-exporter.fullname" . }}
labels:
{{- include "prometheus-nut-exporter.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "prometheus-nut-exporter.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "prometheus-nut-exporter.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "prometheus-nut-exporter.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- if .Values.env }}
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key | quote }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "prometheus-nut-exporter.fullname" . }}
labels:
{{- include "prometheus-nut-exporter.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "prometheus-nut-exporter.selectorLabels" . | nindent 4 }}

View File

@@ -1,12 +0,0 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "prometheus-nut-exporter.serviceAccountName" . }}
labels:
{{- include "prometheus-nut-exporter.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -1,22 +1,28 @@
{{- if .Values.serviceMonitor.enabled }}
{{- if .Values.prometheus.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "prometheus-nut-exporter.fullname" . }}
name: {{ template "common.names.fullname" . }}
labels:
{{- include "prometheus-nut-exporter.labels" . | nindent 4 }}
{{- include "common.labels" . | nindent 4 }}
{{- with .Values.prometheus.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "prometheus-nut-exporter.selectorLabels" . | nindent 6 }}
{{- include "common.labels.selectorLabels" . | nindent 6 }}
endpoints:
{{- range .Values.serviceMonitor.targets }}
- port: http
interval: 15s
scrapeTimeout: 10s
path: "/nut"
params:
target:
- "{{ .hostname }}:{{ .port }}"
{{- end }}
{{- range .Values.prometheus.serviceMonitor.targets }}
- port: http
interval: {{ .interval }}
scrapeTimeout: {{ .scrapeTimeout }}
path: /nut
params:
target:
- "{{ .hostname }}:{{ .port }}"
relabelings:
- sourceLabels: [__param_target]
targetLabel: target
{{- end }}
{{- end }}

View File

@@ -1,79 +1,31 @@
# Default values for prometheus-nut-exporter.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
#
image:
repository: hon95/prometheus-nut-exporter
pullPolicy: IfNotPresent
tag: "1.0.1"
tag: 1.0.1
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
strategy:
type: Recreate
env: {}
# TZ: UTC
serviceMonitor:
enabled: false
# Specify the list of NUT servers that should be monitored
targets: []
service:
port:
port: 9995
prometheus:
serviceMonitor:
enabled: false
# Specify the list of NUT servers that should be monitored
targets: []
# - hostname: nut-server
# port: 3493
# Probes configuration
probes:
liveness:
initialDelaySeconds: 30
failureThreshold: 5
timeoutSeconds: 10
readiness:
initialDelaySeconds: 30
failureThreshold: 5
timeoutSeconds: 10
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 9995
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:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}
# interval: 30s
# scrapeTimeout: 10s

View File

@@ -19,5 +19,8 @@
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl

View File

@@ -1,18 +1,24 @@
apiVersion: v2
appVersion: 1.0.0
description: rtorrent and flood co-located in the same deployment
appVersion: latest
description: rTorrent is a stable, high-performance and low resource consumption BitTorrent client.
name: rtorrent-flood
version: 5.0.2
version: 6.0.0
kubeVersion: ">=1.16.0-0"
keywords:
- rtorrent
- flood
- torrrent
- rtorrent
- flood
- torrent
home: https://github.com/k8s-at-home/charts/tree/master/charts/stable/rtorrent-flood
icon: https://github.com/jfurrow/flood/blob/master/flood.png?raw=true
sources:
- https://hub.docker.com/r/looselyrigorous/rtorrent
- https://github.com/looselyrigorous/docker-rtorrent
- https://github.com/Flood-UI/flood
- https://github.com/jesec/rtorrent
- https://github.com/jesec/flood
- https://hub.docker.com/r/jesec/rtorrent
- https://hub.docker.com/r/jesec/flood
maintainers:
- name: billimek
email: jeff@billimek.com
- name: billimek
email: jeff@billimek.com
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com
version: 2.0.1

View File

@@ -1,23 +1,27 @@
# rtorrent-flood
![Version: 5.0.2](https://img.shields.io/badge/Version-5.0.2-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
![Version: 6.0.0](https://img.shields.io/badge/Version-6.0.0-informational?style=flat-square) ![AppVersion: v0.9.8-r8+v4.5.0](https://img.shields.io/badge/AppVersion-v0.9.8--r8+v4.5.0-informational?style=flat-square)
rtorrent and flood co-located in the same deployment
rTorrent is a stable, high-performance and low resource consumption BitTorrent client.
**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)**
## Source Code
* <https://hub.docker.com/r/looselyrigorous/rtorrent>
* <https://github.com/looselyrigorous/docker-rtorrent>
* <https://github.com/Flood-UI/flood>
* <https://github.com/jesec/rtorrent>
* <https://github.com/jesec/flood>
* <https://hub.docker.com/r/jesec/rtorrent>
* <https://hub.docker.com/r/jesec/flood>
## Requirements
Kubernetes: `>=1.16.0-0`
## Dependencies
| Repository | Name | Version |
|------------|------|---------|
| https://library-charts.k8s-at-home.com | common | 2.0.1 |
## TL;DR
@@ -66,23 +70,7 @@ helm install rtorrent-flood k8s-at-home/rtorrent-flood -f values.yaml
## Custom configuration
### Setup
NB: This chart will start 2 containers in a single pod, when both containers are started, you will be able to configure flood.
1. Install the chart `helm install rtorrent k8s-at-home/rtorrent-flood`
2. Port-forward to the container `kubectl port-forward $(kubectl get pods -A -o json | jq '.items[] | select(.metadata.labels."app.kubernetes.io/name"=="rtorrent-flood")' | jq .metadata.name -r) 3000:3000`
3. To connect flood to rtorrent, provide the socket path : `/tmp/rtorrent.sock`
4. When connected with flood to rtorrent, go to the settings and change the download path to `/data` which is set by default by the chart
5. You should be able to start downloading torrents now :)
### Pitfalls
You may need to change the StorageClass depending on your kubernetes setup or the containers won't start, use a custom `values.yaml` file to do so.
N/A
## Values
@@ -90,53 +78,27 @@ You may need to change the StorageClass depending on your kubernetes setup or th
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| btService.annotations | object | `{}` | |
| btService.labels | object | `{}` | |
| btService.loadBalancerIP | string | `nil` | |
| btService.port | int | `49161` | |
| btService.type | string | `"NodePort"` | |
| flood.enabled | bool | `true` | |
| flood.image.pullPolicy | string | `"Always"` | |
| flood.image.repository | string | `"jfurrow/flood-ui"` | |
| flood.image.tag | string | `"latest"` | |
| flood.resources.limits.memory | string | `"250Mi"` | |
| flood.resources.requests.cpu | string | `"10m"` | |
| flood.resources.requests.memory | string | `"100Mi"` | |
| floodSecret | string | `"supersecret"` | |
| fullnameOverride | string | `""` | |
| gid | int | `1001` | |
| guiService.annotations | object | `{}` | |
| guiService.labels | object | `{}` | |
| guiService.loadBalancerIP | string | `nil` | |
| guiService.port | int | `3000` | |
| guiService.type | string | `"ClusterIP"` | |
| ingress.annotations | object | `{}` | |
| args[0] | string | `"--port 3000"` | |
| args[1] | string | `"--allowedpath /downloads"` | |
| config | string | see URL to default config | Minimal configuration provided from https://github.com/jesec/rtorrent/blob/master/doc/rtorrent.rc |
| env.HOME | string | `"/config"` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"jesec/rtorrent-flood"` | |
| image.tag | string | `"latest"` | |
| ingress.enabled | bool | `false` | |
| ingress.hosts[0] | string | `"chart-example.local"` | |
| ingress.path | string | `"/"` | |
| ingress.tls | list | `[]` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| persistence.config.accessMode | string | `"ReadWriteOnce"` | |
| persistence.config.enabled | bool | `true` | |
| persistence.config.size | string | `"1Gi"` | |
| persistence.config.skipuninstall | bool | `false` | |
| persistence.data.accessMode | string | `"ReadWriteOnce"` | |
| persistence.data.enabled | bool | `true` | |
| persistence.data.size | string | `"10Gi"` | |
| persistence.data.skipuninstall | bool | `false` | |
| podAnnotations | object | `{}` | |
| rtorrent.enabled | bool | `true` | |
| rtorrent.image.pullPolicy | string | `"Always"` | |
| rtorrent.image.repository | string | `"billimek/rtorrent"` | |
| rtorrent.image.tag | string | `"latest"` | |
| rtorrent.resources.limits.memory | string | `"1Gi"` | |
| rtorrent.resources.requests.cpu | string | `"50m"` | |
| rtorrent.resources.requests.memory | string | `"50Mi"` | |
| strategyType | string | `"Recreate"` | |
| tolerations | list | `[]` | |
| uid | int | `1001` | |
| persistence.config.emptyDir.enabled | bool | `false` | |
| persistence.config.enabled | bool | `false` | |
| persistence.downloads.emptyDir.enabled | bool | `false` | |
| persistence.downloads.enabled | bool | `false` | |
| service.additionalServices[0].enabled | bool | `true` | |
| service.additionalServices[0].nameSuffix | string | `"bittorrent"` | |
| service.additionalServices[0].port.name | string | `"bittorrent"` | |
| service.additionalServices[0].port.port | int | `6881` | |
| service.additionalServices[0].port.protocol | string | `"TCP"` | |
| service.additionalServices[0].port.targetPort | int | `6881` | |
| service.additionalServices[0].type | string | `"ClusterIP"` | |
| service.port.port | int | `3000` | |
| strategy.type | string | `"Recreate"` | |
## Changelog
@@ -144,6 +106,20 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [6.0.0]
#### Added
- N/A
#### Changed
- **BREAKING** Migrate rtorrent-flood to the common library, a lot of configuration has changed.
#### Removed
- N/A
### [5.0.1]
#### Added
@@ -158,6 +134,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A
[6.0.0]: #6.0.0
[5.0.1]: #5.0.1
## Support

View File

@@ -9,6 +9,20 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [6.0.0]
#### Added
- N/A
#### Changed
- **BREAKING** Migrate rtorrent-flood to the common library, a lot of configuration has changed.
#### Removed
- N/A
### [5.0.1]
#### Added
@@ -23,5 +37,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A
[6.0.0]: #6.0.0
[5.0.1]: #5.0.1
{{- end -}}

View File

@@ -5,22 +5,5 @@
{{- define "custom.custom.configuration" -}}
{{ template "custom.custom.configuration.header" . }}
### Setup
NB: This chart will start 2 containers in a single pod, when both containers are started, you will be able to configure flood.
1. Install the chart `helm install rtorrent k8s-at-home/rtorrent-flood`
2. Port-forward to the container `kubectl port-forward $(kubectl get pods -A -o json | jq '.items[] | select(.metadata.labels."app.kubernetes.io/name"=="rtorrent-flood")' | jq .metadata.name -r) 3000:3000`
3. To connect flood to rtorrent, provide the socket path : `/tmp/rtorrent.sock`
4. When connected with flood to rtorrent, go to the settings and change the download path to `/data` which is set by default by the chart
5. You should be able to start downloading torrents now :)
### Pitfalls
You may need to change the StorageClass depending on your kubernetes setup or the containers won't start, use a custom `values.yaml` file to do so.
N/A
{{- end -}}

View File

@@ -0,0 +1,9 @@
persistence:
config:
enabled: true
emptyDir:
enabled: true
downloads:
enabled: true
emptyDir:
enabled: true

View File

@@ -1,19 +1 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.guiService.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "rtorrent-flood.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.guiService.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ include "rtorrent-flood.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "rtorrent-flood.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.guiService.port }}
{{- else if contains "ClusterIP" .Values.guiService.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "rtorrent-flood.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
{{- include "common.notes.defaultNotes" . -}}

View File

@@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "rtorrent-flood.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 "rtorrent-flood.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 "rtorrent-flood.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -1,52 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "rtorrent-flood.fullname" . }}-bt
labels:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
helm.sh/chart: {{ include "rtorrent-flood.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.btService.labels }}
{{ toYaml .Values.btService.labels | indent 4 }}
{{- end }}
{{- with .Values.btService.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if (or (eq .Values.btService.type "ClusterIP") (empty .Values.btService.type)) }}
type: ClusterIP
{{- if .Values.btService.clusterIP }}
clusterIP: {{ .Values.btService.clusterIP }}
{{end}}
{{- else if eq .Values.btService.type "LoadBalancer" }}
type: {{ .Values.btService.type }}
{{- if .Values.btService.loadBalancerIP }}
loadBalancerIP: {{ .Values.btService.loadBalancerIP }}
{{- end }}
{{- if .Values.btService.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.btService.loadBalancerSourceRanges | indent 4 }}
{{- end -}}
{{- else }}
type: {{ .Values.btService.type }}
{{- end }}
{{- if .Values.btService.externalIPs }}
externalIPs:
{{ toYaml .Values.btService.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.btService.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.btService.externalTrafficPolicy }}
{{- end }}
ports:
- name: bt
port: {{ .Values.btService.port }}
protocol: TCP
targetPort: bt
{{ if (and (eq .Values.btService.type "NodePort") (not (empty .Values.btService.nodePort))) }}
nodePort: {{.Values.btService.nodePort}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

View File

@@ -0,0 +1,31 @@
{{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }}
{{/* Append the configMap to the additionalVolumes */}}
{{- define "rtorrent-flood.configmap.volume" -}}
name: rtorrent-flood-config
configMap:
name: {{ template "common.names.fullname" . }}-config
{{- end -}}
{{- $volume := include "rtorrent-flood.configmap.volume" . | fromYaml -}}
{{- if $volume -}}
{{- $additionalVolumes := append .Values.additionalVolumes $volume }}
{{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}}
{{- end -}}
{{/* Append the configMap volume to the additionalVolumeMounts */}}
{{- define "rtorrent-flood.configmap.volumeMount" -}}
name: rtorrent-flood-config
mountPath: /config/.rtorrent.rc
subPath: .rtorrent.rc
{{- end -}}
{{- $volumeMount := include "rtorrent-flood.configmap.volumeMount" . | fromYaml -}}
{{- if $volumeMount -}}
{{- $additionalVolumeMounts := append .Values.additionalVolumeMounts $volumeMount }}
{{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}}
{{- end -}}
{{/* Render the templates */}}
{{ include "common.all" . }}

View File

@@ -1,28 +0,0 @@
{{- if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "rtorrent-flood.fullname" . }}-config
{{- if .Values.persistence.config.skipuninstall }}
annotations:
"helm.sh/resource-policy": keep
{{- end }}
labels:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
helm.sh/chart: {{ include "rtorrent-flood.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
accessModes:
- {{ .Values.persistence.config.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.config.size | quote }}
{{- if .Values.persistence.config.storageClass }}
{{- if (eq "-" .Values.persistence.config.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.config.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}

View File

@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "common.names.fullname" . }}-config
labels:
{{- include "common.labels" . | nindent 4 }}
data:
rtorrent.rc: |
{{ .Values.config | indent 4 }}

View File

@@ -1,29 +0,0 @@
{{- if and .Values.persistence.data.enabled (not .Values.persistence.data.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "rtorrent-flood.fullname" . }}-data
{{- if .Values.persistence.data.skipuninstall }}
annotations:
"helm.sh/resource-policy": keep
{{- end }}
labels:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
helm.sh/chart: {{ include "rtorrent-flood.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
accessModes:
- {{ .Values.persistence.data.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.data.size | quote }}
{{- if .Values.persistence.data.storageClass }}
{{- if (eq "-" .Values.persistence.data.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.data.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}

View File

@@ -1,140 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "rtorrent-flood.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
helm.sh/chart: {{ include "rtorrent-flood.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: 1
revisionHistoryLimit: 3
strategy:
type: {{ .Values.strategyType }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}-rtorrent
image: "{{ .Values.rtorrent.image.repository }}:{{ .Values.rtorrent.image.tag }}"
imagePullPolicy: {{ .Values.rtorrent.image.pullPolicy }}
ports:
- name: bt
containerPort: 49161
protocol: TCP
tty: true
livenessProbe:
tcpSocket:
port: bt
readinessProbe:
tcpSocket:
port: bt
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
env:
- name: TZ
value: "{{ .Values.timezone }}"
- name: PUID
value: "{{ .Values.uid }}"
- name: PGID
value: "{{ .Values.gid }}"
volumeMounts:
- mountPath: /config
name: config
- mountPath: /data
name: data
{{- if .Values.persistence.data.subPath }}
subPath: {{ .Values.persistence.data.subPath }}
{{ end }}
- mountPath: /session
name: data
{{- if .Values.persistence.data.subPath }}
subPath: {{ .Values.persistence.data.subPath }}/.session
{{- else }}
subPath: .session
{{ end }}
- mountPath: /socket
name: socket
resources:
{{ toYaml .Values.rtorrent.resources | indent 12 }}
- name: {{ .Chart.Name }}-flood
image: "{{ .Values.flood.image.repository }}:{{ .Values.flood.image.tag }}"
imagePullPolicy: {{ .Values.flood.image.pullPolicy }}
ports:
- name: http
containerPort: 3000
protocol: TCP
livenessProbe:
httpGet:
port: http
initialDelaySeconds: 60
failureThreshold: 5
timeoutSeconds: 15
readinessProbe:
httpGet:
port: http
initialDelaySeconds: 60
failureThreshold: 5
timeoutSeconds: 20
# tty: true
env:
- name: TZ
value: "{{ .Values.timezone }}"
- name: FLOOD_SECRET
value: "{{ .Values.floodSecret }}"
- name: RTORRENT_SOCK
value: "true"
volumeMounts:
- mountPath: /data
name: data
{{- if .Values.persistence.data.subPath }}
subPath: {{ .Values.persistence.data.subPath }}
{{ end }}
- mountPath: /tmp
name: socket
resources:
{{ toYaml .Values.flood.resources | indent 12 }}
volumes:
- name: config
{{- if .Values.persistence.config.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.config.existingClaim }}{{ .Values.persistence.config.existingClaim }}{{- else }}{{ template "rtorrent-flood.fullname" . }}-config{{- end }}
{{- else }}
emptyDir: {}
{{ end }}
- name: data
{{- if .Values.persistence.data.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.data.existingClaim }}{{ .Values.persistence.data.existingClaim }}{{- else }}{{ template "rtorrent-flood.fullname" . }}-data{{- end }}
{{- else }}
emptyDir: {}
{{ end }}
- name: socket
emptyDir: {}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

View File

@@ -1,52 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "rtorrent-flood.fullname" . }}-gui
labels:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
helm.sh/chart: {{ include "rtorrent-flood.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.guiService.labels }}
{{ toYaml .Values.guiService.labels | indent 4 }}
{{- end }}
{{- with .Values.guiService.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if (or (eq .Values.guiService.type "ClusterIP") (empty .Values.guiService.type)) }}
type: ClusterIP
{{- if .Values.guiService.clusterIP }}
clusterIP: {{ .Values.guiService.clusterIP }}
{{end}}
{{- else if eq .Values.guiService.type "LoadBalancer" }}
type: {{ .Values.guiService.type }}
{{- if .Values.guiService.loadBalancerIP }}
loadBalancerIP: {{ .Values.guiService.loadBalancerIP }}
{{- end }}
{{- if .Values.guiService.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.guiService.loadBalancerSourceRanges | indent 4 }}
{{- end -}}
{{- else }}
type: {{ .Values.guiService.type }}
{{- end }}
{{- if .Values.guiService.externalIPs }}
externalIPs:
{{ toYaml .Values.guiService.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.guiService.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.guiService.externalTrafficPolicy }}
{{- end }}
ports:
- name: http
port: {{ .Values.guiService.port }}
protocol: TCP
targetPort: http
{{ if (and (eq .Values.guiService.type "NodePort") (not (empty .Values.guiService.nodePort))) }}
nodePort: {{.Values.guiService.nodePort}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

View File

@@ -1,38 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "rtorrent-flood.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
helm.sh/chart: {{ include "rtorrent-flood.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}-gui
servicePort: http
{{- end }}
{{- end }}

View File

@@ -1,143 +1,205 @@
# Default values for rtorrent-flood.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
#
# upgrade strategy type (e.g. Recreate or RollingUpdate)
strategyType: Recreate
image:
repository: jesec/rtorrent-flood
pullPolicy: IfNotPresent
tag: latest
nameOverride: ""
fullnameOverride: ""
strategy:
type: Recreate
# timezone: UTC
floodSecret: "supersecret"
uid: 1001
gid: 1001
env:
# TZ:
HOME: "/config"
rtorrent:
enabled: true
image:
repository: billimek/rtorrent
tag: latest
pullPolicy: Always
resources:
requests:
cpu: "50m"
memory: "50Mi"
limits:
memory: "1Gi"
flood:
enabled: true
image:
repository: jfurrow/flood-ui
tag: latest
pullPolicy: Always
resources:
requests:
memory: "100Mi"
cpu: "10m"
limits:
memory: "250Mi"
guiService:
type: ClusterIP
port: 3000
## 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: {}
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
btService:
type: NodePort
port: 49161
## 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: {}
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
args:
- "--port 3000"
- "--allowedpath /downloads"
service:
port:
port: 3000
additionalServices:
- enabled: true
nameSuffix: bittorrent
type: ClusterIP
port:
port: 6881
name: bittorrent
protocol: TCP
targetPort: 6881
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- chart-example.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
persistence:
config:
enabled: true
## configuration data Persistent Volume Storage Class
enabled: false
emptyDir:
enabled: false
downloads:
enabled: false
emptyDir:
enabled: false
## Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
##
## If you want to reuse an existing claim, you can pass the name of the PVC using
## the existingClaim variable
# existingClaim: your-claim
accessMode: ReadWriteOnce
size: 1Gi
# accessMode: ReadWriteOnce
# size: 1Gi
## Do not delete the pvc upon helm uninstall
skipuninstall: false
data:
enabled: true
## torrents data volume configuration
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
##
## If you want to reuse an existing claim, you can pass the name of the PVC using
## the existingClaim variable
# existingClaim: your-claim
# subPath: some-subpath
accessMode: ReadWriteOnce
size: 10Gi
## Do not delete the pvc upon helm uninstall
skipuninstall: false
# skipuninstall: false
# existingClaim: ""
nodeSelector: {}
# -- Minimal configuration provided from https://github.com/jesec/rtorrent/blob/master/doc/rtorrent.rc
# @default -- see URL to default config
config: |
#############################################################################
# A minimal rTorrent configuration that provides the basic features
#############################################################################
tolerations: []
# Some default configs are commented out by #, you can override them to fit your needs
# Lines commented out by ## are merely examples (NOT default)
affinity: {}
# It is recommended to extend upon this default config file. For example:
# override only some configs via command line: -o network.port_range.set=6881-6881
# or, on top of custom config: import = /etc/rtorrent/rtorrent.rc
podAnnotations: {}
# rTorrent runtime directory (cfg.basedir) [default: "$HOME/.local/share/rtorrent"]
method.insert = cfg.basedir, private|const|string, (cat,(fs.homedir),"/.local/share/rtorrent/")
# Default download directory (cfg.download) [default: "$(cfg.basedir)/download"]
method.insert = cfg.download, private|const|string, (cat,(cfg.basedir),"download/")
# Log directory (cfg.logs) [default: "$(cfg.basedir)/log"]
method.insert = cfg.logs, private|const|string, (cat,(cfg.basedir),"log/")
method.insert = cfg.logfile, private|const|string, (cat,(cfg.logs),"rtorrent-",(system.time),".log")
# Torrent session directory (cfg.session) [default: "$(cfg.basedir)/.session"]
method.insert = cfg.session, private|const|string, (cat,(cfg.basedir),".session/")
# Watch (drop to add) directories (cfg.watch) [default: "$(cfg.basedir)/watch"]
method.insert = cfg.watch, private|const|string, (cat,(cfg.basedir),"watch/")
# Create directories
fs.mkdir.recursive = (cat,(cfg.basedir))
fs.mkdir = (cat,(cfg.download))
fs.mkdir = (cat,(cfg.logs))
fs.mkdir = (cat,(cfg.session))
fs.mkdir = (cat,(cfg.watch))
fs.mkdir = (cat,(cfg.watch),"/load")
fs.mkdir = (cat,(cfg.watch),"/start")
# Drop to "$(cfg.watch)/load" to add torrent
schedule2 = watch_load, 11, 10, ((load.verbose, (cat, (cfg.watch), "load/*.torrent")))
# Drop to "$(cfg.watch)/start" to add torrent and start downloading
schedule2 = watch_start, 10, 10, ((load.start_verbose, (cat, (cfg.watch), "start/*.torrent")))
# Listening port for incoming peer traffic
#network.port_range.set = 6881-6999
#network.port_random.set = yes
# Distributed Hash Table and Peer EXchange
# Enable tracker-less torrents but vulnerable to passive sniffing
# DHT and PEX are always disabled for private torrents
#dht.mode.set = auto
#dht.port.set = 6881
#protocol.pex.set = yes
# DHT nodes for bootstrapping
dht.add_bootstrap = dht.transmissionbt.com:6881
dht.add_bootstrap = dht.libtorrent.org:25401
# UDP tracker support
#trackers.use_udp.set = yes
# Peer settings
throttle.max_uploads.set = 100
throttle.max_uploads.global.set = 250
throttle.min_peers.normal.set = 20
throttle.max_peers.normal.set = 60
throttle.min_peers.seed.set = 30
throttle.max_peers.seed.set = 80
trackers.numwant.set = 80
#protocol.encryption.set = allow_incoming,try_outgoing,enable_retry
# Limits for file handle resources, this is optimized for
# an `ulimit` of 1024 (a common default). You MUST leave
# a ceiling of handles reserved for rTorrent's internal needs!
network.max_open_files.set = 600
network.max_open_sockets.set = 300
# Memory resource usage (increase if you have a large number of items loaded,
# and/or the available resources to spend)
pieces.memory.max.set = 1800M
#network.xmlrpc.size_limit.set = 16M
# Basic operational settings
session.path.set = (cat, (cfg.session))
directory.default.set = (cat, (cfg.download))
log.execute = (cat, (cfg.logs), "execute.log")
##log.xmlrpc = (cat, (cfg.logs), "xmlrpc.log")
# Other operational settings
encoding.add = utf8
system.umask.set = 0027
system.cwd.set = (directory.default)
#schedule2 = low_diskspace, 5, 60, ((close_low_diskspace, 500M))
#pieces.hash.on_completion.set = no
##view.sort_current = seeding, greater=d.ratio=
##keys.layout.set = qwerty
# HTTP and SSL
network.http.max_open.set = 50
network.http.dns_cache_timeout.set = 25
# Path to the CA bundle. By default, rTorrent tries to detect from:
# $RTORRENT_CA_BUNDLE (highest priority)
# $CURL_CA_BUNDLE
# $SSL_CERT_FILE
# /etc/ssl/certs/ca-certificates.crt
# /etc/pki/tls/certs/ca-bundle.crt
# /usr/share/ssl/certs/ca-bundle.crt
# /usr/local/share/certs/ca-root-nss.crt
# /etc/ssl/cert.pem (lowest priority)
##network.http.cacert.set = /etc/ssl/certs/ca-certificates.crt
# Path to the certificate directory to verify the peer. The certificates
# must be in PEM format, and the directory must have been processed using
# the c_rehash utility supplied with openssl.
#
# For advanced users only, generally you should use network.http.cacert.set
# to specify path to the bundle of certificates.
##network.http.capath.set = "/etc/ssl/certs"
#network.http.ssl_verify_peer.set = 1
#network.http.ssl_verify_host.set = 1
# Run the rTorrent process as a daemon in the background
#system.daemon.set = false
# XML-RPC interface
network.scgi.open_local = (cat,(cfg.basedir),rtorrent.sock)
# Logging:
# Levels = critical error warn notice info debug
# Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_*
print = (cat, "Logging to ", (cfg.logfile))
log.open_file = "log", (cfg.logfile)
log.add_output = "info", "log"
##log.add_output = "tracker_debug", "log"
### END of rtorrent.rc ###

View File

@@ -22,3 +22,5 @@
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl

View File

@@ -2,14 +2,19 @@ apiVersion: v2
appVersion: 1.0.0
description: Serial to Socket Redirector
name: ser2sock
version: 2.0.3
version: 3.0.0
kubeVersion: ">=1.16.0-0"
keywords:
- ser2sock
- ser2sock
home: https://github.com/k8s-at-home/charts/tree/master/charts/stable/ser2sock
icon: https://i.imgur.com/GfZ7McO.png
sources:
- https://github.com/nutechsoftware/ser2sock
- https://github.com/tenstartups/ser2sock
- https://github.com/nutechsoftware/ser2sock
- https://github.com/tenstartups/ser2sock
maintainers:
- name: billimek
email: jeff@billimek.com
- name: billimek
email: jeff@billimek.com
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com
version: 2.0.1

View File

@@ -1,6 +1,6 @@
# ser2sock
![Version: 2.0.3](https://img.shields.io/badge/Version-2.0.3-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
![Version: 3.0.0](https://img.shields.io/badge/Version-3.0.0-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
Serial to Socket Redirector
@@ -13,10 +13,13 @@ Serial to Socket Redirector
## Requirements
Kubernetes: `>=1.16.0-0`
## Dependencies
| Repository | Name | Version |
|------------|------|---------|
| https://library-charts.k8s-at-home.com | common | 2.0.1 |
## TL;DR
@@ -65,9 +68,22 @@ helm install ser2sock k8s-at-home/ser2sock -f values.yaml
## Custom configuration
**IMPORTANT NOTE:** the USB device must be accessible on the node where this pod runs, in order for this chart to function properly.
**IMPORTANT NOTE:** a ser2sock controller device must be accessible on the node where this pod runs, in order for this chart to function properly.
A way to achieve this can be with nodeAffinity rules, for example:
First, you will need to mount your ser2sock device into the pod, you can do so by adding the following to your values:
```yaml
additionalVolumeMounts:
- name: usb
mountPath: /path/to/device
additionalVolumes:
- name: usb
hostPath:
path: /path/to/device
```
Second you will need to set a nodeAffinity rule, for example:
```yaml
affinity:
@@ -75,13 +91,13 @@ affinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: usb
- key: app
operator: In
values:
- alarmdecoder
- ser2sock-controller
```
... where a node with an attached Coral USB device is labeled with `usb: alarmdecoder`
... where a node with an attached ser2sock controller USB device is labeled with `app: ser2sock-controller`
## Values
@@ -89,31 +105,17 @@ affinity:
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity settings for pod assignment of the GUI |
| baudRate | int | `115200` | Baudrate |
| device | string | `"/dev/ttyUSB0"` | USB Device to use |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| image.repository | string | `"tenstartups/ser2sock"` | Image repository |
| image.tag | string | `"latest"` | Image tag. Possible values listed [here](https://hub.docker.com/r/tenstartups/ser2sock/tags). |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | Node labels for pod assignment of the GUI |
| pgid | string | `"1001"` | GID to run as |
| podAnnotations | object | `{}` | Pod annotations |
| puid | string | `"1001"` | UID to run as |
| resources | object | `{}` | CPU/Memory resource requests/limits or the GUI |
| service.annotations | object | `{}` | Service annotations for the GUI |
| service.clusterIP | string | `nil` | Cluster IP for the GUI |
| service.externalIPs | string | `nil` | External IPs for the GUI |
| service.externalTrafficPolicy | string | `nil` | Loadbalancer externalTrafficPolicy |
| service.loadBalancerIP | string | `nil` | Loadbalancer IP for the GUI |
| service.loadBalancerSourceRanges | string | `nil` | Loadbalancer client IP restriction range for the GUI |
| service.nodePort | string | `nil` | nodePort to listen on for the GUI |
| service.port | int | `10000` | Kubernetes port where the GUI is exposed |
| service.type | string | `"ClusterIP"` | Kubernetes service type for the GUI |
| strategyType | string | `"Recreate"` | Specifies the strategy used to replace old Pods by new ones |
| timezone | string | `nil` | Timezone the ser2sock instance should run as, e.g. 'America/New_York' |
| tolerations | list | `[]` | Toleration labels for pod assignment of the GUI |
| additionalVolumeMounts | list | `[]` | |
| additionalVolumes | list | `[]` | |
| env.BAUD_RATE | int | `115200` | |
| env.LISTENER_PORT | int | `10000` | |
| env.SERIAL_DEVICE | string | `"/dev/ttyUSB0"` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"tenstartups/ser2sock"` | |
| image.tag | string | `"latest"` | |
| ingress.enabled | bool | `false` | |
| service.port.port | int | `10000` | |
| strategy.type | string | `"Recreate"` | |
## Changelog
@@ -121,7 +123,21 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [2.0.2]
### [3.0.0]
#### Added
- N/A
#### Changed
- **BREAKING** Migrate ser2sock to the common library, Helm configuration values have changed.
#### Removed
- N/A
### [1.0.0]
#### Added
@@ -135,7 +151,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A
[2.0.2]: #2.0.2
[3.0.0]: #3.0.0
[1.0.0]: #1.0.0
## Support

View File

@@ -9,7 +9,21 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [2.0.2]
### [3.0.0]
#### Added
- N/A
#### Changed
- **BREAKING** Migrate ser2sock to the common library, Helm configuration values have changed.
#### Removed
- N/A
### [1.0.0]
#### Added
@@ -23,5 +37,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A
[2.0.2]: #2.0.2
[3.0.0]: #3.0.0
[1.0.0]: #1.0.0
{{- end -}}

View File

@@ -5,9 +5,22 @@
{{- define "custom.custom.configuration" -}}
{{ template "custom.custom.configuration.header" . }}
**IMPORTANT NOTE:** the USB device must be accessible on the node where this pod runs, in order for this chart to function properly.
**IMPORTANT NOTE:** a ser2sock controller device must be accessible on the node where this pod runs, in order for this chart to function properly.
A way to achieve this can be with nodeAffinity rules, for example:
First, you will need to mount your ser2sock device into the pod, you can do so by adding the following to your values:
```yaml
additionalVolumeMounts:
- name: usb
mountPath: /path/to/device
additionalVolumes:
- name: usb
hostPath:
path: /path/to/device
```
Second you will need to set a nodeAffinity rule, for example:
```yaml
affinity:
@@ -15,11 +28,11 @@ affinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: usb
- key: app
operator: In
values:
- alarmdecoder
- ser2sock-controller
```
... where a node with an attached Coral USB device is labeled with `usb: alarmdecoder`
... where a node with an attached ser2sock controller USB device is labeled with `app: ser2sock-controller`
{{- end -}}

View File

@@ -1,15 +1 @@
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "ser2sock.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ include "ser2sock.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "ser2sock.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "ser2sock.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:5000 to use your application"
kubectl port-forward $POD_NAME 5000:5000
{{- end }}
{{- include "common.notes.defaultNotes" . -}}

View File

@@ -1,45 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "ser2sock.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 "ser2sock.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 "ser2sock.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "ser2sock.labels" -}}
app.kubernetes.io/name: {{ include "ser2sock.name" . }}
helm.sh/chart: {{ include "ser2sock.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

View File

@@ -0,0 +1 @@
{{ include "common.all" . }}

View File

@@ -1,73 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "ser2sock.fullname" . }}
labels:
{{ include "ser2sock.labels" . | indent 4 }}
spec:
replicas: 1
revisionHistoryLimit: 3
strategy:
type: {{ .Values.strategyType }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "ser2sock.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "ser2sock.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
privileged: true
ports:
- name: http
containerPort: 10000
protocol: TCP
env:
{{- if .Values.timezone }}
- name: TZ
value: "{{ .Values.timezone }}"
{{- end }}
- name: LISTENER_PORT
value: "10000"
- name: BAUD_RATE
value: "{{ .Values.baudRate }}"
- name: SERIAL_DEVICE
value: "/dev/ttyUSB0"
- name: PUID
value: "{{ .Values.puid }}"
- name: PGID
value: "{{ .Values.pgid }}"
volumeMounts:
- mountPath: /dev/ttyUSB0
name: usb
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: usb
hostPath:
path: {{ .Values.device }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@@ -1,49 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "ser2sock.fullname" . }}
labels:
{{ include "ser2sock.labels" . | indent 4 }}
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
type: ClusterIP
{{- if .Values.service.clusterIP }}
clusterIP: {{ .Values.service.clusterIP }}
{{end}}
{{- else if eq .Values.service.type "LoadBalancer" }}
type: {{ .Values.service.type }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
{{- if .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
{{- end -}}
{{- else }}
type: {{ .Values.service.type }}
{{- end }}
{{- if .Values.service.externalIPs }}
externalIPs:
{{ toYaml .Values.service.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
{{- end }}
ports:
- name: http
port: {{ .Values.service.port }}
protocol: TCP
targetPort: http
{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
nodePort: {{.Values.service.nodePort}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "ser2sock.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

View File

@@ -1,73 +1,55 @@
# Default values for ser2sock.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# -- Specifies the strategy used to replace old Pods by new ones
strategyType: Recreate
#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
#
image:
# -- Image repository
repository: tenstartups/ser2sock
# -- Image tag. Possible values listed [here](https://hub.docker.com/r/tenstartups/ser2sock/tags).
tag: latest
# -- Image pull policy
pullPolicy: IfNotPresent
tag: latest
nameOverride: ""
fullnameOverride: ""
strategy:
type: Recreate
env:
# TZ:
# PUID:
# PGID:
LISTENER_PORT: 10000
BAUD_RATE: 115200
SERIAL_DEVICE: "/dev/ttyUSB0"
# -- (string) Timezone the ser2sock instance should run as, e.g. 'America/New_York'
timezone:
# -- USB Device to use
device: "/dev/ttyUSB0"
# -- UID to run as
puid: "1001"
# -- GID to run as
pgid: "1001"
# -- Baudrate
baudRate: 115200
service:
# -- Kubernetes service type for the GUI
type: ClusterIP
# -- Kubernetes port where the GUI is exposed
port: 10000
# -- Service annotations for the GUI
annotations: {}
# -- (string) Cluster IP for the GUI
clusterIP:
# -- (string) External IPs for the GUI
externalIPs:
# -- (string) Loadbalancer IP for the GUI
loadBalancerIP:
# -- (string) Loadbalancer client IP restriction range for the GUI
loadBalancerSourceRanges:
# -- (string) Loadbalancer externalTrafficPolicy
externalTrafficPolicy:
# -- (string) nodePort to listen on for the GUI
nodePort:
port:
port: 10000
# -- CPU/Memory resource requests/limits or the GUI
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:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
ingress:
enabled: false
# -- Node labels for pod assignment of the GUI
nodeSelector: {}
# Privileged may be required if USB controller is accessed directly through the host machine
# securityContext:
# privileged: true
# -- Toleration labels for pod assignment of the GUI
tolerations: []
# Path to your ser2sock device in the container
additionalVolumeMounts: []
# - name: usb
# mountPath: /dev/ttyUSB0
# -- Affinity settings for pod assignment of the GUI
affinity: {}
# Path to your ser2sock device on the host
additionalVolumes: []
# - name: usb
# hostPath:
# path: /dev/ttyUSB0
# -- Pod annotations
podAnnotations: {}
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: app
# operator: In
# values:
# - ser2sock-controller

View File

@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: v1.20.0
appVersion: v1.22.0
description: A self-hosted data logger for your Tesla 🚘
name: teslamate
version: 3.6.2
version: 3.6.3
keywords:
- teslamate
- tesla

View File

@@ -2,7 +2,7 @@ replicaCount: 1
image:
repository: teslamate/teslamate
tag: 1.20.0
tag: 1.22.0
pullPolicy: IfNotPresent
nameOverride: ""

View File

@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: 5.14.23
appVersion: 6.0.45
description: Ubiquiti Network's Unifi Controller
name: unifi
version: 1.5.4
version: 1.5.5
keywords:
- ubiquiti
- unifi

View File

@@ -30,3 +30,23 @@ Create chart name and version as used by the chart label.
{{- define "unifi.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "unifi.labels" -}}
helm.sh/chart: {{ include "unifi.chart" . }}
{{ include "unifi.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "unifi.selectorLabels" -}}
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

View File

@@ -3,7 +3,13 @@
{{- $ingressPath := .Values.captivePortalService.ingress.path -}}
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
{{- $captivePortalHttps := .Values.captivePortalService.https -}}
{{- if semverCompare ">=1.18-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: {{ $fullName }}-captive
@@ -28,17 +34,31 @@ spec:
{{- end }}
{{- end }}
rules:
{{- range .Values.captivePortalService.ingress.hosts }}
{{- range .Values.captivePortalService.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
{{- end }}
backend:
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}-captiveportalservice
port:
{{- if $captivePortalHttps }}
name: captive-https
{{- else }}
name: captive-http
{{- end }}
{{- else }}
serviceName: {{ $fullName }}-captiveportalservice
{{- if $captivePortalHttps }}
servicePort: captive-https
{{- else }}
servicePort: captive-http
{{- end }}
{{- end }}
{{- end -}}
{{- end }}
{{- end }}

View File

@@ -56,6 +56,5 @@ spec:
nodePort: {{.Values.captivePortalService.https}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "unifi.selectorLabels" . | nindent 6 }}
{{ end }}

View File

@@ -2,7 +2,13 @@
{{- $fullName := include "unifi.fullname" . -}}
{{- $ingressPath := .Values.controllerService.ingress.path -}}
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
{{- if semverCompare ">=1.18-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: {{ $fullName }}-controller
@@ -32,8 +38,18 @@ spec:
http:
paths:
- path: {{ $ingressPath }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
{{- end }}
backend:
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}-controller
port:
name: controller
{{- else -}}
serviceName: {{ $fullName }}-controller
servicePort: controller
{{- end }}
{{- end }}
{{- end }}

View File

@@ -49,6 +49,5 @@ spec:
nodePort: {{.Values.controllerService.nodePort}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "unifi.selectorLabels" . | nindent 4 }}
{{ end }}

View File

@@ -19,8 +19,7 @@ spec:
type: {{ .Values.strategyType }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "unifi.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:

View File

@@ -49,6 +49,5 @@ spec:
nodePort: {{.Values.discoveryService.nodePort}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "unifi.selectorLabels" . | nindent 4 }}
{{ end }}

View File

@@ -49,6 +49,5 @@ spec:
nodePort: {{.Values.guiService.nodePort}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "unifi.selectorLabels" . | nindent 4 }}
{{ end }}

View File

@@ -2,19 +2,22 @@
{{- $fullName := include "unifi.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
{{- if semverCompare ">=1.18-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: {{ $fullName }}
labels:
app.kubernetes.io/name: {{ include "unifi.name" . }}
helm.sh/chart: {{ include "unifi.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
labels:
{{- include "unifi.labels" . | nindent 4 }}
spec:
{{- if .Values.ingress.tls }}
tls:
@@ -27,17 +30,31 @@ spec:
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
{{- end }}
backend:
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
service:
{{- if $unifiedServiceEnabled }}
name: {{ $fullName }}
{{- else }}
name: {{ $fullName }}-gui
{{- end }}
port:
name: https-gui
{{- else -}}
{{- if $unifiedServiceEnabled }}
serviceName: {{ $fullName }}
{{- else }}
serviceName: {{ $fullName }}-gui
{{- end }}
servicePort: https-gui
{{- end -}}
{{- end }}
{{- end }}

View File

@@ -49,6 +49,5 @@ spec:
nodePort: {{.Values.speedtestService.nodePort}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "unifi.selectorLabels" . | nindent 4 }}
{{ end }}

View File

@@ -49,6 +49,5 @@ spec:
nodePort: {{.Values.stunService.nodePort}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "unifi.selectorLabels" . | nindent 4 }}
{{ end }}

View File

@@ -49,6 +49,5 @@ spec:
nodePort: {{.Values.syslogService.nodePort}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "unifi.selectorLabels" . | nindent 4 }}
{{ end }}

View File

@@ -101,7 +101,6 @@ spec:
{{ end }}
selector:
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "unifi.selectorLabels" . | nindent 4 }}
{{ end }}

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: latest
description: Valheim dedicated gameserver with automatic update and world backup support
name: valheim
version: 2.0.1
version: 2.0.2
kubeVersion: ">=1.16.0-0"
keywords:
- valheim

View File

@@ -57,6 +57,13 @@ persistence:
enabled: false
mountPath: /config
resources:
requests:
memory: 2048Mi
cpu: 300m
limits:
memory: 4096Mi
probes:
liveness:
enabled: false