- changes toward a fully functional k8s cluster. First running version of cluster, addition of services works, additional changes to app required.
This commit is contained in:
469
k8s/dev/eveai-services.yaml
Normal file
469
k8s/dev/eveai-services.yaml
Normal file
@@ -0,0 +1,469 @@
|
||||
# EveAI Application Services for Dev Environment
|
||||
# File: eveai-services.yaml
|
||||
---
|
||||
# Shared Logs PVC
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: app-logs-pvc
|
||||
namespace: eveai-dev
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: local-storage
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
selector:
|
||||
matchLabels:
|
||||
app: eveai
|
||||
environment: dev
|
||||
|
||||
---
|
||||
# EveAI App Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: eveai-app
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: eveai-app
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: eveai-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: eveai-app
|
||||
spec:
|
||||
containers:
|
||||
- name: eveai-app
|
||||
image: registry.ask-eve-ai-local.com/josakola/eveai_app:latest
|
||||
ports:
|
||||
- containerPort: 5001
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: COMPONENT_NAME
|
||||
value: "eveai_app"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: eveai-config
|
||||
- secretRef:
|
||||
name: eveai-secrets
|
||||
volumeMounts:
|
||||
- name: app-logs
|
||||
mountPath: /app/logs
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 5001
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 5001
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "300m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "1000m"
|
||||
volumes:
|
||||
- name: app-logs
|
||||
persistentVolumeClaim:
|
||||
claimName: app-logs-pvc
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# EveAI App Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: eveai-app-service
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: eveai-app
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 5001
|
||||
targetPort: 5001
|
||||
nodePort: 30001 # Maps to host port 3001
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: eveai-app
|
||||
|
||||
---
|
||||
# EveAI API Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: eveai-api
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: eveai-api
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: eveai-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: eveai-api
|
||||
spec:
|
||||
containers:
|
||||
- name: eveai-api
|
||||
image: registry.ask-eve-ai-local.com/josakola/eveai_api:latest
|
||||
ports:
|
||||
- containerPort: 5003
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: COMPONENT_NAME
|
||||
value: "eveai_api"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: eveai-config
|
||||
- secretRef:
|
||||
name: eveai-secrets
|
||||
volumeMounts:
|
||||
- name: app-logs
|
||||
mountPath: /app/logs
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 5003
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 5003
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "300m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "1000m"
|
||||
volumes:
|
||||
- name: app-logs
|
||||
persistentVolumeClaim:
|
||||
claimName: app-logs-pvc
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# EveAI API Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: eveai-api-service
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: eveai-api
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 5003
|
||||
targetPort: 5003
|
||||
nodePort: 30003 # Maps to host port 3003
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: eveai-api
|
||||
|
||||
---
|
||||
# EveAI Chat Client Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: eveai-chat-client
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: eveai-chat-client
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: eveai-chat-client
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: eveai-chat-client
|
||||
spec:
|
||||
containers:
|
||||
- name: eveai-chat-client
|
||||
image: registry.ask-eve-ai-local.com/josakola/eveai_chat_client:latest
|
||||
ports:
|
||||
- containerPort: 5004
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: COMPONENT_NAME
|
||||
value: "eveai_chat_client"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: eveai-config
|
||||
- secretRef:
|
||||
name: eveai-secrets
|
||||
volumeMounts:
|
||||
- name: app-logs
|
||||
mountPath: /app/logs
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 5004
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 5004
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "300m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "1000m"
|
||||
volumes:
|
||||
- name: app-logs
|
||||
persistentVolumeClaim:
|
||||
claimName: app-logs-pvc
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# EveAI Chat Client Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: eveai-chat-client-service
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: eveai-chat-client
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 5004
|
||||
targetPort: 5004
|
||||
nodePort: 30004 # Maps to host port 3004
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: eveai-chat-client
|
||||
|
||||
---
|
||||
# EveAI Workers Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: eveai-workers
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: eveai-workers
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 2 # Multiple workers for parallel processing
|
||||
selector:
|
||||
matchLabels:
|
||||
app: eveai-workers
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: eveai-workers
|
||||
spec:
|
||||
containers:
|
||||
- name: eveai-workers
|
||||
image: registry.ask-eve-ai-local.com/josakola/eveai_workers:latest
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: COMPONENT_NAME
|
||||
value: "eveai_workers"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: eveai-config
|
||||
- secretRef:
|
||||
name: eveai-secrets
|
||||
volumeMounts:
|
||||
- name: app-logs
|
||||
mountPath: /app/logs
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "300m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "1000m"
|
||||
volumes:
|
||||
- name: app-logs
|
||||
persistentVolumeClaim:
|
||||
claimName: app-logs-pvc
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# EveAI Chat Workers Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: eveai-chat-workers
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: eveai-chat-workers
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 2 # Multiple workers for parallel processing
|
||||
selector:
|
||||
matchLabels:
|
||||
app: eveai-chat-workers
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: eveai-chat-workers
|
||||
spec:
|
||||
containers:
|
||||
- name: eveai-chat-workers
|
||||
image: registry.ask-eve-ai-local.com/josakola/eveai_chat_workers:latest
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: COMPONENT_NAME
|
||||
value: "eveai_chat_workers"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: eveai-config
|
||||
- secretRef:
|
||||
name: eveai-secrets
|
||||
volumeMounts:
|
||||
- name: app-logs
|
||||
mountPath: /app/logs
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "300m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "1000m"
|
||||
volumes:
|
||||
- name: app-logs
|
||||
persistentVolumeClaim:
|
||||
claimName: app-logs-pvc
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# EveAI Beat Deployment (Celery scheduler)
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: eveai-beat
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: eveai-beat
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1 # Only one beat scheduler needed
|
||||
selector:
|
||||
matchLabels:
|
||||
app: eveai-beat
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: eveai-beat
|
||||
spec:
|
||||
containers:
|
||||
- name: eveai-beat
|
||||
image: registry.ask-eve-ai-local.com/josakola/eveai_beat:latest
|
||||
env:
|
||||
- name: COMPONENT_NAME
|
||||
value: "eveai_beat"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: eveai-config
|
||||
- secretRef:
|
||||
name: eveai-secrets
|
||||
volumeMounts:
|
||||
- name: app-logs
|
||||
mountPath: /app/logs
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
volumes:
|
||||
- name: app-logs
|
||||
persistentVolumeClaim:
|
||||
claimName: app-logs-pvc
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# EveAI Entitlements Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: eveai-entitlements
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: eveai-entitlements
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: eveai-entitlements
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: eveai-entitlements
|
||||
spec:
|
||||
containers:
|
||||
- name: eveai-entitlements
|
||||
image: registry.ask-eve-ai-local.com/josakola/eveai_entitlements:latest
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: COMPONENT_NAME
|
||||
value: "eveai_entitlements"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: eveai-config
|
||||
- secretRef:
|
||||
name: eveai-secrets
|
||||
volumeMounts:
|
||||
- name: app-logs
|
||||
mountPath: /app/logs
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "200m"
|
||||
limits:
|
||||
memory: "1Gi"
|
||||
cpu: "500m"
|
||||
volumes:
|
||||
- name: app-logs
|
||||
persistentVolumeClaim:
|
||||
claimName: app-logs-pvc
|
||||
restartPolicy: Always
|
||||
Reference in New Issue
Block a user