3d8fa79657
* setup infra for pusher service * setup client sdk for pusher service * fix: ping parse failure * fix: send pong back to client avoid disconnections every 2.5 minutes * increase replicas * feat: show presence and compose indicator
105 lines
1.9 KiB
YAML
105 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: pusher
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: pusher
|
|
replicas: 2
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: pusher
|
|
spec:
|
|
serviceAccountName: default-service-account
|
|
nodeSelector:
|
|
cloud.google.com/gke-spot: "true"
|
|
terminationGracePeriodSeconds: 15
|
|
containers:
|
|
- name: pusher
|
|
image: "pusher"
|
|
ports:
|
|
- containerPort: 8080
|
|
- containerPort: 50051
|
|
resources:
|
|
requests:
|
|
memory: "52Mi"
|
|
cpu: 50m
|
|
limits:
|
|
memory: "52Mi"
|
|
cpu: 50m
|
|
env:
|
|
- name: "PORT"
|
|
value: "8080"
|
|
- name: "GRPC_PORT"
|
|
value: "50051"
|
|
- name: "REDIS_HOST"
|
|
value: "10.138.57.187"
|
|
- name: "LLINK_POSTGRES_CONNECTION_URL"
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: shared-secrets
|
|
key: LLINK_POSTGRES_CONNECTION_URL
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: pusher
|
|
spec:
|
|
selector:
|
|
app: pusher
|
|
ports:
|
|
- name: http
|
|
port: 8080
|
|
targetPort: 8080
|
|
protocol: TCP
|
|
- name: grpc
|
|
port: 50051
|
|
targetPort: 50051
|
|
protocol: TCP
|
|
|
|
---
|
|
|
|
kind: HTTPRoute
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
metadata:
|
|
name: pusher
|
|
spec:
|
|
parentRefs:
|
|
- kind: Gateway
|
|
name: external-gateway
|
|
hostnames:
|
|
- pusher.dev.flowy.live
|
|
rules:
|
|
- backendRefs:
|
|
- name: pusher
|
|
port: 8080
|
|
|
|
---
|
|
|
|
apiVersion: networking.gke.io/v1
|
|
kind: HealthCheckPolicy
|
|
metadata:
|
|
name: pusher-service-health-check
|
|
spec:
|
|
default:
|
|
checkIntervalSec: 15
|
|
timeoutSec: 15
|
|
healthyThreshold: 1
|
|
unhealthyThreshold: 2
|
|
logConfig:
|
|
enabled: true
|
|
config:
|
|
type: HTTP
|
|
httpHealthCheck:
|
|
portSpecification: USE_FIXED_PORT
|
|
port: 8080
|
|
requestPath: /health
|
|
targetRef:
|
|
group: ""
|
|
kind: Service
|
|
name: pusher
|