From 93ca2988b36307ba2ef8110253a4439ba0214db4 Mon Sep 17 00:00:00 2001 From: MaverickD650 <92877124+MaverickD650@users.noreply.github.com> Date: Sun, 30 Apr 2023 14:59:28 +0100 Subject: [PATCH] fix(speedtest-tracker): Port speedtest-tracker (#8122) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Port speedtest to new common. ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [X] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** Tested using CI on my fork which completed successfully. **📃 Notes:** **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- 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/speedtest-tracker/Chart.yaml | 8 +-- .../speedtest-tracker/questions.yaml | 59 +++++++++--------- .../speedtest-tracker/templates/NOTES.txt | 1 + .../speedtest-tracker/templates/common.yaml | 2 +- .../incubator/speedtest-tracker/values.yaml | 60 ++++++++++--------- 5 files changed, 65 insertions(+), 65 deletions(-) create mode 100644 charts/incubator/speedtest-tracker/templates/NOTES.txt diff --git a/charts/incubator/speedtest-tracker/Chart.yaml b/charts/incubator/speedtest-tracker/Chart.yaml index 7dce405e1ea..d7f95354ebb 100644 --- a/charts/incubator/speedtest-tracker/Chart.yaml +++ b/charts/incubator/speedtest-tracker/Chart.yaml @@ -3,11 +3,7 @@ appVersion: "latest" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 - - condition: postgresql.enabled - name: postgresql - repository: https://deps.truecharts.org/ - version: 11.0.31 + version: 12.6.1 description: A self-hosted internet performance tracking application that runs speedtest checks against Ookla's Speedtest service. home: https://truecharts.org/charts/incubator/speedtest-tracker icon: https://truecharts.org/img/hotlink-ok/chart-icons/speedtest-tracker.png @@ -22,7 +18,7 @@ name: speedtest-tracker sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/speedtest-tracker - https://github.com/alexjustesen/speedtest-tracker -version: 3.0.31 +version: 4.0.0 annotations: truecharts.org/catagories: | - speedtest diff --git a/charts/incubator/speedtest-tracker/questions.yaml b/charts/incubator/speedtest-tracker/questions.yaml index b0dbf97e741..c6637fc3260 100644 --- a/charts/incubator/speedtest-tracker/questions.yaml +++ b/charts/incubator/speedtest-tracker/questions.yaml @@ -6,18 +6,17 @@ questions: # Include{global} # Include{workload} # Include{workloadDeployment} - # Include{replicas1} # Include{podSpec} # Include{containerMain} # Include{containerBasic} # Include{containerAdvanced} - # Include{containerConfig} +# Include{podOptions} # Include{serviceRoot} - variable: main - label: Main Service - description: The Primary service on which the healthcheck runs, often the webUI + label: "Main Service" + description: "The Primary service on which the healthcheck runs, often the webUI" schema: additional_attrs: true type: dict @@ -25,14 +24,14 @@ questions: # Include{serviceSelectorLoadBalancer} # Include{serviceSelectorExtras} - variable: main - label: Main Service Port Configuration + 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 + label: "Port" + description: "This port exposes the container port on the service" schema: type: int default: 8765 @@ -43,8 +42,8 @@ questions: # Include{serviceList} # Include{persistenceRoot} - variable: config - label: App Config Storage - description: Stores the Application Configuration. + label: "App Config Storage" + description: "Stores the Application Configuration." schema: additional_attrs: true type: dict @@ -53,7 +52,7 @@ questions: # Include{persistenceList} # Include{ingressRoot} - variable: main - label: Main Ingress + label: "Main Ingress" schema: additional_attrs: true type: dict @@ -62,30 +61,28 @@ questions: # Include{ingressTLS} # Include{ingressTraefik} # Include{ingressList} - -# Include{podSecurityContextRoot} - - variable: runAsUser - label: runAsUser - description: The UserID of the user running the application - schema: - type: int - default: 0 - - variable: runAsGroup - label: runAsGroup - description: The groupID this App of the user running the application - schema: - type: int - default: 0 +# Include{securityContextRoot} + - variable: runAsUser + label: "runAsUser" + description: "The UserID of the user running the application" + schema: + type: int + default: 0 + - variable: runAsGroup + label: "runAsGroup" + description: "The groupID this App of the user running the application" + schema: + type: int + default: 0 # Include{securityContextContainer} # Include{securityContextAdvanced} # Include{securityContextPod} - - variable: fsGroup - label: fsGroup - description: The group that should own ALL storage. - schema: - type: int - default: 568 - + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 # Include{resources} # Include{advanced} # Include{addons} diff --git a/charts/incubator/speedtest-tracker/templates/NOTES.txt b/charts/incubator/speedtest-tracker/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/speedtest-tracker/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/speedtest-tracker/templates/common.yaml b/charts/incubator/speedtest-tracker/templates/common.yaml index c1a366e1cf0..b51394e00a4 100644 --- a/charts/incubator/speedtest-tracker/templates/common.yaml +++ b/charts/incubator/speedtest-tracker/templates/common.yaml @@ -1 +1 @@ -{{ include "tc.common.loader.all" . }} +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/incubator/speedtest-tracker/values.yaml b/charts/incubator/speedtest-tracker/values.yaml index e2454e66a66..2bbfd2c4aed 100644 --- a/charts/incubator/speedtest-tracker/values.yaml +++ b/charts/incubator/speedtest-tracker/values.yaml @@ -4,45 +4,51 @@ image: pullPolicy: IfNotPresent securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -env: - DB_CONNECTION: pgsql - DB_PORT: 5432 - DB_DATABASE: "{{ .Values.postgresql.postgresqlDatabase }}" - DB_USERNAME: "{{ .Values.postgresql.postgresqlUsername }}" - DB_HOST: - secretKeyRef: - name: dbcreds - key: plainhost - DB_PASSWORD: - secretKeyRef: - name: dbcreds - key: postgresql-password + container: + readOnlyRootFilesystem: false + runAsNonRoot: false + runAsUser: 0 + runAsGroup: 0 service: main: ports: main: port: 8765 - protocol: HTTPS + protocol: https targetPort: 443 +workload: + main: + enabled: true + primary: true + podSpec: + containers: + env: + DB_CONNECTION: pgsql + DB_PORT: 5432 + DB_DATABASE: "{{ .Values.cnpg.main.database }}" + DB_USERNAME: "{{ .Values.cnpg.main.user }}" + DB_HOST: + secretKeyRef: + name: cnpg-main-urls + key: std + DB_PASSWORD: + secretKeyRef: + name: cnpg-main-user + key: password + persistence: config: enabled: true mountPath: /config -postgresql: - enabled: true - existingSecret: dbcreds - postgresqlDatabase: speedtest_tracker - postgresqlUsername: speedtest_tracker +cnpg: + main: + enabled: true + user: speedtest_tracker + database: speedtest_tracker portal: - enabled: true + open: + enabled: true