generated from coulomb/repo-seed
Deploy activity-core on railiance01
This commit is contained in:
221
k8s/railiance/20-runtime.yaml
Normal file
221
k8s/railiance/20-runtime.yaml
Normal file
@@ -0,0 +1,221 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: actcore-runtime-config
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: activity-core
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
data:
|
||||
TEMPORAL_HOST: actcore-temporal:7233
|
||||
TEMPORAL_NAMESPACE: default
|
||||
NATS_URL: nats://actcore-nats:4222
|
||||
STATE_HUB_URL: http://inter-hub.inter-hub.svc.cluster.local:8000
|
||||
REPO_SCOPING_URL: http://repo-scoping.repo-scoping.svc.cluster.local:8020
|
||||
ISSUE_CORE_URL: http://issue-core.issue-core.svc.cluster.local:8010
|
||||
ISSUE_SINK_TYPE: "null"
|
||||
ACTIVITY_DEFINITION_DIRS: ""
|
||||
PROMETHEUS_BIND_ADDR: 0.0.0.0:9090
|
||||
ACTIVITY_CURATOR_GATE: disabled
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: actcore-migrate
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-migrate
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
backoffLimit: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-migrate
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: migrate
|
||||
image: activity-core:railiance01-prod
|
||||
imagePullPolicy: Never
|
||||
command: ["python", "-m", "alembic", "upgrade", "head"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: actcore-runtime-config
|
||||
- secretRef:
|
||||
name: actcore-runtime-secret
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: actcore-sync
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-sync
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
backoffLimit: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-sync
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: sync
|
||||
image: activity-core:railiance01-prod
|
||||
imagePullPolicy: Never
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- python scripts/sync_event_types.py && python -m activity_core.sync_activity_definitions
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: actcore-runtime-config
|
||||
- secretRef:
|
||||
name: actcore-runtime-secret
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: actcore-api
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-api
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: actcore-api
|
||||
ports:
|
||||
- name: http
|
||||
port: 8010
|
||||
targetPort: http
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: actcore-api
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-api
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: actcore-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-api
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
containers:
|
||||
- name: api
|
||||
image: activity-core:railiance01-prod
|
||||
imagePullPolicy: Never
|
||||
command: ["uvicorn", "activity_core.api:app", "--host", "0.0.0.0", "--port", "8010"]
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8010
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: actcore-runtime-config
|
||||
- secretRef:
|
||||
name: actcore-runtime-secret
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 45
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 5
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: actcore-worker-metrics
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-worker
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: actcore-worker
|
||||
ports:
|
||||
- name: metrics
|
||||
port: 9090
|
||||
targetPort: metrics
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: actcore-worker
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-worker
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: actcore-worker
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-worker
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
containers:
|
||||
- name: worker
|
||||
image: activity-core:railiance01-prod
|
||||
imagePullPolicy: Never
|
||||
command: ["python", "-m", "activity_core.worker"]
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9090
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: actcore-runtime-config
|
||||
- secretRef:
|
||||
name: actcore-runtime-secret
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: actcore-event-router
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-event-router
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: actcore-event-router
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-event-router
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
containers:
|
||||
- name: event-router
|
||||
image: activity-core:railiance01-prod
|
||||
imagePullPolicy: Never
|
||||
command: ["python", "-m", "activity_core.event_router"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: actcore-runtime-config
|
||||
- secretRef:
|
||||
name: actcore-runtime-secret
|
||||
Reference in New Issue
Block a user