77 lines
1.9 KiB
YAML
77 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ci4s-management-platform-deployment
|
|
namespace: argo
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: ci4s-management-platform
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: ci4s-management-platform
|
|
spec:
|
|
containers:
|
|
- name: ci4s-management-platform
|
|
image: ${k8s-7management-image}
|
|
securityContext:
|
|
privileged: true
|
|
env:
|
|
- name: TZ
|
|
value: Asia/Shanghai
|
|
- name: JAVA_TOOL_OPTIONS
|
|
value: "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5005"
|
|
ports:
|
|
- containerPort: 9213
|
|
volumeMounts:
|
|
- name: resource-volume
|
|
mountPath: /home/resource/
|
|
subPath: mini-model-platform-data
|
|
mountPropagation: Bidirectional
|
|
volumes:
|
|
- name: resource-volume
|
|
hostPath:
|
|
path: /platform-data
|
|
initContainers:
|
|
- name: init-fs-check
|
|
image: 172.20.32.187/ci4s/ci4s-managent:202502141722
|
|
securityContext:
|
|
privileged: true
|
|
volumeMounts:
|
|
- name: resource-volume
|
|
mountPath: /home/resource/
|
|
subPath: mini-model-platform-data
|
|
mountPropagation: Bidirectional
|
|
command: [ "/bin/sh", "-c" ]
|
|
args:
|
|
- |
|
|
mounted=$(findmnt /home/resource/ | grep 'fuse.juicefs')
|
|
if [ -z "$mounted" ]; then
|
|
echo "/platform-data not mounted";
|
|
exit 1
|
|
fi
|
|
restartPolicy: Always
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: ci4s-management-platform-service
|
|
namespace: argo
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- name: http
|
|
port: 9213
|
|
nodePort: 31208
|
|
protocol: TCP
|
|
- name: debug
|
|
nodePort: 31219
|
|
port: 5005
|
|
protocol: TCP
|
|
targetPort: 5005
|
|
selector:
|
|
app: ci4s-management-platform
|
|
|