chain-dci/deploy/k8s/test/deployment-dci.yaml

58 lines
1.3 KiB
YAML
Raw Normal View History

2023-11-23 12:06:14 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
2023-12-05 08:33:06 +00:00
name: chain-dci-server
2023-11-23 12:06:14 +00:00
spec:
replicas: 1
selector:
matchLabels:
2023-12-05 08:33:06 +00:00
app: chain-dci-server
2023-11-23 12:06:14 +00:00
template:
metadata:
labels:
2023-12-05 08:33:06 +00:00
app: chain-dci-server
2023-11-23 12:06:14 +00:00
spec:
containers:
2023-12-05 08:33:06 +00:00
- name: chain-dci-server
image: testhub.szjixun.cn:9043/k8stest/chain-dci-server:latest
2023-11-23 12:06:14 +00:00
ports:
2023-12-05 08:33:06 +00:00
- containerPort: 20118
2023-11-23 12:06:14 +00:00
volumeMounts:
- name: logs
mountPath: /app/logs
- name: runtime
mountPath: /app/runtime
envFrom:
- configMapRef:
name: "erp-configmap"
- secretRef:
name: erp-secret
# nodeSelector:
# node: node1
imagePullSecrets:
- name: docker-login-secret
volumes:
- name: logs
nfs:
server: node0
2023-12-05 08:33:06 +00:00
path: /mnt/storage/erp/chain-dci-server/logs
2023-11-23 12:06:14 +00:00
- name: runtime
nfs:
server: node0
2023-12-05 08:33:06 +00:00
path: /mnt/storage/erp/chain-dci-server/runtime
2023-11-23 12:06:14 +00:00
---
apiVersion: v1
kind: Service
metadata:
2023-12-05 08:33:06 +00:00
name: chain-dci-server
2023-11-23 12:06:14 +00:00
spec:
type: NodePort
selector:
2023-12-05 08:33:06 +00:00
app: chain-dci-server
2023-11-23 12:06:14 +00:00
ports:
- name: http
protocol: TCP
2023-12-05 08:33:06 +00:00
nodePort: 20118
targetPort: 20118
port: 20118