From 9964722f9be1c9a3c08e4755a0fd36460ba03b97 Mon Sep 17 00:00:00 2001 From: Xstar97 Date: Tue, 1 Nov 2022 20:16:35 -0400 Subject: [PATCH] fix(searx + searxng) code refactoring (#4273) * fix(searx + searxng) code refactoring * cleanup Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/incubator/searx/Chart.yaml | 15 +++---- charts/incubator/searx/questions.yaml | 53 +++++++++++++++--------- charts/incubator/searx/values.yaml | 16 +++++--- charts/incubator/searxng/Chart.yaml | 15 +++---- charts/incubator/searxng/questions.yaml | 54 ++++++++++++++----------- charts/incubator/searxng/values.yaml | 18 ++++++--- 6 files changed, 102 insertions(+), 69 deletions(-) diff --git a/charts/incubator/searx/Chart.yaml b/charts/incubator/searx/Chart.yaml index 444efc4f11e..2745aa47cd7 100644 --- a/charts/incubator/searx/Chart.yaml +++ b/charts/incubator/searx/Chart.yaml @@ -1,8 +1,3 @@ -annotations: - truecharts.org/SCALE-support: "true" - truecharts.org/catagories: | - - Productivity - - Other apiVersion: v2 appVersion: "latest" dependencies: @@ -10,7 +5,7 @@ dependencies: repository: https://library-charts.truecharts.org version: 10.7.7 deprecated: false -description: Searx is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled. Additionally, searx can be used over Tor for online anonymity. +description: Meta search engine which aggregates results from more than 70 search services. home: https://truecharts.org/docs/charts/incubator/searx icon: https://truecharts.org/img/hotlink-ok/chart-icons/searx.png keywords: @@ -28,4 +23,10 @@ sources: - https://github.com/asciimoo/searx - https://hub.docker.com/r/searx/searx/ type: application -version: 0.0.44 +version: 0.0.45 +annotations: + truecharts.org/catagories: | + - Productivity + - Other + truecharts.org/SCALE-support: "true" + truecharts.org/grade: U diff --git a/charts/incubator/searx/questions.yaml b/charts/incubator/searx/questions.yaml index 437062676af..a78f1a60e19 100644 --- a/charts/incubator/searx/questions.yaml +++ b/charts/incubator/searx/questions.yaml @@ -13,10 +13,23 @@ questions: # Include{controllerExpert} # Include{controllerExpertExtraArgs} # Include{containerConfig} + - variable: env + group: Container Configuration + label: Image Environment + schema: + additional_attrs: true + type: dict + attrs: + - variable: BASE_URL + label: Base URL + description: Set hostname https://search.mydomain.com + schema: + type: string + default: "" # 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 @@ -24,22 +37,22 @@ 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: 8080 required: true # Include{advancedPortTCP} - variable: targetPort - label: "Target Port" - description: "The internal(!) port on the container the Application runs on" + label: Target Port + description: The internal(!) port on the container the Application runs on schema: type: int default: 8080 @@ -49,8 +62,8 @@ questions: # Include{serviceList} # Include{persistenceRoot} - variable: config - label: "config Storage" - description: "Contain config files" + label: App Config Storage + description: Stores the Application Configuration. schema: additional_attrs: true type: dict @@ -60,7 +73,7 @@ questions: # Include{persistenceList} # Include{ingressRoot} - variable: main - label: "Main Ingress" + label: Main Ingress schema: additional_attrs: true type: dict @@ -73,42 +86,42 @@ questions: # Include{security} # Include{securityContextAdvancedRoot} - variable: privileged - label: "Privileged mode" + label: Privileged mode schema: type: boolean default: false - variable: readOnlyRootFilesystem - label: "ReadOnly Root Filesystem" + label: ReadOnly Root Filesystem schema: type: boolean default: false - variable: allowPrivilegeEscalation - label: "Allow Privilege Escalation" + label: Allow Privilege Escalation schema: type: boolean default: false - variable: runAsNonRoot - label: "runAsNonRoot" + label: runAsNonRoot schema: type: boolean default: false # Include{securityContextAdvanced} # Include{podSecurityContextRoot} - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" + 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" + 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." + label: fsGroup + description: The group that should own ALL storage. schema: type: int default: 568 diff --git a/charts/incubator/searx/values.yaml b/charts/incubator/searx/values.yaml index 138552ea499..8090e4e6d7b 100644 --- a/charts/incubator/searx/values.yaml +++ b/charts/incubator/searx/values.yaml @@ -1,18 +1,19 @@ -env: {} image: pullPolicy: IfNotPresent repository: tccr.io/truecharts/searx tag: latest@sha256:df4978aa7639d6cb2b34c5c30cc0bc05a132e17a34d2b174c401d6a65dcf741d -persistence: - config: - enabled: true - mountPath: /etc/searx + podSecurityContext: runAsGroup: 0 runAsUser: 0 + securityContext: readOnlyRootFilesystem: false runAsNonRoot: false + +env: + BASE_URL: "" + service: main: ports: @@ -21,5 +22,10 @@ service: protocol: TCP targetPort: 8080 +persistence: + config: + enabled: true + mountPath: /etc/searx + portal: enabled: true diff --git a/charts/incubator/searxng/Chart.yaml b/charts/incubator/searxng/Chart.yaml index 6a3661b33c6..b5aedcbce93 100644 --- a/charts/incubator/searxng/Chart.yaml +++ b/charts/incubator/searxng/Chart.yaml @@ -1,8 +1,3 @@ -annotations: - truecharts.org/SCALE-support: "true" - truecharts.org/catagories: | - - Productivity - - Other apiVersion: v2 appVersion: "latest" dependencies: @@ -10,7 +5,7 @@ dependencies: repository: https://library-charts.truecharts.org version: 10.7.7 deprecated: false -description: "SearXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled. Additionally, SearXNG can be used over Tor for online anonymity." +description: Meta search engine which aggregates results from more than 70 search services. home: https://truecharts.org/docs/charts/incubator/searxng icon: https://truecharts.org/img/hotlink-ok/chart-icons/searxng.png keywords: @@ -28,4 +23,10 @@ sources: - https://github.com/searxng/searxng - https://hub.docker.com/r/searxng/searxng type: application -version: 0.0.61 +version: 0.0.62 +annotations: + truecharts.org/catagories: | + - Productivity + - Other + truecharts.org/SCALE-support: "true" + truecharts.org/grade: U diff --git a/charts/incubator/searxng/questions.yaml b/charts/incubator/searxng/questions.yaml index 0dc541a52b4..b267e284916 100644 --- a/charts/incubator/searxng/questions.yaml +++ b/charts/incubator/searxng/questions.yaml @@ -13,23 +13,29 @@ questions: # Include{controllerExpert} # Include{controllerExpertExtraArgs} - variable: env - group: "Container Configuration" - label: "Image Environment" + group: Container Configuration + label: Image Environment schema: additional_attrs: true type: dict attrs: - variable: INSTANCE_NAME - label: "INSTANCE_NAME" - description: "Your SearXNG instance name" + label: Instance Name + description: Your SearXNG instance name + schema: + type: string + default: SearXng + - variable: BASE_URL + label: Base URL + description: Set base url like so https://search.mydomain.com schema: type: string default: "" # Include{containerConfig} # 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 @@ -37,22 +43,22 @@ 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: 8080 required: true # Include{advancedPortTCP} - variable: targetPort - label: "Target Port" - description: "The internal(!) port on the container the Application runs on" + label: Target Port + description: The internal(!) port on the container the Application runs on schema: type: int default: 8080 @@ -62,8 +68,8 @@ questions: # Include{serviceList} # Include{persistenceRoot} - variable: config - label: "config Storage" - description: "SearXNGs config location" + label: App Config Storage + description: Stores the Application Configuration. schema: additional_attrs: true type: dict @@ -73,7 +79,7 @@ questions: # Include{persistenceList} # Include{ingressRoot} - variable: main - label: "Main Ingress" + label: Main Ingress schema: additional_attrs: true type: dict @@ -86,42 +92,42 @@ questions: # Include{security} # Include{securityContextAdvancedRoot} - variable: privileged - label: "Privileged mode" + label: Privileged mode schema: type: boolean default: false - variable: readOnlyRootFilesystem - label: "ReadOnly Root Filesystem" + label: ReadOnly Root Filesystem schema: type: boolean default: false - variable: allowPrivilegeEscalation - label: "Allow Privilege Escalation" + label: Allow Privilege Escalation schema: type: boolean default: false - variable: runAsNonRoot - label: "runAsNonRoot" + label: runAsNonRoot schema: type: boolean default: false # Include{securityContextAdvanced} # Include{podSecurityContextRoot} - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" + 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" + 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." + label: fsGroup + description: The group that should own ALL storage. schema: type: int default: 568 diff --git a/charts/incubator/searxng/values.yaml b/charts/incubator/searxng/values.yaml index fec0ea3d998..0cc04f5904e 100644 --- a/charts/incubator/searxng/values.yaml +++ b/charts/incubator/searxng/values.yaml @@ -1,19 +1,20 @@ -env: - INSTANCE_NAME: "" image: pullPolicy: IfNotPresent repository: tccr.io/truecharts/searxng tag: latest@sha256:3a3d43fa9cb04f1c664b5a565097fd718a3050f07c1e4f8bf031e0d4f2436fbe -persistence: - config: - enabled: true - mountPath: /etc/searxng + +env: + BASE_URL: "" + INSTANCE_NAME: SearXng + podSecurityContext: runAsGroup: 0 runAsUser: 0 + securityContext: readOnlyRootFilesystem: false runAsNonRoot: false + service: main: ports: @@ -22,5 +23,10 @@ service: protocol: TCP targetPort: 8080 +persistence: + config: + enabled: true + mountPath: /etc/searxng + portal: enabled: true