forked from roger/k3s-cluster
196 lines
4.6 KiB
YAML
196 lines
4.6 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: searxng
|
|
labels:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: searxng-config
|
|
namespace: searxng
|
|
labels:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
data:
|
|
settings.yml: |
|
|
use_default_settings: true
|
|
general:
|
|
instance_name: "SearXNG"
|
|
debug: false
|
|
search:
|
|
safe_search: 0
|
|
autocomplete: ""
|
|
default_lang: "en"
|
|
formats:
|
|
- html
|
|
server:
|
|
# secret_key is provided via the SEARXNG_SECRET env var from the searxng-secret Secret
|
|
limiter: false
|
|
image_proxy: true
|
|
bind_address: "0.0.0.0"
|
|
port: 8080
|
|
ui:
|
|
static_use_hash: true
|
|
valkey:
|
|
url: redis://searxng-redis:6379/0
|
|
engines:
|
|
- name: ahmia
|
|
disabled: true
|
|
- name: torch
|
|
disabled: true
|
|
limiter.toml: |
|
|
# SearXNG botdetection limiter config.
|
|
# The limiter is disabled in settings.yml (server.limiter: false); this file
|
|
# exists only to silence the "missing config file" warning. Defaults are used.
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: searxng-redis
|
|
namespace: searxng
|
|
labels:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
app.kubernetes.io/component: redis
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
app.kubernetes.io/component: redis
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
app.kubernetes.io/component: redis
|
|
spec:
|
|
containers:
|
|
- name: redis
|
|
image: redis:7-alpine
|
|
ports:
|
|
- containerPort: 6379
|
|
name: redis
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 64Mi
|
|
requests:
|
|
cpu: 25m
|
|
memory: 32Mi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: searxng-redis
|
|
namespace: searxng
|
|
labels:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
app.kubernetes.io/component: redis
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
app.kubernetes.io/component: redis
|
|
ports:
|
|
- name: redis
|
|
protocol: TCP
|
|
port: 6379
|
|
targetPort: 6379
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: searxng
|
|
namespace: searxng
|
|
labels:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
app.kubernetes.io/component: app
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
app.kubernetes.io/component: app
|
|
spec:
|
|
enableServiceLinks: false
|
|
containers:
|
|
- name: searxng
|
|
image: searxng/searxng:latest
|
|
env:
|
|
- name: SEARXNG_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: searxng-secret
|
|
key: SEARXNG_SECRET
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
volumeMounts:
|
|
- mountPath: /etc/searxng/settings.yml
|
|
name: searxng-config
|
|
subPath: settings.yml
|
|
- mountPath: /etc/searxng/limiter.toml
|
|
name: searxng-config
|
|
subPath: limiter.toml
|
|
resources:
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 8080
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 5
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
failureThreshold: 6
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
timeoutSeconds: 5
|
|
periodSeconds: 10
|
|
volumes:
|
|
- name: searxng-config
|
|
configMap:
|
|
name: searxng-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: searxng
|
|
namespace: searxng
|
|
labels:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
app.kubernetes.io/component: app
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: searxng
|
|
app.kubernetes.io/instance: searxng
|
|
app.kubernetes.io/component: app
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 8080
|
|
targetPort: 8080
|
|
type: ClusterIP
|