https://hub.docker.com/r/easysoft/zentao/tags
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: zentao-pvc
namespace: ur-dev
spec:
accessModes:
- ReadWriteMany
storageClassName: kubesphere-nfs-client
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: zentao-mysql-pvc
namespace: ur-dev
spec:
accessModes:
- ReadWriteMany
storageClassName: kubesphere-nfs-client
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
labels:
app: zentao
name: zentao-client
namespace: ur-dev
spec:
ports:
- port: 80
targetPort: 80
name: zentao
selector:
app: zentao
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: zentao
namespace: ur-dev
labels:
app: zentao
spec:
selector:
matchLabels:
app: zentao
replicas: 1
template:
metadata:
labels:
app: zentao
spec:
containers:
- name: zentao
image: bytest-harbor.ur.com.cn/base-image/easysoft/zentao:15.5
#https://hub.docker.com/r/easysoft/zentao/tags
resources:
requests:
memory: "2Gi"
cpu: "2000m"
limits:
memory: "2Gi"
cpu: "2000m"
env:
- name: MYSQL_ROOT_PASSWORD
value: '1qaz@WSX'
#mysql密码
ports:
- name: zentao
containerPort: 80
- name: mysql
containerPort: 3306
volumeMounts:
- name: zentao-data
mountPath: /www/zentaopms
- name: zentao-mysql
mountPath: /var/lib/mysql
volumes:
- name: zentao-data
persistentVolumeClaim:
claimName: zentao-pvc
- name: zentao-mysql
persistentVolumeClaim:
claimName: zentao-mysql-pvc