generated from coulomb/repo-seed
Deploy activity-core on railiance01
This commit is contained in:
364
k8s/railiance/10-infrastructure.yaml
Normal file
364
k8s/railiance/10-infrastructure.yaml
Normal file
@@ -0,0 +1,364 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: actcore-app-db
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-app-db
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: actcore-app-db
|
||||
ports:
|
||||
- name: postgres
|
||||
port: 5432
|
||||
targetPort: postgres
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: actcore-app-db
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-app-db
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
serviceName: actcore-app-db
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: actcore-app-db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-app-db
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:16
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: postgres
|
||||
containerPort: 5432
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: actcore-app-db-secret
|
||||
key: username
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: actcore-app-db-secret
|
||||
key: password
|
||||
- name: POSTGRES_DB
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: actcore-app-db-secret
|
||||
key: database
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "actcore"]
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "actcore"]
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: actcore-temporal-db
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-temporal-db
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: actcore-temporal-db
|
||||
ports:
|
||||
- name: postgres
|
||||
port: 5432
|
||||
targetPort: postgres
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: actcore-temporal-db
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-temporal-db
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
serviceName: actcore-temporal-db
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: actcore-temporal-db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-temporal-db
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:16
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: postgres
|
||||
containerPort: 5432
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: actcore-temporal-db-secret
|
||||
key: username
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: actcore-temporal-db-secret
|
||||
key: password
|
||||
- name: POSTGRES_DB
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: actcore-temporal-db-secret
|
||||
key: database
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "temporal"]
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "temporal"]
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 8Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: actcore-nats
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-nats
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: actcore-nats
|
||||
ports:
|
||||
- name: client
|
||||
port: 4222
|
||||
targetPort: client
|
||||
- name: monitor
|
||||
port: 8222
|
||||
targetPort: monitor
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: actcore-nats
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-nats
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
serviceName: actcore-nats
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: actcore-nats
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-nats
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
containers:
|
||||
- name: nats
|
||||
image: nats:2.10-alpine
|
||||
imagePullPolicy: IfNotPresent
|
||||
args: ["-js", "-sd", "/data", "-m", "8222"]
|
||||
ports:
|
||||
- name: client
|
||||
containerPort: 4222
|
||||
- name: monitor
|
||||
containerPort: 8222
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: monitor
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: monitor
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: actcore-temporal
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-temporal
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: actcore-temporal
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 7233
|
||||
targetPort: grpc
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: actcore-temporal
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-temporal
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: actcore-temporal
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-temporal
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
containers:
|
||||
- name: temporal
|
||||
image: temporalio/auto-setup:1.29.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: 7233
|
||||
env:
|
||||
- name: DB
|
||||
value: postgres12
|
||||
- name: DB_PORT
|
||||
value: "5432"
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: actcore-temporal-db-secret
|
||||
key: username
|
||||
- name: POSTGRES_PWD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: actcore-temporal-db-secret
|
||||
key: password
|
||||
- name: POSTGRES_SEEDS
|
||||
value: actcore-temporal-db
|
||||
- name: DBNAME
|
||||
value: temporal
|
||||
- name: VISIBILITY_DBNAME
|
||||
value: temporal_visibility
|
||||
- name: ENABLE_ES
|
||||
value: "false"
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: TEMPORAL_ADDRESS
|
||||
value: "$(POD_IP):7233"
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- temporal operator cluster health --address "${POD_IP}:7233"
|
||||
initialDelaySeconds: 45
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 12
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: actcore-temporal-ui
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-temporal-ui
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: actcore-temporal-ui
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: http
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: actcore-temporal-ui
|
||||
namespace: activity-core
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-temporal-ui
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: actcore-temporal-ui
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: actcore-temporal-ui
|
||||
app.kubernetes.io/part-of: activity-core
|
||||
spec:
|
||||
containers:
|
||||
- name: temporal-ui
|
||||
image: temporalio/ui:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
env:
|
||||
- name: TEMPORAL_ADDRESS
|
||||
value: actcore-temporal:7233
|
||||
- name: TEMPORAL_CORS_ORIGINS
|
||||
value: http://localhost:8080
|
||||
Reference in New Issue
Block a user