(feat) Temporal SDK client, worker mgmt, k8s deployments (#10)
CI / CI (push) Successful in 4m11s
CI / CI (push) Successful in 4m11s
## Changes - `internal/temporal/client.go` — Robust Temporal client with retry (exp backoff), TLS, health check - `internal/temporal/worker.go` — Worker creation, activity/workflow registration, lifecycle - `internal/temporal/context.go` — Timeout helpers - `k8s/worker-deployment.yaml` — 2-10 replica HPA, liveness/readiness probes, security context, pod anti-affinity - `k8s/workflow-runner-deployment.yaml` — Singleton runner with probes - `k8s/kustomization.yaml` — Updated resource list Co-authored-by: poimen <[email protected]>
This commit was merged in pull request #10.
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: poimen-workflows
|
||||
namespace: poimen
|
||||
labels:
|
||||
app.kubernetes.io/name: poimen
|
||||
app.kubernetes.io/component: worker
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: poimen-workflows
|
||||
app.kubernetes.io/name: poimen
|
||||
app.kubernetes.io/component: worker
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: poimen-workflows
|
||||
app.kubernetes.io/name: poimen
|
||||
app.kubernetes.io/component: worker
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: poimen-registry
|
||||
containers:
|
||||
# Temporal activity worker (single role, no HTTP server)
|
||||
- name: workflows-worker
|
||||
image: forgejo.riotpiao.com/rock/poimen-workflows:latest
|
||||
imagePullPolicy: Always
|
||||
command: ["/app/worker"]
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: poimen-db-credentials
|
||||
key: workflows-url
|
||||
- name: TEMPORAL_HOSTPORT
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: poimen-config
|
||||
key: temporal-hostport
|
||||
- name: TEMPORAL_NAMESPACE
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: poimen-config
|
||||
key: temporal-namespace
|
||||
- name: MEMORY_SERVICE_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: poimen-config
|
||||
key: memory-service-url
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "2000m"
|
||||
Reference in New Issue
Block a user