apiVersion: apps/v1
kind: Deployment
metadata:
  name: searxng-browser
  labels:
    app.kubernetes.io/controller: browser
    app.kubernetes.io/instance: searxng
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: searxng
    helm.sh/chart: searxng-5.0.1
  namespace: searxng
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: browser
      app.kubernetes.io/name: searxng
      app.kubernetes.io/instance: searxng
  template:
    metadata:
      annotations:
        checksum/secrets: bde85bf0e789068912500ddf7c5550674cdb1be7ed7ca049a3028a5c3e5a64e4
      labels:
        app.kubernetes.io/controller: browser
        app.kubernetes.io/instance: searxng
        app.kubernetes.io/name: searxng
    spec:
      enableServiceLinks: false
      serviceAccountName: searxng
      automountServiceAccountToken: false
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - env:
            - name: SEARXNG_BASE_URL
              value: https://searxng.alexlebens.net/
            - name: SEARXNG_QUERY_URL
              value: https://searxng.alexlebens.net/search?q=<query>
            - name: SEARXNG_HOSTNAME
              value: searxng.alexlebens.net
            - name: SEARXNG_VALKEY_URL
              value: valkey://localhost:6379/0
            - name: GRANIAN_HOST
              value: 0.0.0.0
            - name: GRANIAN_PORT
              value: "8080"
          image: searxng/searxng:latest@sha256:d137e9b7877b7982c5e8ccf878fda0a05d3c8564ebace7f66424a5a19a3c29d9
          name: main
          resources:
            requests:
              cpu: 10m
              memory: 250Mi
          volumeMounts:
            - mountPath: /etc/searxng
              name: browser-data
        - image: valkey/valkey:9.1.0-alpine@sha256:a35428eba9043cc0b79dbe54100f0c92784f2de00ad09b01182bfb1c5c83d1bd
          name: valkey
          volumeMounts:
            - mountPath: /data
              name: valkey-data
      volumes:
        - name: browser-data
          persistentVolumeClaim:
            claimName: searxng-browser-data
        - name: valkey-data
          persistentVolumeClaim:
            claimName: searxng-valkey-data
