From b5e1276977ef3c52258cdc5ecc4519978aef13d2 Mon Sep 17 00:00:00 2001 From: Jose Henrique Date: Fri, 3 Jul 2026 13:31:59 -0300 Subject: [PATCH] updating openwebui --- default/openwebui.yaml | 26 ++++++++++++- default/playwright.yaml | 84 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 default/playwright.yaml diff --git a/default/openwebui.yaml b/default/openwebui.yaml index 5aa81e9..5aa67e2 100644 --- a/default/openwebui.yaml +++ b/default/openwebui.yaml @@ -14,12 +14,36 @@ spec: labels: app: openwebui spec: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - iris containers: - name: openwebui image: ghcr.io/open-webui/open-webui:main-slim imagePullPolicy: Always ports: - containerPort: 8080 + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: TZ + value: "America/Sao_Paulo" + - name: DATABASE_URL + valueFrom: + secretKeyRef: + name: openwebui-secret + key: DATABASE_URL + - name: PLAYWRIGHT_WS_URL + value: "ws://browserless.default.svc.cluster.local:3000" resources: requests: cpu: "250m" @@ -87,4 +111,4 @@ spec: service: name: openwebui port: - number: 8080 \ No newline at end of file + number: 8080 diff --git a/default/playwright.yaml b/default/playwright.yaml new file mode 100644 index 0000000..ddb4f15 --- /dev/null +++ b/default/playwright.yaml @@ -0,0 +1,84 @@ +# 1) Deployment +apiVersion: apps/v1 +kind: Deployment +metadata: + name: playwright + namespace: default +spec: + replicas: 1 + selector: + matchLabels: + app: playwright + template: + metadata: + labels: + app: playwright + spec: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - iris + containers: + - name: playwright + image: mcr.microsoft.com/playwright:v1.58.0-noble + imagePullPolicy: Always + command: ["npx", "-y", "playwright@1.58.0", "run-server", "--port", "3000", "--host", "0.0.0.0"] + ports: + - containerPort: 3000 + env: + - name: TZ + value: "America/Sao_Paulo" + resources: + requests: + cpu: "500m" + memory: "512Mi" + limits: + cpu: "4000m" + memory: "4Gi" + volumeMounts: + - mountPath: /dev/shm + name: dshm + volumes: + - name: dshm + emptyDir: + medium: Memory +--- +# 2) Service +apiVersion: v1 +kind: Service +metadata: + name: playwright + namespace: default +spec: + type: ClusterIP + selector: + app: playwright + ports: + - port: 3000 + targetPort: 3000 +--- +# 3) Ingress +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: playwright + namespace: default +spec: + ingressClassName: nginx + rules: + - host: playwright.haven + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: playwright + port: + number: 3000