-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f65735a
commit 2e16ffc
Showing
9 changed files
with
289 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ | ||
# OWNERS file for Kubernetes | ||
OWNERS | ||
# helm-docs templates | ||
*.gotmpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: common | ||
repository: https://library-charts.k8s-at-home.com | ||
version: 4.5.2 | ||
digest: sha256:408d12aa9bbce6dfd4ced5c2586d92dfa518821e01823081fa9a141243b3160c | ||
generated: "2022-12-04T22:58:52.344926901+01:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
apiVersion: v2 | ||
appVersion: 1.17.1 | ||
description: Read the wired or wireless mbus protocol to acquire utility meter readings. | ||
name: wmbusmeters | ||
version: 1.0.0 | ||
kubeVersion: ">=1.16.0-0" | ||
keywords: | ||
- m-bus | ||
- wm-bus | ||
- mqtt | ||
- home-assistant | ||
home: https://github.com/andrenarchy/helm-charts/tree/main/charts/wmbusmeters | ||
sources: | ||
- https://github.com/wmbusmeters/wmbusmeters | ||
maintainers: | ||
- name: André Gaul | ||
email: [email protected] | ||
dependencies: | ||
- name: common | ||
repository: https://library-charts.k8s-at-home.com | ||
version: 4.5.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# wmbusmeters | ||
|
||
Read the wired or wireless mbus protocol to acquire utility meter readings. | ||
|
||
## Source Code | ||
|
||
* <https://github.com/wmbusmeters/wmbusmeters> | ||
|
||
## Requirements | ||
|
||
Kubernetes: `>=1.16.0-0` | ||
|
||
## Dependencies | ||
|
||
| Repository | Name | Version | | ||
|------------|------|---------| | ||
| https://library-charts.k8s-at-home.com | common | 4.5.2 | | ||
|
||
## TL;DR | ||
|
||
```console | ||
helm repo add andrenarchy https://andrenarchy.github.io/helm-charts/ | ||
helm repo update | ||
helm install wmbusmeters andrenarchy/wmbusmeters | ||
``` | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `wmbusmeters` | ||
|
||
```console | ||
helm install wmbusmeters andrenarchy/wmbusmeters | ||
``` | ||
|
||
## Uninstalling the Chart | ||
|
||
To uninstall the `wmbusmeters` deployment | ||
|
||
```console | ||
helm uninstall wmbusmeters | ||
``` | ||
|
||
The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release. | ||
|
||
## Configuration | ||
|
||
Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. | ||
Other values may be used from the [values.yaml](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml) from the [common library](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common). | ||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. | ||
|
||
```console | ||
helm install wmbusmeters \ | ||
--set env.TZ="America/New York" \ | ||
andrenarchy/wmbusmeters | ||
``` | ||
|
||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. | ||
|
||
```console | ||
helm install wmbusmeters andrenarchy/wmbusmeters -f values.yaml | ||
``` | ||
|
||
## Custom configuration | ||
|
||
**IMPORTANT NOTE:** a radio device must be accessible on the node where this pod runs, in order for this chart to function properly. | ||
|
||
First, you will need to mount your radio 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: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: app | ||
operator: In | ||
values: | ||
- wmbus-radio | ||
``` | ||
... where a node with an attached radio device is labeled with `app: wmbus-radio` | ||
|
||
If you are getting errors, that the device cannot be opened when starting wmbusmeters, try uncommenting the privileged flag: | ||
|
||
``` | ||
securityContext: | ||
privileged: true | ||
``` | ||
|
||
## Values | ||
|
||
**Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common) | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| affinity | object | `{}` | Affinity constraint rules to place the Pod on a specific node. [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) | | ||
| image.pullPolicy | string | `"IfNotPresent"` | image pull policy | | ||
| image.repository | string | `"wmbusmeters/wmbusmeters"` | image repository | | ||
| image.tag | string | `"1.17.1"` | image tag | | ||
| persistence | object | See values.yaml | Configure persistence settings for the chart under this key. | | ||
| persistence.usb | object | See values.yaml | Configure a hostPathMount to mount a USB device in the container. | | ||
| securityContext.privileged | bool | `nil` | Privileged securityContext may be required if USB controller is accessed directly through the host machine | | ||
| service | object | See values.yaml | Configures service settings for the chart. Normally this does not need to be modified. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{{- define "custom.custom.configuration.header" -}} | ||
## Custom configuration | ||
{{- end -}} | ||
|
||
{{- define "custom.custom.configuration" -}} | ||
{{ template "custom.custom.configuration.header" . }} | ||
|
||
**IMPORTANT NOTE:** a radio device must be accessible on the node where this pod runs, in order for this chart to function properly. | ||
|
||
First, you will need to mount your radio 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: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: app | ||
operator: In | ||
values: | ||
- wmbus-radio | ||
``` | ||
|
||
... where a node with an attached radio device is labeled with `app: wmbus-radio` | ||
|
||
If you are getting errors, that the device cannot be opened when starting wmbusmeters, try uncommenting the privileged flag: | ||
|
||
``` | ||
securityContext: | ||
privileged: true | ||
``` | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ingress: | ||
main: | ||
enabled: true | ||
|
||
persistence: | ||
data: | ||
enabled: true | ||
type: emptyDir | ||
mountPath: /wmbusmeters_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{- include "common.notes.defaultNotes" . -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{/* Make sure all variables are set properly */}} | ||
{{- include "common.values.setup" . }} | ||
|
||
{{/* Render the templates */}} | ||
{{ include "common.all" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# 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: wmbusmeters/wmbusmeters | ||
# -- image tag | ||
# note: 1.17.1 does not support iu891a yet! latest does... | ||
# tag: release-1.17.1 | ||
tag: latest | ||
# -- image pull policy | ||
pullPolicy: IfNotPresent | ||
|
||
securityContext: | ||
# -- (bool) Privileged securityContext may be required if USB controller is accessed directly through the host machine | ||
privileged: # true | ||
|
||
# -- Configure persistence settings for the chart under this key. | ||
# @default -- See values.yaml | ||
persistence: | ||
data: | ||
enabled: false | ||
mountPath: /wmbusmeters_data | ||
# -- Configure a hostPathMount to mount a USB device in the container. | ||
# @default -- See values.yaml | ||
usb: | ||
enabled: false | ||
type: hostPath | ||
hostPath: /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2400981-if00 | ||
|
||
# -- Affinity constraint rules to place the Pod on a specific node. | ||
# [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) | ||
affinity: {} | ||
# nodeAffinity: | ||
# requiredDuringSchedulingIgnoredDuringExecution: | ||
# nodeSelectorTerms: | ||
# - matchExpressions: | ||
# - key: app | ||
# operator: In | ||
# values: | ||
# - wmbus-radio | ||
|
||
service: | ||
main: | ||
enabled: false | ||
|
||
probes: | ||
liveness: | ||
enabled: false | ||
readiness: | ||
enabled: false | ||
startup: | ||
enabled: false | ||
|