Merge branch 'preonline' into dev
正在显示
4 个修改的文件
包含
160 行增加
和
1 行删除
deploy/k8s/preonline/.gitkeep
0 → 100644
1 | +apiVersion: v1 | ||
2 | +kind: Service | ||
3 | +metadata: | ||
4 | + name: allied-creation-user | ||
5 | + namespace: mmm-suplus-preonline | ||
6 | + labels: | ||
7 | + k8s-app: allied-creation-user | ||
8 | +spec: | ||
9 | + ports: | ||
10 | + - name: "http" | ||
11 | + port: 80 | ||
12 | + targetPort: 8082 | ||
13 | + selector: | ||
14 | + k8s-app: allied-creation-user | ||
15 | +--- | ||
16 | +apiVersion: extensions/v1beta1 | ||
17 | +kind: Deployment | ||
18 | +metadata: | ||
19 | + name: allied-creation-user | ||
20 | + namespace: mmm-suplus-preonline | ||
21 | + labels: | ||
22 | + k8s-app: allied-creation-user | ||
23 | +spec: | ||
24 | + replicas: 1 | ||
25 | + template: | ||
26 | + metadata: | ||
27 | + labels: | ||
28 | + k8s-app: allied-creation-user | ||
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: allied-creation-user | ||
47 | + image: 192.168.0.243:5000/mmm/allied-creation-user:preonline | ||
48 | + imagePullPolicy: Always | ||
49 | + ports: | ||
50 | + - containerPort: 8082 | ||
51 | + volumeMounts: | ||
52 | + - mountPath: /opt/logs | ||
53 | + name: accesslogs | ||
54 | + env: | ||
55 | + - name: POSTGRESQL_DB_NAME | ||
56 | + valueFrom: | ||
57 | + configMapKeyRef: | ||
58 | + name: suplus-config | ||
59 | + key: postgresqlalliedcreation.dbname | ||
60 | + - name: POSTGRESQL_USER | ||
61 | + valueFrom: | ||
62 | + configMapKeyRef: | ||
63 | + name: suplus-config | ||
64 | + key: postgresql.user | ||
65 | + - name: POSTGRESQL_PASSWORD | ||
66 | + valueFrom: | ||
67 | + configMapKeyRef: | ||
68 | + name: suplus-config | ||
69 | + key: postgresql.password | ||
70 | + - name: POSTGRESQL_HOST | ||
71 | + valueFrom: | ||
72 | + configMapKeyRef: | ||
73 | + name: suplus-config | ||
74 | + key: postgresql.host | ||
75 | + - name: POSTGRESQL_PORT | ||
76 | + valueFrom: | ||
77 | + configMapKeyRef: | ||
78 | + name: suplus-config | ||
79 | + key: postgresql.port | ||
80 | + - name: REDIS_HOST | ||
81 | + valueFrom: | ||
82 | + configMapKeyRef: | ||
83 | + name: suplus-config | ||
84 | + key: redis.ip | ||
85 | + - name: REDIS_PORT | ||
86 | + valueFrom: | ||
87 | + configMapKeyRef: | ||
88 | + name: suplus-config | ||
89 | + key: redis.port | ||
90 | + - name: REDIS_AUTH | ||
91 | + value: "" | ||
92 | + - name: LOG_LEVEL | ||
93 | + value: "debug" | ||
94 | + - name: ERROR_BASE_CODE | ||
95 | + value: "1" | ||
96 | + - name: ERROR_BASE_CODE_MULTIPLE | ||
97 | + value: "1000" | ||
98 | + - name: ENABLE_KAFKA_LOG | ||
99 | + value: "true" | ||
100 | + - name: HTTP_PORT | ||
101 | + value: "8082" | ||
102 | + - name: REDIS_HOST | ||
103 | + valueFrom: | ||
104 | + configMapKeyRef: | ||
105 | + name: suplus-config | ||
106 | + key: redis.ip | ||
107 | + - name: REDIS_PORT | ||
108 | + valueFrom: | ||
109 | + configMapKeyRef: | ||
110 | + name: suplus-config | ||
111 | + key: redis.port | ||
112 | + - name: SERVICE_ENV | ||
113 | + value: "pre" | ||
114 | + volumes: | ||
115 | + - name: accesslogs | ||
116 | + emptyDir: {} |
deploy/k8s/preonline/install.sh
0 → 100644
1 | +#!/bin/bash | ||
2 | +export PATH=/root/local/bin:$PATH | ||
3 | +kubectl -n mmm-suplus-preonline get pods | grep -q allied-creation-user | ||
4 | +if [ "$?" == "1" ];then | ||
5 | + kubectl create -f /tmp/preonline/allied-creation-user/allied-creation-user.yaml --record | ||
6 | + kubectl -n mmm-suplus-preonline get svc | grep -q allied-creation-user | ||
7 | + if [ "$?" == "0" ];then | ||
8 | + echo "allied-creation-user service install success!" | ||
9 | + else | ||
10 | + echo "allied-creation-user service install fail!" | ||
11 | + fi | ||
12 | + kubectl -n mmm-suplus-preonline get pods | grep -q allied-creation-user | ||
13 | + if [ "$?" == "0" ];then | ||
14 | + echo "allied-creation-user deployment install success!" | ||
15 | + else | ||
16 | + echo "allied-creation-user deployment install fail!" | ||
17 | + fi | ||
18 | +else | ||
19 | + kubectl delete -f /tmp/preonline/allied-creation-user/allied-creation-user.yaml | ||
20 | + kubectl -n mmm-suplus-preonline get svc | grep -q allied-creation-user | ||
21 | + while [ "$?" == "0" ] | ||
22 | + do | ||
23 | + kubectl -n mmm-suplus-preonline get svc | grep -q allied-creation-user | ||
24 | + done | ||
25 | + kubectl -n mmm-suplus-preonline get pods | grep -q allied-creation-user | ||
26 | + while [ "$?" == "0" ] | ||
27 | + do | ||
28 | + kubectl -n mmm-suplus-preonline get pods | grep -q allied-creation-user | ||
29 | + done | ||
30 | + kubectl create -f /tmp/preonline/allied-creation-user/allied-creation-user.yaml --record | ||
31 | + kubectl -n mmm-suplus-preonline get svc | grep -q allied-creation-user | ||
32 | + if [ "$?" == "0" ];then | ||
33 | + echo "allied-creation-user service update success!" | ||
34 | + else | ||
35 | + echo "allied-creation-user service update fail!" | ||
36 | + fi | ||
37 | + kubectl -n mmm-suplus-preonline get pods | grep -q allied-creation-user | ||
38 | + if [ "$?" == "0" ];then | ||
39 | + echo "allied-creation-user deployment update success!" | ||
40 | + else | ||
41 | + echo "allied-creation-user deployment update fail!" | ||
42 | + fi | ||
43 | +fi |
@@ -16,7 +16,7 @@ type ListOrgQuery struct { | @@ -16,7 +16,7 @@ type ListOrgQuery struct { | ||
16 | // 查询限制 | 16 | // 查询限制 |
17 | Limit int `cname:"查询限制" json:"limit,omitempty"` | 17 | Limit int `cname:"查询限制" json:"limit,omitempty"` |
18 | // 企业id | 18 | // 企业id |
19 | - CompanyId int64 `cname:"企业id" json:"companyId" valid:"Required"` | 19 | + CompanyId int64 `cname:"企业id" json:"companyId"` |
20 | // 组织编码 | 20 | // 组织编码 |
21 | OrgCode string `cname:"组织编码" json:"orgCode,omitempty"` | 21 | OrgCode string `cname:"组织编码" json:"orgCode,omitempty"` |
22 | // 部门名称 | 22 | // 部门名称 |
-
请 注册 或 登录 后发表评论