mirror of
https://github.com/OpenStaticFish/MicroServices.git
synced 2026-10-13 06:35:12 +00:00
Add Lightpanda browser services and automation scripts
Add lightpanda-cdp and lightpanda-mcp services for local (Tilt) and production (deploy/prod/) with Traefik routing, HPAs, and CI image publishing. Create scripts for concurrent Bing search via MCP and CDP screenshots. Update flake.nix with websocat dependency. Make webshare-secret helper tolerant of missing Doppler credentials.
This commit is contained in:
@@ -21,3 +21,22 @@ spec:
|
||||
services:
|
||||
- name: scraper
|
||||
port: 8080
|
||||
- match: Host(`apps.silverside-gopher.ts.net`) && PathPrefix(`/lightpanda-cdp`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: microservices-strip-prefix
|
||||
services:
|
||||
- name: lightpanda-cdp
|
||||
port: 9222
|
||||
- match: Host(`apps.silverside-gopher.ts.net`) && PathPrefix(`/lightpanda-mcp`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: microservices-strip-prefix
|
||||
services:
|
||||
- name: lightpanda-mcp
|
||||
port: 8000
|
||||
sticky:
|
||||
cookie:
|
||||
name: lightpanda_mcp_pod
|
||||
httpOnly: true
|
||||
sameSite: lax
|
||||
|
||||
@@ -5,6 +5,12 @@ resources:
|
||||
- webshare-api-externalsecret.yaml
|
||||
- site-analyzer-deployment.yaml
|
||||
- site-analyzer-service.yaml
|
||||
- lightpanda-cdp-deployment.yaml
|
||||
- lightpanda-cdp-service.yaml
|
||||
- lightpanda-cdp-hpa.yaml
|
||||
- lightpanda-mcp-deployment.yaml
|
||||
- lightpanda-mcp-service.yaml
|
||||
- lightpanda-mcp-hpa.yaml
|
||||
- scraper-deployment.yaml
|
||||
- scraper-service.yaml
|
||||
- traefik-middleware-strip-prefix.yaml
|
||||
@@ -14,3 +20,5 @@ images:
|
||||
newTag: 076f5c70d35d162c19eced58997a556f37fe69ef
|
||||
- name: ghcr.io/openstaticfish/microservices/scraper
|
||||
newTag: 076f5c70d35d162c19eced58997a556f37fe69ef
|
||||
- name: ghcr.io/openstaticfish/microservices/lightpanda-mcp
|
||||
newTag: aade3e297de6f79f7ac5d3e80cc2b77ad9c3f9d9
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: lightpanda-cdp
|
||||
namespace: microservices
|
||||
labels:
|
||||
app: lightpanda-cdp
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: lightpanda-cdp
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 1
|
||||
maxUnavailable: 0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: lightpanda-cdp
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 30
|
||||
containers:
|
||||
- name: lightpanda-cdp
|
||||
image: lightpanda/browser:nightly
|
||||
args:
|
||||
- /bin/lightpanda
|
||||
- serve
|
||||
- --host
|
||||
- 0.0.0.0
|
||||
- --port
|
||||
- "9222"
|
||||
- --log-level
|
||||
- warn
|
||||
ports:
|
||||
- containerPort: 9222
|
||||
env:
|
||||
- name: LIGHTPANDA_DISABLE_TELEMETRY
|
||||
value: "true"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /json/version
|
||||
port: 9222
|
||||
initialDelaySeconds: 2
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /json/version
|
||||
port: 9222
|
||||
initialDelaySeconds: 2
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 2
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: lightpanda-cdp
|
||||
namespace: microservices
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: lightpanda-cdp
|
||||
minReplicas: 2
|
||||
maxReplicas: 10
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 70
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: lightpanda-cdp
|
||||
namespace: microservices
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: lightpanda-cdp
|
||||
ports:
|
||||
- name: cdp
|
||||
protocol: TCP
|
||||
port: 9222
|
||||
targetPort: 9222
|
||||
@@ -0,0 +1,56 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: lightpanda-mcp
|
||||
namespace: microservices
|
||||
labels:
|
||||
app: lightpanda-mcp
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: lightpanda-mcp
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 1
|
||||
maxUnavailable: 0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: lightpanda-mcp
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: ghcr-pull-secret
|
||||
terminationGracePeriodSeconds: 30
|
||||
containers:
|
||||
- name: lightpanda-mcp
|
||||
image: ghcr.io/openstaticfish/microservices/lightpanda-mcp:main
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: LIGHTPANDA_DISABLE_TELEMETRY
|
||||
value: "true"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 192Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 768Mi
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 2
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: lightpanda-mcp
|
||||
namespace: microservices
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: lightpanda-mcp
|
||||
minReplicas: 2
|
||||
maxReplicas: 10
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 70
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: lightpanda-mcp
|
||||
namespace: microservices
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: lightpanda-mcp
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 8000
|
||||
targetPort: 8000
|
||||
@@ -8,3 +8,5 @@ spec:
|
||||
prefixes:
|
||||
- /site-analyzer
|
||||
- /scraper
|
||||
- /lightpanda-cdp
|
||||
- /lightpanda-mcp
|
||||
|
||||
Reference in New Issue
Block a user