From 89c686910c2cf63ee88e15c9c1e1014a164d32e0 Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 21 Dec 2022 17:15:43 -0600 Subject: [PATCH] feat(owntracks): Add Owntracks (#5197) * Add owntracks as incubator app. * Clear owntracks changelog. * Updated storage value name. * Update charts/incubator/owntracks/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * add some extra opts * Apply suggestions from code review Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * typo * secret * data->stringData * Update charts/incubator/owntracks/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/owntracks/Chart.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/incubator/owntracks/.helmignore | 30 +++ charts/incubator/owntracks/CHANGELOG.md | 1 + charts/incubator/owntracks/Chart.yaml | 29 +++ charts/incubator/owntracks/README.md | 1 + charts/incubator/owntracks/icon.png | Bin 0 -> 7098 bytes charts/incubator/owntracks/questions.yaml | 173 ++++++++++++++++++ .../incubator/owntracks/templates/_secret.tpl | 42 +++++ .../incubator/owntracks/templates/common.yaml | 8 + charts/incubator/owntracks/values.yaml | 60 ++++++ 9 files changed, 344 insertions(+) create mode 100644 charts/incubator/owntracks/.helmignore create mode 100644 charts/incubator/owntracks/CHANGELOG.md create mode 100644 charts/incubator/owntracks/Chart.yaml create mode 100644 charts/incubator/owntracks/README.md create mode 100644 charts/incubator/owntracks/icon.png create mode 100644 charts/incubator/owntracks/questions.yaml create mode 100644 charts/incubator/owntracks/templates/_secret.tpl create mode 100644 charts/incubator/owntracks/templates/common.yaml create mode 100644 charts/incubator/owntracks/values.yaml diff --git a/charts/incubator/owntracks/.helmignore b/charts/incubator/owntracks/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/owntracks/.helmignore @@ -0,0 +1,30 @@ +# 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 +# docs folder +/docs +# icon +icon.png diff --git a/charts/incubator/owntracks/CHANGELOG.md b/charts/incubator/owntracks/CHANGELOG.md new file mode 100644 index 00000000000..fdffa2a0fd7 --- /dev/null +++ b/charts/incubator/owntracks/CHANGELOG.md @@ -0,0 +1 @@ +# placeholder diff --git a/charts/incubator/owntracks/Chart.yaml b/charts/incubator/owntracks/Chart.yaml new file mode 100644 index 00000000000..653ba1e0d96 --- /dev/null +++ b/charts/incubator/owntracks/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +appVersion: "0.9.2" +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 11.0.9 +deprecated: false +description: The OwnTracks Recorder is a lightweight program for storing and accessing location data published via MQTT (or HTTP) by the OwnTracks apps. +home: https://truecharts.org/docs/charts/stable/owntracks +icon: https://truecharts.org/img/hotlink-ok/chart-icons/owntracks.png +keywords: + - owncharts + - location +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: owntracks +sources: + - https://github.com/owntracks/recorder + - https://github.com/owntracks/docker-recorder +type: application +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - media + truecharts.org/SCALE-support: "true" + truecharts.org/grade: U diff --git a/charts/incubator/owntracks/README.md b/charts/incubator/owntracks/README.md new file mode 100644 index 00000000000..fdffa2a0fd7 --- /dev/null +++ b/charts/incubator/owntracks/README.md @@ -0,0 +1 @@ +# placeholder diff --git a/charts/incubator/owntracks/icon.png b/charts/incubator/owntracks/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6ce501a73976f8db95792ea7df7ba77ae8c87c6d GIT binary patch literal 7098 zcmc&(g;!KxxV?;Ycg`?Fh;&OMUD6#Q-QA6JH%KTcD4;YbAs|D8v~;H+9r7cj-etYD z-oNl>tvh$_S$Dqs-E;QYXMg*|X{agSVN+uR0Dz~YD60jYk&g!^I{2-%OyPk~8qqcD3>HHTSRve0_a6?Ohx_EzRAm zIbA($bC1NR0f0tONmfe7FYhql-&k9Jp+7{Bk&s*p3Dn0qaTbNM#V>rH=2R7xeuSw(sSTzx!iObF5SS4v#T4 zV~PE8(y;K#F3i|KEP3Ed)ZO z`&SpqKD?o&+}TOibm47o{kcY$-KEMI)tW#WYy{JB;0Or#HvY%UZhtSL{u9PD-s^Jv zz3BRH80;KouFuN>p`M{-D!$?%BKYrwas*f8zn1Qi-ufDYs)-M6)lY=2IR;qm<$VnK zj6|oQBRO5;=u}xeEMENNYIw**W>Z;of9Wo6y*sfiG}b*)_ZJSYgYcF+FqRm4im9QCAwAP%|U@ydsL%(m+2C5I4e}Hg@PQ`UT zERiP1WGi$U{#-3dN7III2NpvD)iW)|28qj`iv+3dbZ7rEixG#mUrK z7N(MBFKpWq$=kM=}o@u>-%;}xyjPBV0(UH zuem%P_0pPR?^VD*8TgcuR|P)+2)2+`kE*4Liqawb$-tLIWm{UO_pD#YdoLPry41)| zs@r6E$afW5j+V+jNKhk2I(8jZ>ZD6o(u_sbt2)5xEbr_o=q{ELX->Gd8UK0xMQqA> z?>Vz6b6Ydn=a*HzefhhJ9CmBx!Pk*?XtiDeh=NvE>W^wmbKOaYta&Omy>VY1Dqym5 zr~ww&!wB{`g2Jwt zzoI{5Ga8{D6O=WFu(WN>wYg-?Q-lO769^m)OGc%;G(WlBvp>0T6L7r!JZyA( zpVVMudJAyRWZz0d_xBwxcF1&_%+&iF-TLmw{9+L+Z6(YQjt4bk(6|C+6= z3rtt8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FSkGFi;0Px@9bRw8{ZzdcY84pV1Rf`bG{`$E# z!CdmM^~5@W-beM4ZZ=cHZ34!8)?O~TB-UfBl4(5 z&gUz_sR}qo^B^un)8BlGYvicsn?f!Af7~kizm2NvkeG?}Wx;gw18|=WP?A%Vt(G. + schema: + type: string + default: "" + - variable: otr_port + label: OTR MQTT Port + description: Set to the port that your MQTT uses. + schema: + type: int + default: 1883 + - variable: otr_user + label: OTR MQTT User + description: Set to the user that your MQTT uses. + schema: + type: string + default: "" + - variable: otr_pass + label: OTR MQTT Password + description: Set to the password that your MQTT uses. + schema: + type: string + private: true + default: "" + - variable: otr_precision + label: OTR Precision + description: Reverse-geo precision + schema: + type: int + default: 7 + - variable: otr_geokey + label: OTR Geo Key + description: API key for reverse-geo lookups + schema: + type: string + private: true + default: "" + - variable: otr_browserapikey + label: OTR Browser API Key + description: Google maps browser API key + schema: + type: string + private: true + default: "" + - variable: otr_serverlabel + label: OTR Server Label + description: Server label for Web + schema: + type: string + required: true + default: OwnTracks + - variable: otr_lmdbsize + label: OTR LMBD Size + description: Size of the LMDB database. If less than 10485760 (10 MB) it will be set to 10485760. + schema: + type: int + required: true + default: 104857600000 +# Include{containerConfig} +# Include{serviceRoot} + - variable: main + label: Main Service + description: The Primary service on which the healthcheck runs, often the webUI + schema: + additional_attrs: true + type: dict + attrs: +# Include{serviceSelectorLoadBalancer} +# Include{serviceSelectorExtras} + - variable: main + label: Main Service Port Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: port + label: Port + description: This port exposes the container port on the service + schema: + type: int + default: 8083 + required: true +# Include{serviceExpertRoot} + default: false +# Include{serviceExpert} +# Include{serviceList} +# Include{persistenceRoot} + - variable: store + label: App Storage + description: Stores the location data. + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} +# Include{persistenceList} +# Include{ingressRoot} + - variable: main + label: Main Ingress + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} +# Include{ingressTLS} +# Include{ingressTraefik} +# Include{ingressList} +# Include{security} +# Include{securityContextAdvancedRoot} + - variable: privileged + label: Privileged mode + schema: + type: boolean + default: false + - variable: readOnlyRootFilesystem + label: ReadOnly Root Filesystem + schema: + type: boolean + default: false + - variable: allowPrivilegeEscalation + label: Allow Privilege Escalation + schema: + type: boolean + default: false + - variable: runAsNonRoot + label: runAsNonRoot + schema: + type: boolean + default: true +# Include{podSecurityContextRoot} + - variable: runAsUser + label: runAsUser + description: The UserID of the user running the application + schema: + type: int + default: 568 + - variable: runAsGroup + label: runAsGroup + description: The groupID this App of the user running the application + schema: + type: int + default: 568 + - variable: fsGroup + label: fsGroup + description: The group that should own ALL storage. + schema: + type: int + default: 568 +# Include{podSecurityContextAdvanced} +# Include{resources} +# Include{advanced} +# Include{addons} +# Include{codeserver} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/owntracks/templates/_secret.tpl b/charts/incubator/owntracks/templates/_secret.tpl new file mode 100644 index 00000000000..00c3149236d --- /dev/null +++ b/charts/incubator/owntracks/templates/_secret.tpl @@ -0,0 +1,42 @@ +{{/* Define the configmap */}} +{{- define "owntracks.secret" -}} + +{{- $configName := printf "%s-secret" (include "tc.common.names.fullname" .) }} +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{ $configName }} + labels: + {{- include "tc.common.labels" . | nindent 4 }} +stringData: + OTR_HTTPPORT: {{ .Values.service.main.ports.main.port | quote }} + {{- with .Values.owntracks.otr_host }} + OTR_HOST: {{ . | quote }} + {{- end }} + {{- with .Values.owntracks.otr_port }} + OTR_PORT: {{ . | quote }} + {{- end }} + {{- with .Values.owntracks.otr_user }} + OTR_USER: {{ . | quote }} + {{- end }} + {{- with .Values.owntracks.otr_pass }} + OTR_PASS: {{ . | quote }} + {{- end }} + {{- with .Values.owntracks.otr_precision }} + OTR_PRECISION: {{ . | quote }} + {{- end }} + {{- with .Values.owntracks.otr_geokey }} + OTR_GEOKEY: {{ . | quote }} + {{- end }} + {{- with .Values.owntracks.otr_borwserapikey }} + OTR_BROWSERAPIKEY: {{ . | quote }} + {{- end }} + {{- with .Values.owntracks.otr_serverlabel }} + OTR_SERVERLABEL: {{ . | quote }} + {{- end }} + {{- with .Values.owntracks.otr_lmdbsize }} + OTR_LMDBSIZE: {{ (int .) | quote }} + {{- end }} {{/* Convert to int again, as it's being converted in scienfitic notation */}} +{{- end -}} diff --git a/charts/incubator/owntracks/templates/common.yaml b/charts/incubator/owntracks/templates/common.yaml new file mode 100644 index 00000000000..c7672cba5d5 --- /dev/null +++ b/charts/incubator/owntracks/templates/common.yaml @@ -0,0 +1,8 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.common.loader.init" . }} + +{{/* Render secret */}} +{{- include "owntracks.secret" . }} + +{{/* Render the templates */}} +{{ include "tc.common.loader.apply" . }} diff --git a/charts/incubator/owntracks/values.yaml b/charts/incubator/owntracks/values.yaml new file mode 100644 index 00000000000..1e1437fbe81 --- /dev/null +++ b/charts/incubator/owntracks/values.yaml @@ -0,0 +1,60 @@ +image: + repository: tccr.io/truecharts/owntracks + pullPolicy: IfNotPresent + tag: 0.9.3@sha256:797eb8958677b80bbb438251f75a51984b578c4919f0fe2c3a9bbf0e866a8b43 + +# securityContext: +# readOnlyRootFilesystem: false + +owntracks: + otr_host: "" + otr_port: 1883 + otr_user: "" + otr_pass: "" + otr_precision: 7 + otr_geokey: "" + otr_browserapikey: "" + otr_serverlabel: OwnTracks + otr_lmdbsize: 104857600000 + +envFrom: + - secretRef: + name: '{{ include "tc.common.names.fullname" . }}-secret' + +service: + main: + ports: + main: + protocol: HTTP + port: 8083 + +probes: + liveness: + enabled: true + custom: true + spec: + exec: + command: + - /usr/sbin/recorder-health.sh + readiness: + enabled: true + custom: true + spec: + exec: + command: + - /usr/sbin/recorder-health.sh + startup: + enabled: true + custom: true + spec: + exec: + command: + - /usr/sbin/recorder-health.sh + +persistence: + store: + enabled: true + mountPath: /store + +portal: + enabled: true