mirror of
https://18126008609:longquanjian123@gitee.com/feigong123/aurask.git
synced 2026-04-19 19:31:05 +00:00
86 lines
1.9 KiB
YAML
86 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: aurask-api
|
|
namespace: aurask
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: aurask-api
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: aurask-api
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: devcloud-registry
|
|
containers:
|
|
- name: api
|
|
image: registry.mydevcloud.love/devcloud/aurask-api:latest
|
|
imagePullPolicy: Always
|
|
command:
|
|
- python
|
|
- -m
|
|
- aurask
|
|
- serve
|
|
- --data
|
|
- /data/state.json
|
|
- --host
|
|
- 0.0.0.0
|
|
- --port
|
|
- "8080"
|
|
envFrom:
|
|
- configMapRef:
|
|
name: aurask-runtime-config
|
|
- configMapRef:
|
|
name: aurask-config
|
|
- secretRef:
|
|
name: aurask-runtime-secrets
|
|
optional: true
|
|
- secretRef:
|
|
name: aurask-secrets
|
|
optional: true
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
volumeMounts:
|
|
- name: aurask-api-state
|
|
mountPath: /data
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
resources:
|
|
requests:
|
|
cpu: 250m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 1Gi
|
|
volumes:
|
|
- name: aurask-api-state
|
|
persistentVolumeClaim:
|
|
claimName: aurask-api-state
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: aurask-api
|
|
namespace: aurask
|
|
spec:
|
|
selector:
|
|
app: aurask-api
|
|
ports:
|
|
- name: http
|
|
port: 8080
|
|
targetPort: 8080
|