apiVersion: v1
kind: Service
metadata:
  name: searxng-external
  namespace: ai
spec:
  type: ExternalName
  externalName: hey-search.home-apps.svc.cluster.local
---
apiVersion: v1
kind: Service
metadata:
  name: jackett-external
  namespace: ai
spec:
  type: ExternalName
  externalName: jackett.media.svc.cluster.local
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: internal-apps
  namespace: ai
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/whitelist-source-range: "127.0.0.1/32, 192.168.1.0/24"
spec:
  rules:
  - host: searxng.home-apps
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: searxng-external
            port:
              number: 8000
  - host: jackett.home-apps
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: jackett-external
            port:
              number: 80
