76 lines
1.6 KiB
YAML
76 lines
1.6 KiB
YAML
![]() |
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: image-processor
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
replicas: 3
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: image-processor
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: image-processor
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: image-processor
|
||
|
image: generalbotsproject/image-processor:latest
|
||
|
ports:
|
||
|
- containerPort: 8080
|
||
|
env:
|
||
|
- name: RUST_LOG
|
||
|
value: info
|
||
|
- name: OPENCV_DATA_PATH
|
||
|
value: /usr/share/opencv4
|
||
|
volumeMounts:
|
||
|
- name: temp
|
||
|
mountPath: /tmp
|
||
|
- name: opencv-data
|
||
|
mountPath: /usr/share/opencv4
|
||
|
resources:
|
||
|
requests:
|
||
|
memory: "512Mi"
|
||
|
cpu: "500m"
|
||
|
limits:
|
||
|
memory: "1Gi"
|
||
|
cpu: "1000m"
|
||
|
readinessProbe:
|
||
|
httpGet:
|
||
|
path: /health
|
||
|
port: 8080
|
||
|
initialDelaySeconds: 5
|
||
|
periodSeconds: 10
|
||
|
livenessProbe:
|
||
|
httpGet:
|
||
|
path: /health
|
||
|
port: 8080
|
||
|
initialDelaySeconds: 15
|
||
|
periodSeconds: 20
|
||
|
volumes:
|
||
|
- name: temp
|
||
|
emptyDir: {}
|
||
|
- name: opencv-data
|
||
|
configMap:
|
||
|
name: opencv-data
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: image-processor
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
selector:
|
||
|
app: image-processor
|
||
|
ports:
|
||
|
- port: 8080
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: opencv-data
|
||
|
namespace: general-bots
|
||
|
data:
|
||
|
haarcascade_frontalface_default.xml: |
|
||
|
<include actual cascade classifier XML data here>
|