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

98 lines
2.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: fangjia-coresite
namespace: fangjia
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
revisionHistoryLimit: 5
selector:
matchLabels:
project: fangjia-coresite
app: fangjia
template:
metadata:
labels:
project: fangjia-coresite
app: fangjia
spec:
imagePullSecrets:
- name: nexus-registry-secret
nodeSelector:
app: fangjia
containers:
- name: fangjia-coresite
image: 192.168.0.19:9012/fangjia-coresite:latest
imagePullPolicy: Always
resources:
limits:
memory: "5Gi"
requests:
memory: "4Gi"
env:
- name: JAVA_OPTS
value: "-Xmx4096m -Xms4096m -XX:MaxPermSize=256m
-Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml
-Dfangjia.overridePropertiesLocation=/home/goojia/goojiaconfig/fangjia-coresite.properties
-DMONGO.POOLSIZE=200 -Dfangjia.disableKnowBaseCache=false"
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
ports:
- containerPort: 8080
name: web
protocol: TCP
volumeMounts:
- name: host-time
mountPath: /etc/localtime
- name: goojiaconfig
mountPath: /home/goojia/goojiaconfig
volumes:
- name: host-time
hostPath:
path: /etc/localtime
- name: goojiaconfig
cephfs:
monitors:
- 192.168.0.208:6789
- 192.168.0.209:6789
- 192.168.0.210:6789
user: admin
path: /k8s/goojiaconfig
secretRef:
name: ceph-secret
readOnly: false
---
apiVersion: v1
kind: Service
metadata:
name: fangjia-coresite
namespace: fangjia
labels:
project: fangjia-coresite
app: fangjia
spec:
type: NodePort
selector:
project: fangjia-coresite
app: fangjia
ports:
- port: 8080
targetPort: 8080
nodePort: 30002