Files
main/deliverables/k8s/fangjia-open.yaml
T
2021-03-13 13:48:21 +08:00

72 lines
1.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
:apiVersion: apps/v1
kind: Deployment
metadata:
name: fangjia-open
namespace: fangjia
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
revisionHistoryLimit: 5
selector:
matchLabels:
project: fangjia-open
app: fangjia
template:
metadata:
labels:
project: fangjia-open
app: fangjia
spec:
imagePullSecrets:
- name: nexus-registry-secret
containers:
- name: fangjia-open
image: 192.168.0.19:9012/fangjia-open:latest
imagePullPolicy: Always
env:
- name: JAVA_OPTS
value: "-Xmx4096m -XX:MaxPermSize=256m
-Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml
-Dfangjia.overridePropertiesLocation=/home/goojia/goojiaconfig/fangjia-open.properties
-DMONGO.POOLSIZE=50"
ports:
- containerPort: 8080
name: web
protocol: TCP
volumeMounts:
- name: host-time
mountPath: /etc/localtime
- name: nfs
mountPath: /home/goojia/goojiaconfig
volumes:
- name: host-time
hostPath:
path: /etc/localtime
- name: nfs
nfs:
path: /home/nfs_data/goojiaconfig
server: 192.168.0.18
---
apiVersion: v1
kind: Service
metadata:
name: fangjia-open
namespace: fangjia
labels:
project: fangjia-open
app: fangjia
spec:
type: NodePort
selector:
project: fangjia-open
app: fangjia
ports:
- port: 8080
targetPort: 8080
nodePort: 38089