Files
main/deliverables/k8s/fangjia-open.yaml
T
2024-12-02 17:48:13 +08:00

91 lines
2.2 KiB
YAML

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
# readinessProbe:
# httpGet:
# path: /k8s/readiness
# port: web
# initialDelaySeconds: 5
# periodSeconds: 10
# livenessProbe:
# httpGet:
# path: /k8s/liveness
# port: web
# initialDelaySeconds: 10
# periodSeconds: 5
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-open
namespace: fangjia
labels:
project: fangjia-open
app: fangjia
spec:
type: NodePort
selector:
project: fangjia-open
app: fangjia
ports:
- port: 8080
targetPort: 8080
nodePort: 31088