feat(apps): add searxng
Some checks failed
Check Kubernetes YAMLs / scan (push) Failing after 21s

This commit is contained in:
Lee 2024-09-24 07:01:24 +01:00
parent 602155cf53
commit 767985e5d5
6 changed files with 108 additions and 0 deletions

@ -0,0 +1,29 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: searxng
namespace: public-services
spec:
replicas: 1
selector:
matchLabels:
app: searxng
template:
metadata:
labels:
app: searxng
spec:
containers:
- name: searxng
image: docker.io/searxng/searxng:2024.9.23-6be56aee1
ports:
- containerPort: 8080
env:
- name: SEARXNG_BASE_URL
value: "https://search.fascinated.cc"
resources:
limits:
memory: "256Mi"
cpu: "500m"
restartPolicy: Always

@ -0,0 +1,21 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: searxng-ingress
namespace: public-services
annotations:
kubernetes.io/ingress.class: traefik-external
spec:
entryPoints:
- websecure
routes:
- match: Host(`search.fascinated.cc`)
kind: Rule
middlewares:
- name: default-headers
namespace: traefik
services:
- name: searxng-service
port: 8080
tls:
secretName: fascinated-cc

@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: public-services
resources:
- pvc.yaml
- redis-pod.yaml
- deployment.yaml
- service.yaml
- ingress.yaml

@ -0,0 +1,12 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: searxng-redis-pvc
namespace: public-services
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

@ -0,0 +1,23 @@
---
apiVersion: v1
kind: Pod
metadata:
name: searxng-redis
namespace: public-services
spec:
containers:
- name: redis
image: docker.io/valkey/valkey:8-alpine
command: ["valkey-server", "--save", "30", "1", "--loglevel", "warning"]
volumeMounts:
- name: redis-data
mountPath: /data
resources:
limits:
memory: "256Mi"
cpu: "500m"
restartPolicy: Always
volumes:
- name: redis-data
persistentVolumeClaim:
claimName: searxng-redis-pvc

@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: searxng-service
namespace: public-services
spec:
type: ClusterIP
ports:
- port: 8080
targetPort: 8080
selector:
app: searxng