正在显示
1 个修改的文件
包含
102 行增加
和
0 行删除
deploy/k8s/dev/mmm-open-api.yaml
0 → 100644
| 1 | +apiVersion: v1 | ||
| 2 | +kind: Service | ||
| 3 | +metadata: | ||
| 4 | + name: mmm-open-api | ||
| 5 | + namespace: mmm-suplus-dev | ||
| 6 | + labels: | ||
| 7 | + k8s-app: mmm-open-api | ||
| 8 | +spec: | ||
| 9 | + ports: | ||
| 10 | + - name: "http" | ||
| 11 | + port: 80 | ||
| 12 | + targetPort: 8080 | ||
| 13 | + selector: | ||
| 14 | + k8s-app: mmm-open-api | ||
| 15 | +--- | ||
| 16 | +apiVersion: extensions/v1beta1 | ||
| 17 | +kind: Deployment | ||
| 18 | +metadata: | ||
| 19 | + name: mmm-open-api | ||
| 20 | + namespace: mmm-suplus-dev | ||
| 21 | + labels: | ||
| 22 | + k8s-app: mmm-open-api | ||
| 23 | +spec: | ||
| 24 | + replicas: 1 | ||
| 25 | + template: | ||
| 26 | + metadata: | ||
| 27 | + labels: | ||
| 28 | + k8s-app: mmm-open-api | ||
| 29 | + spec: | ||
| 30 | + affinity: | ||
| 31 | + nodeAffinity: | ||
| 32 | + preferredDuringSchedulingIgnoredDuringExecution: | ||
| 33 | + - preference: {} | ||
| 34 | + weight: 100 | ||
| 35 | + requiredDuringSchedulingIgnoredDuringExecution: | ||
| 36 | + nodeSelectorTerms: | ||
| 37 | + - matchExpressions: | ||
| 38 | + - key: kubernetes.io/hostname | ||
| 39 | + operator: In | ||
| 40 | + values: | ||
| 41 | + - cn-hangzhou.i-bp1djh1xn7taumbue1ze | ||
| 42 | + - cn-hangzhou.i-bp1djh1xn7taumbue1zd | ||
| 43 | + - cn-hangzhou.i-bp1euf5u1ph9kbhtndhb | ||
| 44 | + - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy | ||
| 45 | + containers: | ||
| 46 | + - name: mmm-open-api | ||
| 47 | + image: 192.168.0.243:5000/mmm/mmm-open-api:dev | ||
| 48 | + imagePullPolicy: Always | ||
| 49 | + volumeMounts: | ||
| 50 | + - mountPath: /opt/logs | ||
| 51 | + name: accesslogs | ||
| 52 | + - mountPath: /var/www/opp/file | ||
| 53 | + name: mmmjihuitest-pvc1 | ||
| 54 | + ports: | ||
| 55 | + - containerPort: 8080 | ||
| 56 | + env: | ||
| 57 | + - name: MYSQL_HOST | ||
| 58 | + valueFrom: | ||
| 59 | + configMapKeyRef: | ||
| 60 | + name: suplus-config | ||
| 61 | + key: mysql.host | ||
| 62 | + - name: MYSQL_PORT | ||
| 63 | + valueFrom: | ||
| 64 | + configMapKeyRef: | ||
| 65 | + name: suplus-config | ||
| 66 | + key: mysql.port | ||
| 67 | + - name: REDIS_HOST | ||
| 68 | + valueFrom: | ||
| 69 | + configMapKeyRef: | ||
| 70 | + name: suplus-config | ||
| 71 | + key: redis.ip | ||
| 72 | + - name: REDIS_PORT | ||
| 73 | + valueFrom: | ||
| 74 | + configMapKeyRef: | ||
| 75 | + name: suplus-config | ||
| 76 | + key: redis.port | ||
| 77 | + - name: MYSQL_USER | ||
| 78 | + valueFrom: | ||
| 79 | + configMapKeyRef: | ||
| 80 | + name: suplus-config | ||
| 81 | + key: mysql.user | ||
| 82 | + - name: MYSQL_PASSWORD | ||
| 83 | + valueFrom: | ||
| 84 | + configMapKeyRef: | ||
| 85 | + name: suplus-config | ||
| 86 | + key: mysql.password | ||
| 87 | + - name: MYSQL_DB_NAME | ||
| 88 | + value: "opportunity_dev" | ||
| 89 | + - name: RUN_MODE | ||
| 90 | + value: "dev-online" | ||
| 91 | + - name: LOG_LEVEL | ||
| 92 | + value: "debug" | ||
| 93 | + - name: aliyun_logs_suplusfile | ||
| 94 | + value: "stdout" | ||
| 95 | + - name: aliyun_logs_access | ||
| 96 | + value: " /opt/logs/app.log" | ||
| 97 | + volumes: | ||
| 98 | + - name: accesslogs | ||
| 99 | + emptyDir: {} | ||
| 100 | + - name: mmmjihuitest-pvc1 | ||
| 101 | + persistentVolumeClaim: | ||
| 102 | + claimName: mmmjihuitest-pvc |
-
请 注册 或 登录 后发表评论