Update Kubernetes YAMLs and add worker service

Refactored container configurations in worker, api, and playwright-service YAMLs to streamline syntax and add missing fields. Added a service definition for the worker component and included a new environment variable in the configmap for rate-limiting. These changes enhance configuration clarity and ensure proper resource definitions.
This commit is contained in:
Jakob Stadlhuber 2024-07-24 19:31:37 +02:00
parent f26bda2477
commit d68f349109
4 changed files with 95 additions and 87 deletions

View File

@ -26,7 +26,7 @@ spec:
name: firecrawl-config
#- secretRef:
# name: firecrawl-secret
- livenessProbe:
livenessProbe:
httpGet:
path: /v0/health/liveness
port: 3002
@ -35,8 +35,7 @@ spec:
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
name: api-container
- readinessProbe:
readinessProbe:
httpGet:
path: /v0/health/readiness
port: 3002
@ -45,7 +44,6 @@ spec:
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
name: api-container
---
apiVersion: v1
kind: Service

View File

@ -7,6 +7,7 @@ data:
PORT: "3002"
HOST: "0.0.0.0"
REDIS_URL: "redis://redis:6379"
REDIS_RATE_LIMIT_URL: "redis://redis:6379"
PLAYWRIGHT_MICROSERVICE_URL: "http://playwright-service:3000/html"
USE_DB_AUTHENTICATION: "false"
HDX_NODE_BETA_MODE: "1"

View File

@ -30,7 +30,7 @@ spec:
envFrom:
- configMapRef:
name: playwright-service-config
- livenessProbe:
livenessProbe:
httpGet:
path: /health/liveness
port: 3000
@ -39,8 +39,7 @@ spec:
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
name: playwright-service-container
- readinessProbe:
readinessProbe:
httpGet:
path: /health/readiness
port: 3000
@ -49,7 +48,6 @@ spec:
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
name: playwright-service-container
---
apiVersion: v1
kind: Service

View File

@ -18,28 +18,39 @@ spec:
- name: worker
image: ghcr.io/winkk-dev/firecrawl:latest
imagePullPolicy: Always
args: [ "pnpm", "run", "workers" ]
envFrom:
- configMapRef:
name: firecrawl-config
#- secretRef:
# name: firecrawl-secret
- livenessProbe:
livenessProbe:
httpGet:
path: /v0/health/liveness
port: 3002
port: 3003
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
name: worker-container
- readinessProbe:
readinessProbe:
httpGet:
path: /v0/health/readiness
port: 3002
port: 3003
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
name: worker-container
---
apiVersion: v1
kind: Service
metadata:
name: worker
spec:
selector:
app: worker
ports:
- protocol: TCP
port: 3003
targetPort: 3003