mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-29 23:38:11 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			60 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| ---
 | |
| apiVersion: apps/v1
 | |
| kind: Deployment
 | |
| metadata:
 | |
|   name: ${DEPLOYMENT_NAME}
 | |
|   namespace: ${JOB_ENV}
 | |
| spec:
 | |
|   replicas: 1
 | |
|   selector:
 | |
|     matchLabels:
 | |
|       name: ${DEPLOYMENT_NAME}
 | |
|   template:
 | |
|     metadata:
 | |
|       labels:
 | |
|         name: ${DEPLOYMENT_NAME}
 | |
|     spec:
 | |
|       containers:
 | |
|         - name: ${DEPLOYMENT_NAME}
 | |
|           image: ${HARBOR_URL}/${JOB_ENV}/${JOB_NAME}:${CommitHash}-${BUILD_NUM}
 | |
|           imagePullPolicy: Always
 | |
|           resources:
 | |
|             limits:
 | |
|               memory: ${DOCKER_MEM}
 | |
|               cpu: ${DOCKER_CPU}
 | |
|             requests:
 | |
|               memory: 100Mi
 | |
|               cpu: 80m
 | |
|           ports:
 | |
|             - containerPort: ${EXPOSED_PORT}
 | |
|               protocol: TCP
 | |
|           livenessProbe:
 | |
|             tcpSocket:
 | |
|               port: ${EXPOSED_PORT}
 | |
|             initialDelaySeconds: 10
 | |
|             timeoutSeconds: 5
 | |
|             successThreshold: 1
 | |
|             failureThreshold: 5
 | |
|             periodSeconds: 300
 | |
|           readinessProbe:
 | |
|             tcpSocket:
 | |
|               port: ${EXPOSED_PORT}
 | |
|             initialDelaySeconds: 10
 | |
|             timeoutSeconds: 5
 | |
|             successThreshold: 1
 | |
|             failureThreshold: 5
 | |
|             periodSeconds: 60
 | |
|           volumeMounts:
 | |
|             - name: localtime
 | |
|               mountPath: /etc/localtime
 | |
|             - name: config
 | |
|               mountPath: ${CONF_PATH}
 | |
|       volumes:
 | |
|         - name: localtime
 | |
|           hostPath:
 | |
|             path: /usr/share/zoneinfo/UTC
 | |
|         - name: config
 | |
|           configMap:
 | |
|             name: ${CONFIGMAP_NAME}
 | |
|       restartPolicy: Always
 |