[piaware] Added support for BEASTHOST and BEASTPORT (#93)

Signed-off-by: Patrik Boström <patbos@patbos.com>
This commit is contained in:
Patrik Boström 2020-10-20 17:25:14 +02:00 committed by GitHub
parent 0470f937bf
commit f55c117431
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 4 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v3.8.1
description: Program for forwarding ADS-B data to FlightAware
name: piaware
version: 2.0.1
version: 2.1.0
keywords:
- piaware
- flight-aware

View File

@ -17,6 +17,15 @@ To install the chart with the release name `my-release`:
helm install --name my-release k8s-at-home/piaware
```
### Configuration
There are two main options for this chart, either use a UBB device on the node where the pod runs or use
[readsb](https://hub.docker.com/r/mikenye/readsb) with beast
#### USB
Set the value
device: "/dev/bus/usb/001/004"
**IMPORTANT NOTE:** a flight-aware USB 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:
@ -35,6 +44,12 @@ affinity:
... where a node with an attached flight-aware USB device is labeled with `app: flight-aware`
#### Beast
Use this together with the [readsb](https://hub.docker.com/r/mikenye/readsb)
Set the value
beastHost: <host running readsb>
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
@ -53,12 +68,12 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm
```console
helm install --name my-release \
--set rtspPassword="nosecrets" \
--set feederId="nosecrets" \
k8s-at-home/piaware
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
helm install --name my-release -f values.yaml stable/piaware
helm install --name my-release -f values.yaml k8s-at-home/piaware
```

View File

@ -33,8 +33,10 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.device }}
securityContext:
privileged: true
{{- end }}
ports:
- name: http
containerPort: 8080
@ -56,15 +58,27 @@ spec:
- name: FEEDER_ID
value: "{{ .Values.feederId }}"
{{- end }}
{{- if .Values.beastHost }}
- name: BEASTHOST
value: "{{ .Values.beastHost }}"
{{- end }}
{{- if .Values.beastPort }}
- name: BEASTPORT
value: "{{ .Values.beastPort }}"
{{- end }}
{{- if .Values.device }}
volumeMounts:
- mountPath: {{ .Values.device }}
name: usb
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.device }}
volumes:
- name: usb
hostPath:
path: {{ .Values.device }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

View File

@ -21,7 +21,10 @@ image:
# longitude: "30.66783"
# device where the flight-aware device can be accessed
device: "/dev/bus/usb/001/004"
# device: "/dev/bus/usb/001/004"
# beastHost: 10.0.1.88
# beastPort: 30005
imagePullSecrets: []
nameOverride: ""