From bf98e2055e71879a1c51efab8c8d8fec1b508532 Mon Sep 17 00:00:00 2001 From: ION606 Date: Sat, 13 Sep 2025 22:13:34 -0400 Subject: [PATCH] final attempt before I give up for today --- apps/values/openwebui.yaml | 59 ++++++++++++++------------- apps/values/searxng.yaml | 29 ++++++------- manifests/browser/deployment.yaml | 61 ++++++++++++++-------------- manifests/coderunner/deployment.yaml | 33 ++++++++------- manifests/rag-server/deployment.yaml | 16 ++++---- manifests/tools/deployment.yaml | 54 ++++++++++++------------ 6 files changed, 128 insertions(+), 124 deletions(-) diff --git a/apps/values/openwebui.yaml b/apps/values/openwebui.yaml index b228c98..558ae80 100644 --- a/apps/values/openwebui.yaml +++ b/apps/values/openwebui.yaml @@ -1,39 +1,40 @@ image: - repository: ghcr.io/open-webui/open-webui - tag: "main" - pullPolicy: IfNotPresent + repository: ghcr.io/open-webui/open-webui + tag: "main" + pullPolicy: IfNotPresent service: - type: ClusterIP # use Ingress for external access + type: NodePort # use NodePort instead of ClusterIP so openwebui is accessible externally + nodePort: 30400 persistence: - enabled: true - size: 5Gi + enabled: true + size: 5Gi ingress: - enabled: true # expose via nginx ingress - className: nginx - hosts: - - host: openwebui.local - paths: - - path: / - pathType: Prefix - tls: [] # no https for local/minikube + enabled: false # disable ingress since we'll use NodePort + className: nginx + hosts: + - host: openwebui.local + paths: + - path: / + pathType: Prefix + tls: [] # no https for local/minikube # NO SECRETS!!! extraEnvVars: - - name: OLLAMA_BASE_URL - value: "https://mlep.ion606.com" - # postgres === primary db - - name: DATABASE_URL - value: "postgresql://postgres:mypassword@postgresql-primary.ai.svc.cluster.local:5432/openwebui" - # store vectors in pgvector (on the same postgres) - - name: VECTOR_DB - value: "pgvector" - - name: PGVECTOR_DB_URL - value: "postgresql://postgres:mypassword@postgresql-primary.ai.svc.cluster.local:5432/openwebui" - - name: PGVECTOR_CREATE_EXTENSION - value: "true" - # no bish - # - name: WEBUI_URL - # value: "http://openwebui.local" + - name: OLLAMA_BASE_URL + value: "https://mlep.ion606.com" + # postgres === primary db + - name: DATABASE_URL + value: "postgresql://postgres:mypassword@postgresql-primary.ai.svc.cluster.local:5432/openwebui" + # store vectors in pgvector (on the same postgres) + - name: VECTOR_DB + value: "pgvector" + - name: PGVECTOR_DB_URL + value: "postgresql://postgres:mypassword@postgresql-primary.ai.svc.cluster.local:5432/openwebui" + - name: PGVECTOR_CREATE_EXTENSION + value: "true" +# no bish +# - name: WEBUI_URL +# value: "http://openwebui.local" \ No newline at end of file diff --git a/apps/values/searxng.yaml b/apps/values/searxng.yaml index 1e23cd9..c79d466 100644 --- a/apps/values/searxng.yaml +++ b/apps/values/searxng.yaml @@ -1,20 +1,21 @@ image: - repository: searxng/searxng - tag: "latest" + repository: searxng/searxng + tag: "latest" service: - type: NodePort # or ClusterIP if using ingress - # nodePort: 30081 + type: NodePort # expose service externally + nodePort: 30081 ingress: - enabled: false - className: nginx - hosts: - - host: searxng.local - paths: - - path: / - pathType: Prefix + enabled: false + className: nginx + hosts: + - host: searxng.local + paths: + - path: / + pathType: Prefix + # env: -# SEARXNG_SECRET: "please-change-me" -# # helps with URL generation & results links -# BASE_URL: "http://searxng.local/" +# SEARXNG_SECRET: "please-change-me" +# # helps with URL generation & results links +# BASE_URL: "http://searxng.local/" \ No newline at end of file diff --git a/manifests/browser/deployment.yaml b/manifests/browser/deployment.yaml index 98aea45..5d7711b 100644 --- a/manifests/browser/deployment.yaml +++ b/manifests/browser/deployment.yaml @@ -2,39 +2,38 @@ apiVersion: apps/v1 kind: Deployment metadata: { name: browser, namespace: ai } spec: - replicas: 1 - selector: { matchLabels: { app: browser } } - template: - metadata: { labels: { app: browser } } - spec: - containers: - - name: browser - image: docker.io/ion606/browser:latest - ports: [{ containerPort: 7788 }] - env: - - { name: WEBUI_IP, value: "0.0.0.0" } - - { name: WEBUI_PORT, value: "7788" } - resources: - requests: { cpu: "250m", memory: "256Mi" } - limits: { cpu: "1", memory: "1Gi" } # hard cap - readinessProbe: - { - httpGet: { path: "/", port: 7788 }, - initialDelaySeconds: 5, - periodSeconds: 10, - } - livenessProbe: - { - httpGet: { path: "/", port: 7788 }, - initialDelaySeconds: 15, - periodSeconds: 20, - } - + replicas: 1 + selector: { matchLabels: { app: browser } } + template: + metadata: { labels: { app: browser } } + spec: + containers: + - name: browser + image: docker.io/ion606/browser:latest + ports: [{ containerPort: 7788 }] + env: + - { name: WEBUI_IP, value: "0.0.0.0" } + - { name: WEBUI_PORT, value: "7788" } + resources: + requests: { cpu: "250m", memory: "256Mi" } + limits: { cpu: "1", memory: "1Gi" } # hard cap + readinessProbe: + httpGet: { path: "/", port: 7788 } + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: { path: "/", port: 7788 } + initialDelaySeconds: 15 + periodSeconds: 20 --- apiVersion: v1 kind: Service metadata: { name: browser, namespace: ai } spec: - selector: { app: browser } - ports: [{ name: http, port: 7788, targetPort: 7788 }] - type: ClusterIP + selector: { app: browser } + ports: + - name: http + port: 7788 + targetPort: 7788 + nodePort: 30788 + type: NodePort \ No newline at end of file diff --git a/manifests/coderunner/deployment.yaml b/manifests/coderunner/deployment.yaml index dfe5bb3..0fa52b0 100644 --- a/manifests/coderunner/deployment.yaml +++ b/manifests/coderunner/deployment.yaml @@ -14,23 +14,18 @@ spec: ports: [{ containerPort: 8787 }] env: - { name: PORT, value: "8787" } - - { - name: NAMESPACE, - valueFrom: - { fieldRef: { fieldPath: metadata.namespace } }, - } + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace readinessProbe: - { - httpGet: { path: "/openapi.json", port: 8787 }, - initialDelaySeconds: 5, - periodSeconds: 10, - } + httpGet: { path: "/openapi.json", port: 8787 } + initialDelaySeconds: 5 + periodSeconds: 10 livenessProbe: - { - httpGet: { path: "/openapi.json", port: 8787 }, - initialDelaySeconds: 15, - periodSeconds: 20, - } + httpGet: { path: "/openapi.json", port: 8787 } + initialDelaySeconds: 15 + periodSeconds: 20 resources: requests: { cpu: "100m", memory: "128Mi" } limits: { cpu: "500m", memory: "512Mi" } @@ -40,5 +35,9 @@ kind: Service metadata: { name: coderunner, namespace: ai } spec: selector: { app: coderunner } - ports: [{ name: http, port: 8787, targetPort: 8787 }] - type: ClusterIP + ports: + - name: http + port: 8787 + targetPort: 8787 + nodePort: 31787 + type: NodePort diff --git a/manifests/rag-server/deployment.yaml b/manifests/rag-server/deployment.yaml index 11bc233..02575ea 100644 --- a/manifests/rag-server/deployment.yaml +++ b/manifests/rag-server/deployment.yaml @@ -20,12 +20,10 @@ spec: - { name: OLLAMA_CHAT_MODEL, value: "llama3.1" } - { name: OLLAMA_EMBED_MODEL, value: "nomic-embed-text" } readinessProbe: - { httpGet: { path: "/openapi.json", port: 8788 } } + httpGet: { path: "/openapi.json", port: 8788 } livenessProbe: - { - httpGet: { path: "/", port: 8788 }, - initialDelaySeconds: 10, - } + httpGet: { path: "/", port: 8788 } + initialDelaySeconds: 10 resources: requests: { cpu: "200m", memory: "256Mi" } limits: { cpu: "1", memory: "1Gi" } @@ -35,5 +33,9 @@ kind: Service metadata: { name: rag-server, namespace: ai } spec: selector: { app: rag-server } - ports: [{ name: http, port: 8788, targetPort: 8788 }] - type: ClusterIP + ports: + - name: http + port: 8788 + targetPort: 8788 + nodePort: 31788 + type: NodePort diff --git a/manifests/tools/deployment.yaml b/manifests/tools/deployment.yaml index a3a84f9..6a4a9d5 100644 --- a/manifests/tools/deployment.yaml +++ b/manifests/tools/deployment.yaml @@ -2,34 +2,36 @@ apiVersion: apps/v1 kind: Deployment metadata: { name: tools, namespace: ai } spec: - replicas: 1 - selector: { matchLabels: { app: tools } } - template: - metadata: { labels: { app: tools } } - spec: - containers: - - name: tools - image: docker.io/ion606/tools:latest - ports: [{ containerPort: 1331 }] - env: - - { name: HOST, value: "0.0.0.0" } - - { name: PORT, value: "1331" } - - { name: ROKU_IP, value: "192.0.2.10" } - readinessProbe: - { httpGet: { path: "/roku/openapi.json", port: 1331 } } - livenessProbe: - { - httpGet: { path: "/roku/openapi.json", port: 1331 }, - initialDelaySeconds: 10, - } - resources: - requests: { cpu: "100m", memory: "128Mi" } - limits: { cpu: "500m", memory: "512Mi" } + replicas: 1 + selector: { matchLabels: { app: tools } } + template: + metadata: { labels: { app: tools } } + spec: + containers: + - name: tools + image: docker.io/ion606/tools:latest + ports: [{ containerPort: 1331 }] + env: + - { name: HOST, value: "0.0.0.0" } + - { name: PORT, value: "1331" } + - { name: ROKU_IP, value: "192.0.2.10" } + readinessProbe: + httpGet: { path: "/roku/openapi.json", port: 1331 } + livenessProbe: + httpGet: { path: "/roku/openapi.json", port: 1331 } + initialDelaySeconds: 10 + resources: + requests: { cpu: "100m", memory: "128Mi" } + limits: { cpu: "500m", memory: "512Mi" } --- apiVersion: v1 kind: Service metadata: { name: tools, namespace: ai } spec: - selector: { app: tools } - ports: [{ name: http, port: 1331, targetPort: 1331 }] - type: ClusterIP + selector: { app: tools } + ports: + - name: http + port: 1331 + targetPort: 1331 + nodePort: 31331 + type: NodePort \ No newline at end of file