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