Compare commits
11 Commits
dsmr-reade
...
common-2.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11ef99d20a | ||
|
|
1c7d6d403e | ||
|
|
a32e94cfca | ||
|
|
91729b6b53 | ||
|
|
8b932311c1 | ||
|
|
a6edab35b7 | ||
|
|
8c5ade2b2b | ||
|
|
a9218cd798 | ||
|
|
f43d3ab7e7 | ||
|
|
607fb8a01d | ||
|
|
15eb4e4e2b |
4
.github/ISSUE_TEMPLATE/bug-report.md
vendored
4
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@@ -21,6 +21,10 @@ assignees: ''
|
||||
|
||||
<!-- Note: This should be a clear and concise description of what the bug is. -->
|
||||
|
||||
**Relevant Helm values:**
|
||||
|
||||
<!-- Note: Please include a snippet of the relevant values in (or a Pastebin/similar link to) your values.yaml. -->
|
||||
|
||||
**What did you expect to happen:**
|
||||
|
||||
**Anything else you would like to add:**
|
||||
|
||||
9
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
9
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Ask a question
|
||||
url: https://github.com/k8s-at-home/charts/discussions
|
||||
about: Please ask and answer questions here.
|
||||
contact_links:
|
||||
- name: Discuss on Discord
|
||||
url: https://discord.com/invite/sTMX7Vh
|
||||
about: Join our Discord community
|
||||
14
.github/ISSUE_TEMPLATE/question.md
vendored
14
.github/ISSUE_TEMPLATE/question.md
vendored
@@ -1,14 +0,0 @@
|
||||
---
|
||||
name: Question
|
||||
about: Ask a question to the maintainer
|
||||
title: ''
|
||||
labels: question
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Details
|
||||
|
||||
**Ask your question:**
|
||||
|
||||
<!-- Note: A clear and concise query of what you want to ask. -->
|
||||
19
.github/PAUL.yaml
vendored
Normal file
19
.github/PAUL.yaml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
maintainers:
|
||||
- billimek
|
||||
- bjw-s
|
||||
- carpenike
|
||||
- onedr0p
|
||||
labels: true
|
||||
empty_description_check:
|
||||
enabled: true
|
||||
enforced: false
|
||||
branch_destroyer:
|
||||
enabled: true
|
||||
protected_branches:
|
||||
- master
|
||||
- gh-pages
|
||||
pull_requests:
|
||||
automated_merge: false
|
||||
cats_enabled: true
|
||||
dogs_enabled: true
|
||||
allow_approval: true
|
||||
@@ -1,5 +1,13 @@
|
||||
# See https://pre-commit.com for more information
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.4.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: fix-byte-order-marker
|
||||
- id: mixed-line-ending
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: ct-lint
|
||||
|
||||
@@ -23,15 +23,15 @@ You can then run `helm search repo k8s-at-home` to see the charts.
|
||||
|
||||
See [Artifact Hub](https://artifacthub.io/packages/search?org=k8s-at-home) or [charts](./charts/) for a complete list.
|
||||
|
||||
## Common Library
|
||||
## Common library
|
||||
|
||||
The majority of the charts in this repository are using a common library we built. The reason we went with this pattern is a lot of applications are pretty similar in their requirements for Helm charts. Using a library makes maintaining much easier and keeps charts consistent in features. If contributing a new chart first try to make it using the library we built.
|
||||
|
||||
More information can be found [here](https://github.com/k8s-at-home/charts/tree/master/charts/common).
|
||||
More information can be found in our [wiki](https://github.com/k8s-at-home/charts/wiki) and in the common chart directory [here](https://github.com/k8s-at-home/charts/tree/master/charts/common).
|
||||
|
||||
## Support
|
||||
|
||||
- Having problems with a chart or have a feature request? Open a new [issue](https://github.com/k8s-at-home/charts/issues/new/choose).
|
||||
- Having problems with a chart? Open a new [issue](https://github.com/k8s-at-home/charts/issues/new/choose) or discuss in our [Discord](https://discord.gg/sTMX7Vh) in the `#support` channel.
|
||||
- New idea? Discuss [here](https://github.com/k8s-at-home/charts/discussions) or in our [Discord](https://discord.gg/sTMX7Vh) in the `#charts` channel.
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
name: common
|
||||
description: Function library for k8s-at-home charts
|
||||
type: library
|
||||
version: 2.4.0
|
||||
version: 2.5.0
|
||||
keywords:
|
||||
- k8s-at-home
|
||||
- common
|
||||
|
||||
@@ -6,7 +6,7 @@ Default NOTES.txt content.
|
||||
1. Get the application URL by running these commands:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .host }}{{ (first .paths).path }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{- if .hostTpl }}{{ tpl .hostTpl $ }}{{ else }}{{ .host }}{{ end }}{{ (first .paths).path }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.names.fullname" . }})
|
||||
|
||||
@@ -38,12 +38,23 @@ spec:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- range .hostsTpl }}
|
||||
- {{ tpl . $ | quote }}
|
||||
{{- end }}
|
||||
{{- if .secretNameTpl }}
|
||||
secretName: {{ tpl .secretNameTpl $ | quote}}
|
||||
{{- else }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range $values.hosts }}
|
||||
{{- if .hostTpl }}
|
||||
- host: {{ tpl .hostTpl $ | quote }}
|
||||
{{- else }}
|
||||
- host: {{ .host | quote }}
|
||||
{{- end }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
|
||||
@@ -178,14 +178,21 @@ ingress:
|
||||
labels: {}
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
## Or a tpl that is evaluated
|
||||
# hostTpl: '{{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.{{ .Values.ingress.domainname }}'
|
||||
paths:
|
||||
- path: /
|
||||
# Ignored if not kubeVersion >= 1.14-0
|
||||
pathType: Prefix
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
## Or if you need a dynamic secretname
|
||||
# - secretNameTpl: '{{ include "common.names.fullname" . }}-ingress'
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
## Or a tpl that is evaluated
|
||||
# hostTpl:
|
||||
# - '{{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.{{ .Values.ingress.domainname }}'
|
||||
additionalIngresses: []
|
||||
# - enabled: false
|
||||
# nameSuffix: "api"
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
apiVersion: v2
|
||||
appVersion: latest
|
||||
description: CouchPotato (CP) is an automatic NZB and torrent downloader.
|
||||
name: couchpotato
|
||||
version: 4.4.0
|
||||
keywords:
|
||||
- couchpotato
|
||||
- usenet
|
||||
- bittorrent
|
||||
home: https://github.com/k8s-at-home/charts/tree/master/charts/couchpotato
|
||||
icon: https://github.com/CouchPotato/CouchPotatoServer/raw/master/couchpotato/static/images/icons/android.png
|
||||
sources:
|
||||
- https://hub.docker.com/r/linuxserver/couchpotato/
|
||||
- https://github.com/CouchPotato/CouchPotatoServer/
|
||||
maintainers:
|
||||
- name: billimek
|
||||
email: jeff@billimek.com
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://k8s-at-home.com/charts/
|
||||
version: 2.4.0
|
||||
@@ -1,8 +0,0 @@
|
||||
approvers:
|
||||
- billimek
|
||||
- onedr0p
|
||||
- bjw-s
|
||||
reviewers:
|
||||
- billimek
|
||||
- onedr0p
|
||||
- bjw-s
|
||||
@@ -1,78 +0,0 @@
|
||||
# Couchpotato
|
||||
|
||||
This is a helm chart for [couchpotato](https://github.com/CouchPotato/CouchPotatoServer).
|
||||
|
||||
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose)**
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```shell
|
||||
$ helm repo add k8s-at-home https://k8s-at-home.com/charts/
|
||||
$ helm install k8s-at-home/couchpotato
|
||||
```
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
helm install --name my-release k8s-at-home/couchpotato
|
||||
```
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `my-release` deployment:
|
||||
|
||||
```console
|
||||
helm delete my-release --purge
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
## Configuration
|
||||
Read through the charts [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/couchpotato/values.yaml)
|
||||
file. It has several commented out suggested values.
|
||||
Additionally you can take a look at the common library [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml) for more (advanced) configuration options.
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
```console
|
||||
helm install couchpotato \
|
||||
--set env.TZ="America/New_York" \
|
||||
k8s-at-home/couchpotato
|
||||
```
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
|
||||
chart. For example,
|
||||
```console
|
||||
helm install couchpotato k8s-at-home/couchpotato --values values.yaml
|
||||
```
|
||||
|
||||
```yaml
|
||||
image:
|
||||
tag: ...
|
||||
```
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
|
||||
If you get
|
||||
```console
|
||||
Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: ...`
|
||||
```
|
||||
it may be because you uninstalled the chart with `skipuninstall` enabled, you need to manually delete the pvc or use `existingClaim`.
|
||||
|
||||
---
|
||||
|
||||
## Upgrading an existing Release to a new major version
|
||||
|
||||
A major chart version change (like 4.0.1 -> 5.0.0) indicates that there is an incompatible breaking change potentially needing manual actions.
|
||||
|
||||
### Upgrading from 2.x.x to 3.x.x
|
||||
|
||||
Due to migrating to a centralized common library some values in `values.yaml` have changed.
|
||||
|
||||
Examples:
|
||||
|
||||
* `service.port` has been moved to `service.port.port`.
|
||||
* `persistence.type` has been moved to `controllerType`.
|
||||
|
||||
Refer to the library values.yaml for more configuration options.
|
||||
@@ -1 +0,0 @@
|
||||
{{- include "common.notes.defaultNotes" . -}}
|
||||
@@ -1 +0,0 @@
|
||||
{{ include "common.all" . }}
|
||||
@@ -1,40 +0,0 @@
|
||||
# Default values for Couchpotato.
|
||||
|
||||
image:
|
||||
repository: linuxserver/couchpotato
|
||||
pullPolicy: Always
|
||||
tag: latest
|
||||
|
||||
strategy:
|
||||
type: Recreate
|
||||
|
||||
service:
|
||||
port:
|
||||
port: 5050
|
||||
|
||||
env: {}
|
||||
# TZ: UTC
|
||||
# PUID: 1001
|
||||
# PGID: 1001
|
||||
|
||||
persistence:
|
||||
config:
|
||||
enabled: false
|
||||
emptyDir: false
|
||||
|
||||
media:
|
||||
enabled: false
|
||||
emptyDir: false
|
||||
mountPath: /media
|
||||
## 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: ""
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
appVersion: v4.9.0
|
||||
description: DSMR-protocol reader, telegram data storage and energy consumption visualizer.
|
||||
name: dsmr-reader
|
||||
version: 1.2.0
|
||||
version: 1.2.1
|
||||
keywords:
|
||||
- dsmr-reader
|
||||
- energy
|
||||
@@ -19,6 +19,6 @@ dependencies:
|
||||
repository: https://k8s-at-home.com/charts/
|
||||
version: 2.4.0
|
||||
- name: postgresql
|
||||
version: 10.2.0
|
||||
version: 10.2.7
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: postgresql.enabled
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
appVersion: 2021.1.5
|
||||
description: Home Assistant
|
||||
name: home-assistant
|
||||
version: 5.5.0
|
||||
version: 5.5.1
|
||||
keywords:
|
||||
- home-assistant
|
||||
- hass
|
||||
@@ -21,14 +21,14 @@ dependencies:
|
||||
repository: https://k8s-at-home.com/charts/
|
||||
version: 2.4.0
|
||||
- name: postgresql
|
||||
version: 10.2.0
|
||||
version: 10.2.7
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: postgresql.enabled
|
||||
- name: mariadb
|
||||
version: 9.2.0
|
||||
version: 9.2.5
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: mariadb.enabled
|
||||
- name: influxdb
|
||||
version: 1.1.6
|
||||
version: 1.1.9
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: influxdb.enabled
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
appVersion: v2.19.1
|
||||
description: A Personal Relationship Management tool to help you organize your social life
|
||||
name: monica
|
||||
version: 2.5.0
|
||||
version: 2.5.1
|
||||
keywords:
|
||||
- crm
|
||||
home: https://www.monicahq.com/
|
||||
@@ -18,6 +18,6 @@ dependencies:
|
||||
repository: https://k8s-at-home.com/charts/
|
||||
version: 2.4.0
|
||||
- name: mariadb
|
||||
version: 9.2.0
|
||||
version: 9.2.5
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: mariadb.enabled
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
appVersion: v4.3.1
|
||||
description: PowerDNS is a DNS server, written in C++ and licensed under the GPL. It runs on most Unix derivatives. PowerDNS features a large number of different backends ranging from simple BIND style zonefiles to relational databases and load balancing/failover algorithms. A DNS recursor is provided as a separate program.
|
||||
name: powerdns
|
||||
version: 3.0.2
|
||||
version: 3.0.3
|
||||
home: https://www.powerdns.com/
|
||||
sources:
|
||||
- http://www.github.com/PowerDNS/
|
||||
@@ -12,10 +12,10 @@ maintainers:
|
||||
email: ryan@ryanholt.net
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
version: 10.2.0
|
||||
version: 10.2.7
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: postgresql.enabled
|
||||
- name: mariadb
|
||||
version: 9.2.0
|
||||
version: 9.2.5
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: mariadb.enabled
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode
|
||||
.vscode/
|
||||
# OWNERS file for Kubernetes
|
||||
OWNERS
|
||||
22
charts/smarter-device-manager/Chart.yaml
Normal file
22
charts/smarter-device-manager/Chart.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: v2
|
||||
name: smarter-device-manager
|
||||
version: 1.0.0
|
||||
appVersion: 1.1.2
|
||||
description: Manage hardware resource allocation without a need for privileged containers
|
||||
keywords:
|
||||
- kubernetes
|
||||
- cluster
|
||||
- hardware
|
||||
home: https://gitlab.com/arm-research/smarter/smarter-device-manager/
|
||||
sources:
|
||||
- https://gitlab.com/arm-research/smarter/smarter-device-manager/
|
||||
- https://github.com/k8s-at-home/charts
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://k8s-at-home.com/charts/
|
||||
version: 2.4.0
|
||||
maintainers:
|
||||
- name: bjw-s
|
||||
email: me@bjw-s.dev
|
||||
- name: lazyoldbear
|
||||
email: 19270832+lazyoldbear@users.noreply.github.com
|
||||
111
charts/smarter-device-manager/README.md
Normal file
111
charts/smarter-device-manager/README.md
Normal file
@@ -0,0 +1,111 @@
|
||||
# smarter device manager
|
||||
|
||||
This is a helm chart for [smarter-device-manager](https://gitlab.com/arm-research/smarter/smarter-device-manager/)
|
||||
([see also](https://community.arm.com/developer/research/b/articles/posts/a-smarter-device-manager-for-kubernetes-on-the-edge)).
|
||||
|
||||
This tool discovers host hardware resources and manages their provisioning for the pods, decoupling host paths from them, and ensuring that pods don't compete for the same piece of hardware.
|
||||
|
||||
Typical use cases are Zigbee/Zwave USB dongles for other charts available in this repository (Zigbee2MQTT, ZwaveJS2MQTT).
|
||||
|
||||
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose)**
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```shell
|
||||
$ helm repo add k8s-at-home https://k8s-at-home.com/charts/
|
||||
$ helm install k8s-at-home/smarter-device-manager
|
||||
```
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
helm install --name my-release k8s-at-home/smarter-device-manager
|
||||
```
|
||||
|
||||
Please consider overriding the default configuration through `values.yaml` file.
|
||||
For example:
|
||||
```yaml
|
||||
config:
|
||||
- devicematch: ^snd$
|
||||
nummaxdevices: 20
|
||||
- devicematch: ^rtc0$
|
||||
nummaxdevices: 20
|
||||
- devicematch: ^video[0-9]*$
|
||||
nummaxdevices: 20
|
||||
- devicematch: ^ttyACM[0-9]*$
|
||||
nummaxdevices: 1
|
||||
```
|
||||
The above configuration allows up to twenty pods to make use of `/dev/snd`, `/dev/rtc0` and each of `/dev/video[0-9]*` devices.
|
||||
Only one pod at a time can use any of the discovered host `/dev/ttyACM[0-9]*` devices. This means that if a pod has reserved a dongle at `/dev/ttyACM0`, another pod requesting the same device will stay pending.
|
||||
|
||||
Once the devices are discovered, they will be added as allocatable resources to the nodes:
|
||||
```
|
||||
$ kubectl describe nodes
|
||||
...
|
||||
Capacity:
|
||||
cpu: 4
|
||||
memory: 16104560Ki
|
||||
pods: 110
|
||||
smarter-devices/gpiochip0: 0
|
||||
smarter-devices/i2c-0: 0
|
||||
smarter-devices/snd: 20
|
||||
smarter-devices/ttyUSB-Z-Stick-Gen5: 1
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Important limitation
|
||||
|
||||
Please note that only the root of the host `/dev` directory is considered for discovery. _Therefore, `by-id` paths will not work and some `udev` rules may be necessary._
|
||||
|
||||
### Resource allocation
|
||||
|
||||
The hardware is requested by pods through `resources`, e.g.:
|
||||
```yaml
|
||||
resources:
|
||||
limits:
|
||||
smarter-devices/ttyUSB-Conbee-2: 1
|
||||
requests:
|
||||
smarter-devices/ttyUSB-Conbee-2: 1
|
||||
```
|
||||
|
||||
In this case host device `/dev/ttyUSB-Conbee-2` will be given at the same path, and the pod will only be created when this device is available.
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `my-release` deployment:
|
||||
|
||||
```console
|
||||
helm delete my-release --purge
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
Read through the charts [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/smarter-device-manager/values.yaml)
|
||||
file. It has several commented out suggested values.
|
||||
Additionally you can take a look at the common library [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml) for more (advanced) configuration options.
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
```console
|
||||
helm install my-release \
|
||||
--set image.pullPolicy="Always" \
|
||||
k8s-at-home/smarter-device-manager
|
||||
```
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
|
||||
chart. For example,
|
||||
```console
|
||||
helm install my-release k8s-at-home/smarter-device-manager --values values.yaml
|
||||
```
|
||||
|
||||
```yaml
|
||||
image:
|
||||
tag: ...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Upgrading an existing Release to a new major version
|
||||
|
||||
A major chart version change (like 4.0.1 -> 5.0.0) indicates that there is an incompatible breaking change potentially needing manual actions.
|
||||
77
charts/smarter-device-manager/templates/common.yaml
Normal file
77
charts/smarter-device-manager/templates/common.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
{{/* Make sure all variables are set properly */}}
|
||||
{{- include "common.values.setup" . }}
|
||||
|
||||
{{/* Host paths */}}
|
||||
{{- define "sdm.dev.volume" -}}
|
||||
name: host-dev
|
||||
hostPath:
|
||||
path: {{ .Values.devPath | default "/dev" }}
|
||||
{{- end -}}
|
||||
{{- define "sdm.sys.volume" -}}
|
||||
name: host-sys
|
||||
hostPath:
|
||||
path: {{ .Values.sysPath | default "/sys" }}
|
||||
{{- end -}}
|
||||
{{- define "sdm.device-plugins.volume" -}}
|
||||
name: host-device-plugins
|
||||
hostPath:
|
||||
path: {{ .Values.devicePluginPath | default "/var/lib/kubelet/device-plugins" }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "sdm.dev.volumeMount" -}}
|
||||
name: host-dev
|
||||
mountPath: /dev
|
||||
{{- end -}}
|
||||
{{- define "sdm.sys.volumeMount" -}}
|
||||
name: host-sys
|
||||
mountPath: /sys
|
||||
{{- end -}}
|
||||
{{- define "sdm.device-plugins.volumeMount" -}}
|
||||
name: host-device-plugins
|
||||
mountPath: /var/lib/kubelet/device-plugins
|
||||
{{- end -}}
|
||||
|
||||
{{/* Append host paths and the configMap to the additionalVolumes and additionalVolumeMounts */}}
|
||||
{{- define "sdm.configmap.volume" -}}
|
||||
name: configuration
|
||||
configMap:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- $additionalVolumes := .Values.additionalVolumes -}}
|
||||
{{- $volume := include "sdm.dev.volume" . | fromYaml -}}
|
||||
{{- $additionalVolumes := append $additionalVolumes $volume -}}
|
||||
{{- $volume := include "sdm.sys.volume" . | fromYaml -}}
|
||||
{{- $additionalVolumes := append $additionalVolumes $volume -}}
|
||||
{{- $volume := include "sdm.device-plugins.volume" . | fromYaml -}}
|
||||
{{- $additionalVolumes := append $additionalVolumes $volume -}}
|
||||
{{- $volume := include "sdm.configmap.volume" . | fromYaml -}}
|
||||
{{- $additionalVolumes := append $additionalVolumes $volume -}}
|
||||
{{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}}
|
||||
|
||||
{{- define "sdm.configmap.volumeMount" -}}
|
||||
name: configuration
|
||||
mountPath: /root/config/conf.yaml
|
||||
subPath: conf.yaml
|
||||
{{- end -}}
|
||||
|
||||
{{- $additionalVolumeMounts := .Values.additionalVolumeMounts -}}
|
||||
{{- $volumeMount := include "sdm.dev.volumeMount" . | fromYaml -}}
|
||||
{{- $additionalVolumeMounts := append $additionalVolumeMounts $volumeMount -}}
|
||||
{{- $volumeMount := include "sdm.sys.volumeMount" . | fromYaml -}}
|
||||
{{- $additionalVolumeMounts := append $additionalVolumeMounts $volumeMount -}}
|
||||
{{- $volumeMount := include "sdm.device-plugins.volumeMount" . | fromYaml -}}
|
||||
{{- $additionalVolumeMounts := append $additionalVolumeMounts $volumeMount -}}
|
||||
{{- $volumeMount := include "sdm.configmap.volumeMount" . | fromYaml -}}
|
||||
{{- $additionalVolumeMounts := append $additionalVolumeMounts $volumeMount -}}
|
||||
{{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}}
|
||||
|
||||
{{/* DaemonSet controller, disabling defaults */}}
|
||||
{{- $_ := set .Values "controllerType" "daemonset" }}
|
||||
{{- $_ := set .Values.probes.liveness "enabled" false }}
|
||||
{{- $_ := set .Values.probes.readiness "enabled" false }}
|
||||
{{- $_ := set .Values.probes.startup "enabled" false }}
|
||||
{{- $_ := set .Values.service "enabled" false }}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "common.all" . }}
|
||||
38
charts/smarter-device-manager/templates/configmap.yaml
Normal file
38
charts/smarter-device-manager/templates/configmap.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
labels:
|
||||
{{- include "common.labels" . | nindent 4 }}
|
||||
data:
|
||||
conf.yaml: |
|
||||
{{- if not .Values.config }}
|
||||
- devicematch: ^snd$
|
||||
nummaxdevices: 20
|
||||
#- devicematch: ^gpiomem$
|
||||
# nummaxdevices: 40
|
||||
#- devicematch: ^gpiochip[0-9]*$
|
||||
# nummaxdevices: 20
|
||||
#- devicematch: ^hci[0-9]*$
|
||||
# nummaxdevices: 1
|
||||
#- devicematch: ^i2c-[0-9]*$
|
||||
# nummaxdevices: 1
|
||||
#- devicematch: ^rtc0$
|
||||
# nummaxdevices: 20
|
||||
#- devicematch: ^video[0-9]*$
|
||||
# nummaxdevices: 20
|
||||
#- devicematch: ^vchiq$
|
||||
# nummaxdevices: 20
|
||||
#- devicematch: ^vcsm.*$
|
||||
# nummaxdevices: 20
|
||||
- devicematch: ^ttyUSB.*$
|
||||
nummaxdevices: 1
|
||||
#- devicematch: ^ttyACM[0-9]*$
|
||||
# nummaxdevices: 1
|
||||
#- devicematch: ^ttyTHS[0-9]*$
|
||||
# nummaxdevices: 1
|
||||
#- devicematch: ^ttyS[0-9]*$
|
||||
# nummaxdevices: 1
|
||||
{{- else }}
|
||||
{{- toYaml .Values.config | nindent 4 }}
|
||||
{{- end }}
|
||||
32
charts/smarter-device-manager/values.yaml
Normal file
32
charts/smarter-device-manager/values.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
image:
|
||||
repository: registry.gitlab.com/arm-research/smarter/smarter-device-manager
|
||||
tag: v1.1.2
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# Override default configuration
|
||||
# config:
|
||||
# - devicematch: ^snd$
|
||||
# nummaxdevices: 20
|
||||
# - devicematch: ^ttyUSB.*$
|
||||
# nummaxdevices: 1
|
||||
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
|
||||
devicePluginPath: "/var/lib/kubelet/device-plugins"
|
||||
# devPath: "/special-dev/"
|
||||
# sysPath: "/special-sys/"
|
||||
|
||||
# Setting priority class is not necessary, but is recommended.
|
||||
# Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
|
||||
priorityClassName: system-node-critical
|
||||
|
||||
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
allowPrivilegeEscalation: false
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
name: statping
|
||||
description: Status page for monitoring your websites and applications
|
||||
type: application
|
||||
version: 1.5.0
|
||||
version: 1.5.1
|
||||
appVersion: v0.90.65
|
||||
keywords:
|
||||
- statping
|
||||
@@ -18,5 +18,5 @@ icon: https://github.com/statping/statping/blob/dev/frontend/src/assets/logo.png
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 10.1.4
|
||||
version: 10.2.6
|
||||
condition: postgres.posgresql.enabled
|
||||
|
||||
@@ -32,6 +32,5 @@ helm install statping \
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
|
||||
chart. For example,
|
||||
```console
|
||||
helm install statping k8s-at-home/statping --values values.yaml
|
||||
helm install statping k8s-at-home/statping --values values.yaml
|
||||
```
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ spec:
|
||||
- name: DB_CONN
|
||||
value: postgres
|
||||
- name: DB_HOST
|
||||
value: {{ template "postgresql.fullname" . }}-postgresql
|
||||
value: {{ template "common.names.fullname" . }}-postgresql
|
||||
- name: DB_DATABASE
|
||||
value: {{ template "postgresql.database" . }}
|
||||
- name: DB_USER
|
||||
|
||||
@@ -108,6 +108,10 @@ postgres:
|
||||
enabled: true
|
||||
# See https://github.com/bitnami/charts/tree/master/bitnami/postgresql for configuration
|
||||
|
||||
# This is required for postgresql to render its fullname template
|
||||
replication:
|
||||
enabled: false
|
||||
|
||||
externalSecret:
|
||||
enabled: false
|
||||
type: kubernetes-external-secrets
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
appVersion: v1.9
|
||||
description: Teedy is an open source, lightweight document management system for individuals and businesses.
|
||||
name: teedy
|
||||
version: 1.1.0
|
||||
version: 1.1.1
|
||||
keywords:
|
||||
- teedy
|
||||
- documents
|
||||
@@ -20,6 +20,6 @@ dependencies:
|
||||
repository: https://k8s-at-home.com/charts/
|
||||
version: 2.4.0
|
||||
- name: postgresql
|
||||
version: 10.2.5
|
||||
version: 10.2.7
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: postgresql.enabled
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
appVersion: v1.20.0
|
||||
description: A self-hosted data logger for your Tesla 🚘
|
||||
name: teslamate
|
||||
version: 3.5.0
|
||||
version: 3.5.1
|
||||
keywords:
|
||||
- teslamate
|
||||
- tesla
|
||||
@@ -12,7 +12,7 @@ sources:
|
||||
- https://github.com/adriankumpf/teslamate
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
version: 10.2.0
|
||||
version: 10.2.7
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: postgresql.enabled
|
||||
maintainers:
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
appVersion: v4.11
|
||||
description: Traccar is an open source GPS tracking system.
|
||||
name: traccar
|
||||
version: 2.4.0
|
||||
version: 2.4.1
|
||||
keywords:
|
||||
- traccar
|
||||
- gps
|
||||
@@ -18,6 +18,6 @@ dependencies:
|
||||
repository: https://k8s-at-home.com/charts/
|
||||
version: 2.4.0
|
||||
- name: mariadb
|
||||
version: 9.2.0
|
||||
version: 9.2.5
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: mariadb.enabled
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
appVersion: 2.0.1
|
||||
description: Collect ALL UniFi Controller, Site, Device & Client Data - Export to InfluxDB or Prometheus
|
||||
name: unifi-poller
|
||||
version: 5.3.0
|
||||
version: 5.3.1
|
||||
keywords:
|
||||
- unifi
|
||||
- unifi-poller
|
||||
@@ -19,6 +19,6 @@ dependencies:
|
||||
repository: https://k8s-at-home.com/charts/
|
||||
version: 2.4.0
|
||||
- name: influxdb
|
||||
version: 1.1.6
|
||||
version: 1.1.9
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: influxdb.enabled
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
appVersion: 5.14.23
|
||||
description: Ubiquiti Network's Unifi Controller
|
||||
name: unifi
|
||||
version: 1.4.0
|
||||
version: 1.5.1
|
||||
keywords:
|
||||
- ubiquiti
|
||||
- unifi
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
{{- $fullName := include "unifi.fullname" . -}}
|
||||
{{- $ingressPath := .Values.captivePortalService.ingress.path -}}
|
||||
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
|
||||
{{- $captivePortalHttps := .Values.captivePortalService.https -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
@@ -34,7 +35,7 @@ spec:
|
||||
- path: {{ $ingressPath }}
|
||||
backend:
|
||||
serviceName: {{ $fullName }}-captiveportalservice
|
||||
{{- if .Values.captivePortalService.https }}
|
||||
{{- if $captivePortalHttps }}
|
||||
servicePort: captive-https
|
||||
{{- else }}
|
||||
servicePort: captive-http
|
||||
|
||||
@@ -70,10 +70,10 @@ spec:
|
||||
protocol: UDP
|
||||
{{- if .Values.captivePortalService.enabled }}
|
||||
- name: captive-http
|
||||
containerPort: 8880
|
||||
containerPort: {{ .Values.captivePortalService.http }}
|
||||
protocol: TCP
|
||||
- name: captive-https
|
||||
containerPort: 8843
|
||||
containerPort: {{ .Values.captivePortalService.https }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
- name: speedtest
|
||||
@@ -122,6 +122,8 @@ spec:
|
||||
value: "{{ .Values.UID }}"
|
||||
- name: UNIFI_GID
|
||||
value: "{{ .Values.GID }}"
|
||||
- name: UNIFI_STDOUT
|
||||
value: "true"
|
||||
{{- if .Values.extraJvmOpts }}
|
||||
- name: JVM_EXTRA_OPTS
|
||||
value: "{{- join " " .Values.extraJvmOpts }}"
|
||||
|
||||
@@ -186,5 +186,133 @@ class Test < ChartTest
|
||||
jq('.spec.volumeClaimTemplates[0].spec.storageClassName', resource('StatefulSet')).must_equal values[:volumeClaimTemplates][0][:storageClass]
|
||||
end
|
||||
end
|
||||
|
||||
describe 'ingress' do
|
||||
it 'should be disabled when ingress.enabled: false' do
|
||||
values = {
|
||||
ingress: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
chart.value values
|
||||
assert_nil(resource('Ingress'))
|
||||
end
|
||||
|
||||
it 'should be enabled when ingress.enabled: true' do
|
||||
values = {
|
||||
ingress: {
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
|
||||
chart.value values
|
||||
refute_nil(resource('Ingress'))
|
||||
end
|
||||
|
||||
it 'ingress with hosts' do
|
||||
values = {
|
||||
ingress: {
|
||||
hosts: [
|
||||
{
|
||||
host: 'hostname',
|
||||
paths: [
|
||||
{
|
||||
path: '/'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
chart.value values
|
||||
jq('.spec.rules[0].host', resource('Ingress')).must_equal values[:ingress][:hosts][0][:host]
|
||||
jq('.spec.rules[0].http.paths[0].path', resource('Ingress')).must_equal values[:ingress][:hosts][0][:paths][0][:path]
|
||||
end
|
||||
|
||||
it 'ingress with hosts template is evaluated' do
|
||||
expectedHostName = 'common-test.hostname'
|
||||
values = {
|
||||
ingress: {
|
||||
hosts: [
|
||||
{
|
||||
hostTpl: '{{ .Release.Name }}.hostname',
|
||||
paths: [
|
||||
{
|
||||
path: '/'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
chart.value values
|
||||
jq('.spec.rules[0].host', resource('Ingress')).must_equal expectedHostName
|
||||
jq('.spec.rules[0].http.paths[0].path', resource('Ingress')).must_equal values[:ingress][:hosts][0][:paths][0][:path]
|
||||
end
|
||||
|
||||
it 'ingress with hosts and tls' do
|
||||
values = {
|
||||
ingress: {
|
||||
enabled: true,
|
||||
hosts: [
|
||||
{
|
||||
host: 'hostname',
|
||||
paths: [
|
||||
{
|
||||
path: '/'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
tls: [
|
||||
{
|
||||
hosts: [ 'hostname' ],
|
||||
secretName: 'hostname-secret-name'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
chart.value values
|
||||
jq('.spec.rules[0].host', resource('Ingress')).must_equal values[:ingress][:hosts][0][:host]
|
||||
jq('.spec.rules[0].http.paths[0].path', resource('Ingress')).must_equal values[:ingress][:hosts][0][:paths][0][:path]
|
||||
jq('.spec.tls[0].hosts[0]', resource('Ingress')).must_equal values[:ingress][:tls][0][:hosts][0]
|
||||
jq('.spec.tls[0].secretName', resource('Ingress')).must_equal values[:ingress][:tls][0][:secretName]
|
||||
end
|
||||
|
||||
it 'ingress with hosts and tls templates is evaluated' do
|
||||
expectedHostName = 'common-test.hostname'
|
||||
expectedSecretName = 'common-test-hostname-secret-name'
|
||||
values = {
|
||||
ingress: {
|
||||
enabled: true,
|
||||
hosts: [
|
||||
{
|
||||
hostTpl: '{{ .Release.Name }}.hostname',
|
||||
paths: [
|
||||
{
|
||||
path: '/'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
tls: [
|
||||
{
|
||||
hostsTpl: [ '{{ .Release.Name }}.hostname' ],
|
||||
secretNameTpl: '{{ .Release.Name }}-hostname-secret-name'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
chart.value values
|
||||
jq('.spec.rules[0].host', resource('Ingress')).must_equal expectedHostName
|
||||
jq('.spec.rules[0].http.paths[0].path', resource('Ingress')).must_equal values[:ingress][:hosts][0][:paths][0][:path]
|
||||
jq('.spec.tls[0].hosts[0]', resource('Ingress')).must_equal expectedHostName
|
||||
jq('.spec.tls[0].secretName', resource('Ingress')).must_equal expectedSecretName
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user