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 00000000000..6ce501a7397 Binary files /dev/null and b/charts/incubator/owntracks/icon.png differ diff --git a/charts/incubator/owntracks/questions.yaml b/charts/incubator/owntracks/questions.yaml new file mode 100644 index 00000000000..e159b66ae93 --- /dev/null +++ b/charts/incubator/owntracks/questions.yaml @@ -0,0 +1,173 @@ +# Include{groups} +portals: + open: +# Include{portalLink} +questions: +# Include{global} +# Include{controller} +# Include{replicas} +# Include{replica1} +# Include{controllerExpertExtraArgs} + - variable: owntracks + group: App Configuration + label: OwnTracks Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: otr_host + label: MQTT OTR Host + description: Set the MQTT host URL or IP. For example . + 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