apiVersion: apps/v1 kind: Deployment metadata: name: fangjia-static namespace: fangjia spec: replicas: 2 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 revisionHistoryLimit: 5 selector: matchLabels: project: fangjia-static app: fangjia template: metadata: labels: project: fangjia-static app: fangjia spec: imagePullSecrets: - name: nexus-registry-secret nodeSelector: app: fangjia containers: - name: fangjia-static image: 192.168.0.19:9012/fangjia-static:latest imagePullPolicy: Always resources: limits: memory: "2Gi" requests: memory: "1Gi" env: - name: JAVA_OPTS value: "-Xmx2048m -XX:MaxPermSize=256m -Dfangjia.wartermarkimage=/home/goojia/goojiaconfig/warter-marker.png -Dfangjia.downloadTimeout=30000 -Dfangjia.downloadPoolSize=4 -Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml -Dfs.mongo.port=27000 -Dcapped.mongo.port=27000 -Dfangjia.blackList=soufunimg.com,soufun.com,koofang.com,baixing.net -Dfangjia.important.category=district,shop,office,avatar,flash,user_house,upload" 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: fangjia-static namespace: fangjia labels: project: fangjia-static app: fangjia annotations: fangjia.com/app: 房价网静态资源服务 spec: type: NodePort selector: project: fangjia-static app: fangjia ports: - port: 8080 targetPort: 8080 nodePort: 30013