Unify homelab proxies

This commit is contained in:
2025-08-08 21:07:25 +02:00
parent 489a48958e
commit 4ef5c5ea85
12 changed files with 12 additions and 29 deletions

View File

@@ -0,0 +1,14 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: chat-ui-ingress
namespace: chat-ui
spec:
entryPoints:
- websecure
routes:
- match: Host(`${CHATUI_DOMAIN}`)
kind: Rule
services:
- name: chat-ui-proxy
port: ${CHATUI_INTERNAL_PORT}

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: chat-ui-proxy
namespace: chat-ui
annotations:
tailscale.com/tailnet-fqdn: ${CHATUI_TAILNET_FQDN}
spec:
type: ExternalName
externalName: placeholder
ports:
- port: ${CHATUI_INTERNAL_PORT}
name: http

View File

@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: homelab-proxy
resources:
- ../../base/homelab-proxy
- chatui-ingress.yaml
- chatui-service.yaml
- llamactl-ingress.yaml
- llamactl-service.yaml

View File

@@ -0,0 +1,31 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: llamactl-ingress
namespace: llamactl
spec:
entryPoints:
- websecure
routes:
# Protected route for internal management API
- match: Host(`${LLAMACTL_DOMAIN}`) && PathPrefix(`/api/v1`)
kind: Rule
services:
- name: llamactl-proxy
port: ${LLAMACTL_INTERNAL_PORT}
middlewares:
- name: "auth-authelia@kubernetescrd"
# Unprotected route for OpenAI compatible API (uses API keys)
- match: Host(`${LLAMACTL_DOMAIN}`) && PathPrefix(`/v1`)
kind: Rule
services:
- name: llamactl-proxy
port: ${LLAMACTL_INTERNAL_PORT}
# Catch-all route
- match: Host(`${LLAMACTL_DOMAIN}`)
kind: Rule
services:
- name: llamactl-proxy
port: ${LLAMACTL_INTERNAL_PORT}
middlewares:
- name: "auth-authelia@kubernetescrd"

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: llamactl-proxy
namespace: llamactl
annotations:
tailscale.com/tailnet-fqdn: ${LLAMACTL_TAILNET_FQDN}
spec:
type: ExternalName
externalName: placeholder
ports:
- port: ${LLAMACTL_INTERNAL_PORT}
name: http