otto
2 years ago
11 changed files with 265 additions and 335 deletions
@ -1,49 +0,0 @@ |
|||||||
package biz |
|
||||||
|
|
||||||
import ( |
|
||||||
"context" |
|
||||||
"git.gz.internal.jumaiyx.cn/pkg/log" |
|
||||||
"testing" |
|
||||||
"time" |
|
||||||
) |
|
||||||
|
|
||||||
func TestNewBiz(t *testing.T) { |
|
||||||
time.Sleep(time.Second * 30) |
|
||||||
} |
|
||||||
|
|
||||||
func TestCheck(t *testing.T) { |
|
||||||
l := log.DefaultLogger() |
|
||||||
build := NewBiz(l) |
|
||||||
build.Check(context.TODO()) |
|
||||||
} |
|
||||||
func TestNewBiz_Deployment(t *testing.T) { |
|
||||||
l := log.DefaultLogger() |
|
||||||
build := NewBiz(l) |
|
||||||
wg.Add(2) |
|
||||||
go func() { |
|
||||||
defer wg.Done() |
|
||||||
build.deployment(context.TODO()) |
|
||||||
}() |
|
||||||
go func() { |
|
||||||
defer wg.Done() |
|
||||||
build.deploymentDel(context.TODO()) |
|
||||||
}() |
|
||||||
wg.Wait() |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
func TestNewBiz_Service(t *testing.T) { |
|
||||||
l := log.DefaultLogger() |
|
||||||
build := NewBiz(l) |
|
||||||
wg.Add(2) |
|
||||||
go func() { |
|
||||||
defer wg.Done() |
|
||||||
build.service(context.TODO()) |
|
||||||
}() |
|
||||||
go func() { |
|
||||||
defer wg.Done() |
|
||||||
build.serviceDel(context.TODO()) |
|
||||||
}() |
|
||||||
wg.Wait() |
|
||||||
|
|
||||||
} |
|
@ -1,19 +0,0 @@ |
|||||||
apiVersion: v1 |
|
||||||
clusters: |
|
||||||
- cluster: |
|
||||||
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeU1Ea3lOekF4TXpRek9W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WQvckZBS3FHUlcxdVpLTXNYK29JL0ttVApVcHp0QStzSXhZZXlBK1VaSXJoN1NjSkZ3amVHdE1YUkJIM0RRUzRZc05SdHkxUnZjUnJXSk1uU3Z1MD0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= |
|
||||||
server: https://192.168.1.156:6443 |
|
||||||
name: kubernetes |
|
||||||
contexts: |
|
||||||
- context: |
|
||||||
cluster: kubernetes |
|
||||||
user: kubernetes-admin |
|
||||||
name: kubernetes-admin@kubernetes |
|
||||||
current-context: kubernetes-admin@kubernetes |
|
||||||
kind: Config |
|
||||||
preferences: {} |
|
||||||
users: |
|
||||||
- name: kubernetes-admin |
|
||||||
user: |
|
||||||
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM4akNDQWRxZ0F3SUJBZ0lJTFV6blJtKzZqUkV3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TWpBNU1qY3dNVE0wTXpsYUZ3MHlNekE1TWpjd01UTTBOREJhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTNYOFZrc2x3N3AxQUF3aG4KbW5nRHU3NWRUUUpXUm1EN014a3ZPN0ZiWFFXVTVHUDg3bHpEV2pMeUt2L1NqZTZ5a1VTTkE5Z21kTmRrOTY0RgpnYWpyRnRHSUZXVzM2NVFXeitRT25ZVWFHQk9VRHQ2VFloOWlSRXJIRjhsR3NRVW0vVi9NemttMXpkY284ZEtHCm5VbktDWDhyMW5yVm53UkRiRTE2VEozcFRhK2tXdmVHYlFoRW5PZHpBMkJFTDl3cWR4bUljNm1GMnFla0ZDVXoKMlF1cGtMR3JOMlBEVGd2YmdwcS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|
|
||||||
database: |
|
||||||
source: "host=192.168.1.156 user=metachat password=metachat dbname=feedback port=15433 sslmode=disable TimeZone=Asia/Shanghai" |
|
||||||
# source: postgresql://metachat:metachat@127.0.0.1:15432/room |
|
||||||
redis: |
|
||||||
addr: 192.168.1.156:16378 |
|
||||||
password: MM5ZsXL0 |
|
||||||
read_timeout: 1 |
|
||||||
write_timeout: 1 |
|
||||||
|
|
||||||
etcd: |
|
||||||
host: "127.0.0.1:20000" |
|
||||||
|
|
||||||
log: |
|
||||||
level: "debug" |
|
||||||
name: "room" |
|
||||||
kafka: |
|
||||||
addr: |
|
||||||
- "127.0.0.1:9092" |
|
||||||
amqp: |
|
||||||
host: 192.168.1.156:5672 |
|
||||||
username: jm |
|
||||||
password: jm123456 |
|
||||||
|
|
||||||
id_encode: |
|
||||||
uid: |
|
||||||
salt: "test" |
|
||||||
min_length: 8 |
|
||||||
|
|
||||||
rtctoken: |
|
||||||
app_id: 6eeb2e6be9a141d1b0db920f36a5a9f3 |
|
||||||
app_certificate: 80438856882e4563841d56f3cefeb763 |
|
||||||
privilege_expiration: 3600 |
|
||||||
token_expiration: 3600 |
|
@ -1,20 +1,24 @@ |
|||||||
apiVersion: batch/v1beta1 |
apiVersion: batch/v1beta1 |
||||||
kind: CronJob |
kind: CronJob |
||||||
metadata: |
metadata: |
||||||
name: room-hot-compute-job |
name: monitor-container-job |
||||||
namespace: dev |
namespace: unity |
||||||
spec: |
spec: |
||||||
schedule: "*/1 * * * *" |
schedule: "0 5 * * *" |
||||||
jobTemplate: |
jobTemplate: |
||||||
spec: |
spec: |
||||||
template: |
template: |
||||||
spec: |
spec: |
||||||
containers: |
containers: |
||||||
- name: room-hot-compute-job |
- name: monitor-container-job |
||||||
image: registry.internal.jumaiyx.cn/job/room-server-clear:1 |
image: registry.internal.jumaiyx.cn/job/room-server-clear:1 |
||||||
|
|
||||||
imagePullPolicy: IfNotPresent |
imagePullPolicy: IfNotPresent |
||||||
command: |
command: |
||||||
- ./server |
- ./server |
||||||
|
env: |
||||||
|
- name: JM_ENVIRONMENT |
||||||
|
value: dev |
||||||
restartPolicy: OnFailure |
restartPolicy: OnFailure |
||||||
imagePullSecrets: |
imagePullSecrets: |
||||||
- name: registry-harbor |
- name: registry-harbor |
Loading…
Reference in new issue