diff --git a/community/searxng/1.0.0/Chart.lock b/community/searxng/1.0.0/Chart.lock new file mode 100644 index 0000000000..a6c095a482 --- /dev/null +++ b/community/searxng/1.0.0/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../common + version: 1.0.12 +digest: sha256:debd30721d09ae8293b1cbdd9d0115981d40b47908be3035fc3cf657c9d5eedb +generated: "2023-07-15T23:16:41.80942906+03:00" diff --git a/community/searxng/1.0.0/Chart.yaml b/community/searxng/1.0.0/Chart.yaml new file mode 100644 index 0000000000..98e80fb310 --- /dev/null +++ b/community/searxng/1.0.0/Chart.yaml @@ -0,0 +1,25 @@ +name: searxng +description: SearXNG is a privacy-respecting, hackable metasearch engine +annotations: + title: SearXNG +type: application +version: 1.0.0 +apiVersion: v2 +appVersion: 2023.7.7 +kubeVersion: '>=1.16.0-0' +maintainers: + - name: truenas + url: https://www.truenas.com/ + email: dev@ixsystems.com +dependencies: + - name: common + repository: file://../../../common + version: 1.0.12 +home: https://github.com/searxng/searxng +icon: https://raw.githubusercontent.com/searxng/searxng/master/src/brand/searxng.svg +sources: + - https://hub.docker.com/r/searxng/searxng + - https://github.com/truenas/charts/tree/master/library/ix-dev/community/searxng + - https://github.com/searxng/searxng +keywords: + - search diff --git a/community/searxng/1.0.0/README.md b/community/searxng/1.0.0/README.md new file mode 100644 index 0000000000..0512acbff1 --- /dev/null +++ b/community/searxng/1.0.0/README.md @@ -0,0 +1,3 @@ +# SearXNG + +[SearXNG](https://github.com/searxng/searxng) is a privacy-respecting, hackable metasearch engine diff --git a/community/searxng/1.0.0/app-readme.md b/community/searxng/1.0.0/app-readme.md new file mode 100644 index 0000000000..0512acbff1 --- /dev/null +++ b/community/searxng/1.0.0/app-readme.md @@ -0,0 +1,3 @@ +# SearXNG + +[SearXNG](https://github.com/searxng/searxng) is a privacy-respecting, hackable metasearch engine diff --git a/community/searxng/1.0.0/charts/common-1.0.12.tgz b/community/searxng/1.0.0/charts/common-1.0.12.tgz new file mode 100644 index 0000000000..4823bbc188 Binary files /dev/null and b/community/searxng/1.0.0/charts/common-1.0.12.tgz differ diff --git a/community/searxng/1.0.0/ci/basic-values.yaml b/community/searxng/1.0.0/ci/basic-values.yaml new file mode 100644 index 0000000000..c7d1640951 --- /dev/null +++ b/community/searxng/1.0.0/ci/basic-values.yaml @@ -0,0 +1,10 @@ +searxngConfig: + instanceName: SearXNG-Test + +searxngNetwork: + webPort: 31000 + +searxngStorage: + config: + type: hostPath + hostPath: /mnt/{{ .Release.Namespace }}/config diff --git a/community/searxng/1.0.0/ci/extra-values.yaml b/community/searxng/1.0.0/ci/extra-values.yaml new file mode 100644 index 0000000000..3ecafccce8 --- /dev/null +++ b/community/searxng/1.0.0/ci/extra-values.yaml @@ -0,0 +1,14 @@ +searxngNetwork: + webPort: 31000 + +searxngStorage: + config: + type: hostPath + hostPath: /mnt/{{ .Release.Namespace }}/config + additionalStorages: + - type: hostPath + hostPath: /mnt/{{ .Release.Namespace }}/data1 + mountPath: /data1 + - type: hostPath + hostPath: /mnt/{{ .Release.Namespace }}/data2 + mountPath: /data2 diff --git a/community/searxng/1.0.0/ci/hostNet-values.yaml b/community/searxng/1.0.0/ci/hostNet-values.yaml new file mode 100644 index 0000000000..555a1ffc98 --- /dev/null +++ b/community/searxng/1.0.0/ci/hostNet-values.yaml @@ -0,0 +1,8 @@ +searxngNetwork: + webPort: 30000 + hostNetwork: true + +searxngStorage: + config: + type: hostPath + hostPath: /mnt/{{ .Release.Namespace }}/config diff --git a/community/searxng/1.0.0/ix_values.yaml b/community/searxng/1.0.0/ix_values.yaml new file mode 100644 index 0000000000..94330bb6ef --- /dev/null +++ b/community/searxng/1.0.0/ix_values.yaml @@ -0,0 +1,23 @@ +image: + repository: searxng/searxng + pullPolicy: IfNotPresent + tag: 2023.7.7-cada89ee + +resources: + limits: + cpu: 4000m + memory: 8Gi + +searxngConfig: + instanceName: SearXNG + additionalEnvs: [] + +searxngNetwork: + webPort: 30053 + hostNetwork: false + +searxngStorage: + config: + type: ixVolume + datasetName: config + additionalStorages: [] diff --git a/community/searxng/1.0.0/metadata.yaml b/community/searxng/1.0.0/metadata.yaml new file mode 100644 index 0000000000..802e3508b2 --- /dev/null +++ b/community/searxng/1.0.0/metadata.yaml @@ -0,0 +1,12 @@ +runAsContext: + - userName: searxng + groupName: searxng + gid: 0 + uid: 0 + description: SearXNG requires root privileges to start it's sub-processes. +capabilities: + - name: SETUID + description: SearXNG requires this ability to switch user for sub-processes. + - name: SETGID + description: SearXNG requires this ability to switch group for sub-processes. +hostMounts: [] diff --git a/community/searxng/1.0.0/questions.yaml b/community/searxng/1.0.0/questions.yaml new file mode 100644 index 0000000000..d71ee75c0d --- /dev/null +++ b/community/searxng/1.0.0/questions.yaml @@ -0,0 +1,215 @@ +groups: + - name: SearXNG Configuration + description: Configure SearXNG + - name: Network Configuration + description: Configure Network for SearXNG + - name: Storage Configuration + description: Configure Storage for SearXNG + - name: Resources Configuration + description: Configure Resources for SearXNG + +portals: + web_portal: + protocols: + - "$kubernetes-resource_configmap_portal_protocol" + host: + - "$kubernetes-resource_configmap_portal_host" + ports: + - "$kubernetes-resource_configmap_portal_port" + path: "$kubernetes-resource_configmap_portal_path" + +questions: + - variable: searxngConfig + label: "" + group: SearXNG Configuration + schema: + type: dict + attrs: + - variable: instanceName + label: Instance Name + description: The name of the SearXNG instance. + schema: + type: string + default: "SearXNG" + required: true + - variable: additionalEnvs + label: Additional Environment Variables + description: Configure additional environment variables for SearXNG. + schema: + type: list + default: [] + items: + - variable: env + label: Environment Variable + schema: + type: dict + attrs: + - variable: name + label: Name + schema: + type: string + required: true + - variable: value + label: Value + schema: + type: string + required: true + + - variable: searxngNetwork + label: "" + group: Network Configuration + schema: + type: dict + attrs: + - variable: webPort + label: Web Port + description: The port for the SearXNG Web UI. + schema: + type: int + default: 30053 + min: 9000 + max: 65535 + required: true + - variable: hostNetwork + label: Host Network + description: | + Bind to the host network. It's recommended to keep this disabled.
+ schema: + type: boolean + default: false + + - variable: searxngStorage + label: "" + group: Storage Configuration + schema: + type: dict + attrs: + - variable: config + label: SearXNG Config Storage + description: The path to store SearXNG Configuration. + schema: + type: dict + attrs: + - variable: type + label: Type + description: | + ixVolume: Is dataset created automatically by the system.
+ Host Path: Is a path that already exists on the system. + schema: + type: string + required: true + default: "ixVolume" + enum: + - value: "hostPath" + description: Host Path (Path that already exists on the system) + - value: "ixVolume" + description: ixVolume (Dataset created automatically by the system) + - variable: datasetName + label: Dataset Name + schema: + type: string + show_if: [["type", "=", "ixVolume"]] + required: true + hidden: true + immutable: true + default: "config" + $ref: + - "normalize/ixVolume" + - variable: hostPath + label: Host Path + schema: + type: hostpath + show_if: [["type", "=", "hostPath"]] + immutable: true + required: true + - variable: additionalStorages + label: Additional Storage + description: Additional storage for SearXNG. + schema: + type: list + default: [] + items: + - variable: storageEntry + label: Storage Entry + schema: + type: dict + attrs: + - variable: type + label: Type + description: | + ixVolume: Is dataset created automatically by the system.
+ Host Path: Is a path that already exists on the system. + schema: + type: string + required: true + default: "ixVolume" + enum: + - value: "hostPath" + description: Host Path (Path that already exists on the system) + - value: "ixVolume" + description: ixVolume (Dataset created automatically by the system) + - variable: mountPath + label: Mount Path + description: The path inside the container to mount the storage. + schema: + type: path + required: true + - variable: hostPath + label: Host Path + description: The host path to use for storage. + schema: + type: hostpath + show_if: [["type", "=", "hostPath"]] + required: true + - variable: datasetName + label: Dataset Name + description: The name of the dataset to use for storage. + schema: + type: string + show_if: [["type", "=", "ixVolume"]] + required: true + immutable: true + default: "storage_entry" + $ref: + - "normalize/ixVolume" + + - variable: resources + group: Resources Configuration + label: "" + schema: + type: dict + attrs: + - variable: limits + label: Limits + schema: + type: dict + attrs: + - variable: cpu + label: CPU + description: CPU limit for SearXNG. + schema: + type: string + max_length: 6 + valid_chars: '^(0\.[1-9]|[1-9][0-9]*)(\.[0-9]|m?)$' + valid_chars_error: | + Valid CPU limit formats are
+ - Plain Integer - eg. 1
+ - Float - eg. 0.5
+ - Milicpu - eg. 500m + default: "4000m" + required: true + - variable: memory + label: Memory + description: Memory limit for SearXNG. + schema: + type: string + max_length: 12 + valid_chars: '^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$' + valid_chars_error: | + Valid Memory limit formats are
+ - Suffixed with E/P/T/G/M/K - eg. 1G
+ - Suffixed with Ei/Pi/Ti/Gi/Mi/Ki - eg. 1Gi
+ - Plain Integer in bytes - eg. 1024
+ - Exponent - eg. 134e6 + default: "8Gi" + required: true diff --git a/community/searxng/1.0.0/templates/NOTES.txt b/community/searxng/1.0.0/templates/NOTES.txt new file mode 100644 index 0000000000..ba4e01146c --- /dev/null +++ b/community/searxng/1.0.0/templates/NOTES.txt @@ -0,0 +1 @@ +{{ include "ix.v1.common.lib.chart.notes" $ }} diff --git a/community/searxng/1.0.0/templates/_persistence.tpl b/community/searxng/1.0.0/templates/_persistence.tpl new file mode 100644 index 0000000000..a79f5fe5d7 --- /dev/null +++ b/community/searxng/1.0.0/templates/_persistence.tpl @@ -0,0 +1,34 @@ +{{- define "searxng.persistence" -}} +persistence: + config: + enabled: true + type: {{ .Values.searxngStorage.config.type }} + datasetName: {{ .Values.searxngStorage.config.datasetName | default "" }} + hostPath: {{ .Values.searxngStorage.config.hostPath | default "" }} + targetSelector: + searxng: + searxng: + mountPath: /etc/searxng + 01-permissions: + mountPath: /mnt/directories/searxng + tmp: + enabled: true + type: emptyDir + targetSelector: + searxng: + searxng: + mountPath: /tmp + {{- range $idx, $storage := .Values.searxngStorage.additionalStorages }} + {{ printf "searxng-%v" (int $idx) }}: + enabled: true + type: {{ $storage.type }} + datasetName: {{ $storage.datasetName | default "" }} + hostPath: {{ $storage.hostPath | default "" }} + targetSelector: + searxng: + searxng: + mountPath: {{ $storage.mountPath }} + 01-permissions: + mountPath: /mnt/directories{{ $storage.mountPath }} + {{- end }} +{{- end -}} diff --git a/community/searxng/1.0.0/templates/_portal.tpl b/community/searxng/1.0.0/templates/_portal.tpl new file mode 100644 index 0000000000..fd4b0edea7 --- /dev/null +++ b/community/searxng/1.0.0/templates/_portal.tpl @@ -0,0 +1,12 @@ +{{- define "searxng.portal" -}} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal +data: + path: "/" + port: {{ .Values.searxngNetwork.webPort | quote }} + protocol: http + host: $node_ip +{{- end -}} diff --git a/community/searxng/1.0.0/templates/_searxng.tpl b/community/searxng/1.0.0/templates/_searxng.tpl new file mode 100644 index 0000000000..883975de24 --- /dev/null +++ b/community/searxng/1.0.0/templates/_searxng.tpl @@ -0,0 +1,48 @@ +{{- define "searxng.workload" -}} +workload: + searxng: + enabled: true + primary: true + type: Deployment + podSpec: + hostNetwork: {{ .Values.searxngNetwork.hostNetwork }} + containers: + searxng: + enabled: true + primary: true + imageSelector: image + securityContext: + runAsUser: 0 + runAsGroup: 0 + runAsNonRoot: false + capabilities: + add: + - SETUID + - SETGID + env: + BIND_ADDRESS: {{ printf "0.0.0.0:%v" .Values.searxngNetwork.webPort }} + INSTANCE_NAME: {{ .Values.searxngConfig.instanceName }} + {{ with .Values.searxngConfig.additionalEnvs }} + envList: + {{ range $env := . }} + - name: {{ $env.name }} + value: {{ $env.value }} + {{ end }} + {{ end }} + probes: + liveness: + enabled: true + type: http + port: "{{ .Values.searxngNetwork.webPort }}" + path: /healthz + readiness: + enabled: true + type: http + port: "{{ .Values.searxngNetwork.webPort }}" + path: /healthz + startup: + enabled: true + type: http + port: "{{ .Values.searxngNetwork.webPort }}" + path: /healthz +{{- end -}} diff --git a/community/searxng/1.0.0/templates/_service.tpl b/community/searxng/1.0.0/templates/_service.tpl new file mode 100644 index 0000000000..8a6c959eed --- /dev/null +++ b/community/searxng/1.0.0/templates/_service.tpl @@ -0,0 +1,15 @@ +{{- define "searxng.service" -}} +service: + searxng: + enabled: true + primary: true + type: NodePort + targetSelector: searxng + ports: + webui: + enabled: true + primary: true + port: {{ .Values.searxngNetwork.webPort }} + nodePort: {{ .Values.searxngNetwork.webPort }} + targetSelector: searxng +{{- end -}} diff --git a/community/searxng/1.0.0/templates/common.yaml b/community/searxng/1.0.0/templates/common.yaml new file mode 100644 index 0000000000..85143ea812 --- /dev/null +++ b/community/searxng/1.0.0/templates/common.yaml @@ -0,0 +1,11 @@ +{{- include "ix.v1.common.loader.init" . -}} + +{{/* Merge the templates with Values */}} +{{- $_ := mustMergeOverwrite .Values (include "searxng.workload" $ | fromYaml) -}} +{{- $_ := mustMergeOverwrite .Values (include "searxng.service" $ | fromYaml) -}} +{{- $_ := mustMergeOverwrite .Values (include "searxng.persistence" $ | fromYaml) -}} + +{{/* Create the configmap for portal manually*/}} +{{- include "searxng.portal" $ -}} + +{{- include "ix.v1.common.loader.apply" . -}} diff --git a/community/searxng/item.yaml b/community/searxng/item.yaml new file mode 100644 index 0000000000..0abef573ae --- /dev/null +++ b/community/searxng/item.yaml @@ -0,0 +1,6 @@ +icon_url: https://raw.githubusercontent.com/searxng/searxng/master/src/brand/searxng.svg +categories: + - productivity +screenshots: [] +tags: + - search