[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 appVersion: v3.8.1
description: Program for forwarding ADS-B data to FlightAware description: Program for forwarding ADS-B data to FlightAware
name: piaware name: piaware
version: 2.0.1 version: 2.1.0
keywords: keywords:
- piaware - piaware
- flight-aware - 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 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. **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: 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` ... 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 ## Uninstalling the Chart
To uninstall/delete the `my-release` deployment: 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 ```console
helm install --name my-release \ helm install --name my-release \
--set rtspPassword="nosecrets" \ --set feederId="nosecrets" \
k8s-at-home/piaware 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, Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console ```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 }} - name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.device }}
securityContext: securityContext:
privileged: true privileged: true
{{- end }}
ports: ports:
- name: http - name: http
containerPort: 8080 containerPort: 8080
@ -56,15 +58,27 @@ spec:
- name: FEEDER_ID - name: FEEDER_ID
value: "{{ .Values.feederId }}" value: "{{ .Values.feederId }}"
{{- end }} {{- end }}
{{- if .Values.beastHost }}
- name: BEASTHOST
value: "{{ .Values.beastHost }}"
{{- end }}
{{- if .Values.beastPort }}
- name: BEASTPORT
value: "{{ .Values.beastPort }}"
{{- end }}
{{- if .Values.device }}
volumeMounts: volumeMounts:
- mountPath: {{ .Values.device }} - mountPath: {{ .Values.device }}
name: usb name: usb
{{- end }}
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.device }}
volumes: volumes:
- name: usb - name: usb
hostPath: hostPath:
path: {{ .Values.device }} path: {{ .Values.device }}
{{- end }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}

View File

@ -21,7 +21,10 @@ image:
# longitude: "30.66783" # longitude: "30.66783"
# device where the flight-aware device can be accessed # 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: [] imagePullSecrets: []
nameOverride: "" nameOverride: ""