67 lines
1.3 KiB
YAML
67 lines
1.3 KiB
YAML
|
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.1
|
||
|
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"
|
||
|
---
|
||
|
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
|