82 lines
1.6 KiB
YAML
82 lines
1.6 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: icp-api-config
|
|
namespace: tool-apis
|
|
data:
|
|
REDIS_HOST: "redis-master.database-system.svc"
|
|
REDIS_PORT: "6379"
|
|
REDIS_PASSWORD: "Zf5TxQA8pA"
|
|
REDIS_DB: "1"
|
|
REDIS_PREFIX: "icp:"
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: icp-api
|
|
namespace: tool-apis
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: icp-api
|
|
tier: backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: icp-api
|
|
tier: backend
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: registry-secret
|
|
runtimeClassName: "nvidia"
|
|
containers:
|
|
- name: icp-api
|
|
image: leafdev.top/leaf/icp-api:v0.0.2
|
|
ports:
|
|
- containerPort: 80
|
|
protocol: TCP
|
|
name: http
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 80
|
|
initialDelaySeconds: 5
|
|
resources:
|
|
limits:
|
|
nvidia.com/gpu: "1"
|
|
nvidia.com/gpumem: "1000"
|
|
envFrom:
|
|
- configMapRef:
|
|
name: icp-api-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: icp-api
|
|
namespace: tool-apis
|
|
spec:
|
|
selector:
|
|
app: icp-api
|
|
tier: backend
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 80
|
|
targetPort: 80
|
|
protocol: TCP
|
|
name: http
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: icp-api-http
|
|
namespace: tool-apis
|
|
spec:
|
|
hostnames:
|
|
- icp-api-testing.leaflow.cn
|
|
parentRefs:
|
|
- name: http-gw
|
|
namespace: networking
|
|
rules:
|
|
- backendRefs:
|
|
- name: icp-api
|
|
port: 80 |