apiVersion: apps/v1 kind: Deployment metadata: name: fangjia-bkoff namespace: fangjia spec: replicas: 1 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 revisionHistoryLimit: 5 selector: matchLabels: project: fangjia-bkoff app: fangjia template: metadata: labels: project: fangjia-bkoff app: fangjia spec: hostAliases: - ip: "192.168.0.38" hostnames: - "seaweed.db.fangjia.com" imagePullSecrets: - name: nexus-registry-secret nodeSelector: app: fangjia containers: - name: fangjia-bkoff image: 192.168.0.19:9012/fangjia-bkoff:latest imagePullPolicy: Always env: - name: JAVA_OPTS value: "-Dfangjia.overridePropertiesLocation=/home/goojia/goojiaconfig/fangjia-bkoff.properties -Dfs.mongo.port=27000 -Denable.safeLog=true -Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml" 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 - name: logs mountPath: /home/goojia/logs 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 - name: logs cephfs: monitors: - 192.168.0.208:6789 - 192.168.0.209:6789 - 192.168.0.210:6789 user: admin path: /k8s/fangjia-bkoff/logs secretRef: name: ceph-secret readOnly: false --- apiVersion: v1 kind: Service metadata: name: fangjia-bkoff namespace: fangjia labels: project: fangjia-bkoff app: fangjia spec: type: NodePort selector: project: fangjia-bkoff app: fangjia ports: - port: 8080 targetPort: 8080 nodePort: 30005