From cd35c18b76eb40029d209919edf66cae44b39531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?OpenSpeedTest=E2=84=A2=EF=B8=8F?= <51720450+openspeedtest@users.noreply.github.com> Date: Sat, 25 Jun 2022 22:34:16 +0530 Subject: [PATCH] feat(openspeedtest): Add OpenSpeedTest (#2978) * Added OpenSpeedTest * Changed Chart.yaml * Moved to incubator * modified Chart.yaml questions.yaml values.yaml * persistence deleted * Update charts/incubator/openspeedtest/values.yaml * run as root * empty lines * Update charts/incubator/openspeedtest/values.yaml Co-authored-by: Kjeld Schouten-Lebbing * Update charts/incubator/openspeedtest/values.yaml Co-authored-by: Vishnu Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Kjeld Schouten-Lebbing --- charts/incubator/openspeedtest/.helmignore | 24 ++ charts/incubator/openspeedtest/CHANGELOG.md | 0 charts/incubator/openspeedtest/CONFIG.md | 7 + charts/incubator/openspeedtest/Chart.yaml | 30 ++ charts/incubator/openspeedtest/README.md | 37 +++ charts/incubator/openspeedtest/helm-values.md | 27 ++ charts/incubator/openspeedtest/questions.yaml | 263 ++++++++++++++++++ charts/incubator/openspeedtest/security.md | 0 .../openspeedtest/templates/common.yaml | 1 + charts/incubator/openspeedtest/values.yaml | 28 ++ 10 files changed, 417 insertions(+) create mode 100644 charts/incubator/openspeedtest/.helmignore create mode 100644 charts/incubator/openspeedtest/CHANGELOG.md create mode 100644 charts/incubator/openspeedtest/CONFIG.md create mode 100644 charts/incubator/openspeedtest/Chart.yaml create mode 100644 charts/incubator/openspeedtest/README.md create mode 100644 charts/incubator/openspeedtest/helm-values.md create mode 100644 charts/incubator/openspeedtest/questions.yaml create mode 100644 charts/incubator/openspeedtest/security.md create mode 100644 charts/incubator/openspeedtest/templates/common.yaml create mode 100644 charts/incubator/openspeedtest/values.yaml diff --git a/charts/incubator/openspeedtest/.helmignore b/charts/incubator/openspeedtest/.helmignore new file mode 100644 index 00000000000..e559de0a012 --- /dev/null +++ b/charts/incubator/openspeedtest/.helmignore @@ -0,0 +1,24 @@ +# 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 diff --git a/charts/incubator/openspeedtest/CHANGELOG.md b/charts/incubator/openspeedtest/CHANGELOG.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/charts/incubator/openspeedtest/CONFIG.md b/charts/incubator/openspeedtest/CONFIG.md new file mode 100644 index 00000000000..c147b7c819c --- /dev/null +++ b/charts/incubator/openspeedtest/CONFIG.md @@ -0,0 +1,7 @@ +# Configuration Options + +##### Connecting to other apps +If you need to connect this App to other Apps on TrueNAS SCALE, please refer to our [Linking Apps Internally](https://truecharts.org/manual/Quick-Start%20Guides/06-linking-apps/) quick-start guide. + +##### Available config options +In the future this page is going to contain an automated list of options available in the installation/edit UI. diff --git a/charts/incubator/openspeedtest/Chart.yaml b/charts/incubator/openspeedtest/Chart.yaml new file mode 100644 index 00000000000..8d3b883bfaf --- /dev/null +++ b/charts/incubator/openspeedtest/Chart.yaml @@ -0,0 +1,30 @@ +apiVersion: v2 +appVersion: "0.20.1216" +dependencies: +- name: common + repository: https://library-charts.truecharts.org + version: 10.1.4 +deprecated: false +description: HTML5 Network Speed Test Server. You can test download & upload speed from any device within your network with a web browser that is IE10 or new. +home: https://github.com/truecharts/apps/tree/master/charts/stable/openspeedtest +icon: https://truecharts.org/_static/img/appicons/openspeedtest.png +keywords: +- speedtest +- speed test +- openspeedtest +kubeVersion: '>=1.16.0-0' +maintainers: +- email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: openspeedtest +sources: +- https://github.com/openspeedtest/Speed-Test +type: application +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - utilities + - test + truecharts.org/SCALE-support: "true" + truecharts.org/grade: U diff --git a/charts/incubator/openspeedtest/README.md b/charts/incubator/openspeedtest/README.md new file mode 100644 index 00000000000..4da63adfc66 --- /dev/null +++ b/charts/incubator/openspeedtest/README.md @@ -0,0 +1,37 @@ +# Introduction + +HTML5 Network Speed Test Server. You can test download & upload speed from any device within your network with a web browser that is IE10 or new. + +TrueCharts are designed to be installed as TrueNAS SCALE app only. We can not guarantee this charts works as a stand-alone helm installation. +**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/apps/issues/new/choose)** + +## Source Code + +* + +## Requirements + +Kubernetes: `>=1.16.0-0` + +## Dependencies + +| Repository | Name | Version | +|------------|------|---------| +| https://library-charts.truecharts.org | common | 10.1.1 | + +## Installing the Chart + +To install this App on TrueNAS SCALE check our [Quick-Start Guide](https://truecharts.org/manual/Quick-Start%20Guides/02-Installing-an-App/). + +## Upgrading, Rolling Back and Uninstalling the Chart + +To upgrade, rollback or delete this App from TrueNAS SCALE check our [Quick-Start Guide](https://truecharts.org/manual/Quick-Start%20Guides/04-Upgrade-rollback-delete-an-App/). + +## Support + +- Please check our [quick-start guides](https://truecharts.org/manual/Quick-Start%20Guides/01-Adding-TrueCharts/) first. +- See the [Wiki](https://truecharts.org) +- Check our [Discord](https://discord.gg/tVsPTHWTtr) +- Open a [issue](https://github.com/truecharts/apps/issues/new/choose) +--- +All Rights Reserved - The TrueCharts Project diff --git a/charts/incubator/openspeedtest/helm-values.md b/charts/incubator/openspeedtest/helm-values.md new file mode 100644 index 00000000000..3ebe58473cb --- /dev/null +++ b/charts/incubator/openspeedtest/helm-values.md @@ -0,0 +1,27 @@ +# Default Helm-Values + +TrueCharts is primarily build to supply TrueNAS SCALE Apps. +However, we also supply all Apps as standard Helm-Charts. In this document we aim to document the default values in our values.yaml file. + +Most of our Apps also consume our "common" Helm Chart. +If this is the case, this means that all values.yaml values are set to the common chart values.yaml by default. This values.yaml file will only contain values that deviate from the common chart. +You will, however, be able to use all values referenced in the common chart here, besides the values listed in this document. + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"tccr.io/truecharts/openspeedtest"` | | +| image.tag | string | `"v0.20.781@sha256:96eae64bdf60250418ef7581fa5387c58b2c5963be19582ebc4151ccacc7c488"` | | +| persistence.config.enabled | bool | `true` | | +| persistence.config.mountPath | string | `"/config"` | | +| probes.liveness.path | string | `"/"` | | +| probes.readiness.path | string | `"/"` | | +| probes.startup.path | string | `"/"` | | +| securityContext.readOnlyRootFilesystem | bool | `false` | | +| service.main.ports.main.port | int | `3000` | | +| service.main.ports.main.targetPort | int | `3000` | | +| service.main.protocol | string | `"HTTP"` | | + +All Rights Reserved - The TrueCharts Project diff --git a/charts/incubator/openspeedtest/questions.yaml b/charts/incubator/openspeedtest/questions.yaml new file mode 100644 index 00000000000..b4f73c25f3e --- /dev/null +++ b/charts/incubator/openspeedtest/questions.yaml @@ -0,0 +1,263 @@ +# Include{groups} +portals: + open: + protocols: + - "$kubernetes-resource_configmap_portal_protocol" + host: + - "$kubernetes-resource_configmap_portal_host" + ports: + - "$kubernetes-resource_configmap_portal_port" +questions: + - variable: portal + group: "Container Image" + label: "Configure Portal Button" + schema: + type: dict + hidden: true + attrs: + - variable: enabled + label: "Enable" + description: "enable the portal button" + schema: + hidden: true + editable: false + type: boolean + default: true +# Include{global} + + - variable: controller + group: "Controller" + label: "" + schema: + additional_attrs: true + type: dict + attrs: + - variable: advanced + label: "Show Advanced Controller Settings" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: type + description: "Please specify type of workload to deploy" + label: "(Advanced) Controller Type" + schema: + type: string + default: "deployment" + required: true + enum: + - value: "deployment" + description: "Deployment" + - value: "statefulset" + description: "Statefulset" + - value: "daemonset" + description: "Daemonset" + - variable: replicas + description: "Number of desired pod replicas" + label: "Desired Replicas" + schema: + type: int + default: 1 + required: true + - variable: strategy + description: "Please specify type of workload to deploy" + label: "(Advanced) Update Strategy" + schema: + type: string + default: "RollingUpdate" + required: true + enum: + - value: "Recreate" + description: "Recreate: Kill existing pods before creating new ones" + - value: "RollingUpdate" + description: "RollingUpdate: Create new pods and then kill old ones" + - value: "OnDelete" + description: "(Legacy) OnDelete: ignore .spec.template changes" +# Include{controllerExpert} + +# Include{containerConfig} + + - variable: service + group: "Networking and Services" + label: "Configure Service(s)" + schema: + additional_attrs: true + type: dict + attrs: + - 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{serviceSelector} + - 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: 10250 + required: true + - variable: advanced + label: "Show Advanced settings" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: enabled + label: "Enable the port" + schema: + type: boolean + default: true + - variable: protocol + label: "Port Type" + schema: + type: string + default: "HTTP" + enum: + - value: HTTP + description: "HTTP" + - value: "HTTPS" + description: "HTTPS" + - value: TCP + description: "TCP" + - value: "UDP" + description: "UDP" + - variable: nodePort + label: "Node Port (Optional)" + description: "This port gets exposed to the node. Only considered when service type is NodePort, Simple or LoadBalancer" + schema: + type: int + min: 9000 + max: 65535 + - variable: targetPort + label: "Target Port" + description: "The internal(!) port on the container the Application runs on" + schema: + type: int + default: 3000 + + - variable: serviceexpert + group: "Networking and Services" + label: "Show Expert Config" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostNetwork + group: "Networking and Services" + label: "Host-Networking (Complicated)" + schema: + type: boolean + default: false + +# Include{serviceExpert} + +# Include{serviceList} + +# Include{persistenceList} + + - variable: ingress + label: "" + group: "Ingress" + schema: + additional_attrs: true + type: dict + attrs: + - variable: main + label: "Main Ingress" + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} + +# Include{ingressTLS} + +# Include{ingressTraefik} + +# Include{ingressExpert} + +# Include{ingressList} + +# Include{security} + + - variable: advancedSecurity + label: "Show Advanced Security Settings" + group: "Security and Permissions" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: securityContext + label: "Security Context" + schema: + additional_attrs: true + type: dict + attrs: + - 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: false +# Include{securityContextAdvanced} + + - variable: podSecurityContext + group: "Security and Permissions" + label: "Pod Security Context" + schema: + additional_attrs: true + type: dict + attrs: + - 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 + - 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} diff --git a/charts/incubator/openspeedtest/security.md b/charts/incubator/openspeedtest/security.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/charts/incubator/openspeedtest/templates/common.yaml b/charts/incubator/openspeedtest/templates/common.yaml new file mode 100644 index 00000000000..c1a366e1cf0 --- /dev/null +++ b/charts/incubator/openspeedtest/templates/common.yaml @@ -0,0 +1 @@ +{{ include "tc.common.loader.all" . }} diff --git a/charts/incubator/openspeedtest/values.yaml b/charts/incubator/openspeedtest/values.yaml new file mode 100644 index 00000000000..49b8a1bb1f8 --- /dev/null +++ b/charts/incubator/openspeedtest/values.yaml @@ -0,0 +1,28 @@ +image: + repository: tccr.io/truecharts/openspeedtest + pullPolicy: IfNotPresent + tag: latest@sha256:5deed4a03b5695bc6e46b9aef474567e29941bc557406315c3632be401b85e00 + +securityContext: + readOnlyRootFilesystem: false + runAsNonRoot: false + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +service: + main: + protocol: HTTP + ports: + main: + targetPort: 3000 + port: 10250 + +probes: + liveness: + path: "/" + readiness: + path: "/" + startup: + path: "/"