apiVersion: apps/v1 kind: Deployment metadata: name: chafangtong namespace: fangjia spec: replicas: 1 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 revisionHistoryLimit: 5 selector: matchLabels: project: chafangtong app: fangjia template: metadata: labels: project: chafangtong app: fangjia spec: imagePullSecrets: - name: nexus-registry-secret nodeSelector: app: fangjia containers: - name: chafangtong image: 192.168.0.19:9012/chafangtong:latest imagePullPolicy: Always resources: limits: memory: "3Gi" requests: memory: "2Gi" env: - name: JAVA_OPTS value: "-Xmx3072m -XX:MaxPermSize=256m -Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml -Dfangjia.overridePropertiesLocation=/home/goojia/goojiaconfig/chafangtong.properties" readinessProbe: tcpSocket: port: 8080 initialDelaySeconds: 5 periodSeconds: 10 livenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 10 periodSeconds: 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: chafangtong namespace: fangjia labels: project: chafangtong app: fangjia spec: type: NodePort selector: project: chafangtong app: fangjia ports: - port: 8080 targetPort: 8080 nodePort: 30003