Skip to content

Commit 62a551d

Browse files
committed
group
1 parent 4b1b26c commit 62a551d

File tree

9 files changed

+78
-11
lines changed

9 files changed

+78
-11
lines changed

mse-simple-demo/A/src/main/java/com/alibabacloud/mse/demo/a/AController.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ class AController {
4545
@Autowired
4646
InetUtils inetUtils;
4747

48-
@Reference(application = "${dubbo.application.id}", version = "1.2.0")
48+
@Reference(application = "${dubbo.application.id}", version = "1.2.0", group = "DEFAULT_GROUP")
4949
private HelloServiceB helloServiceB;
5050

51-
@Reference(application = "${dubbo.application.id}", version = "1.2.0")
51+
@Reference(application = "${dubbo.application.id}", version = "1.2.0", group = "DEFAULT_GROUP")
5252
private HelloServiceBTwo helloServiceBTwo;
5353

5454
@Autowired

mse-simple-demo/A/src/main/java/com/alibabacloud/mse/demo/a/service/HelloServiceAImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
import org.springframework.beans.factory.annotation.Autowired;
88
import org.springframework.cloud.commons.util.InetUtils;
99

10-
@Service(version = "1.2.0")
10+
@Service(version = "1.2.0", group = "DEFAULT_GROUP")
1111
public class HelloServiceAImpl implements HelloServiceA {
1212

1313
@Autowired
1414
InetUtils inetUtils;
1515

16-
@Reference(application = "${dubbo.application.id}", version = "1.2.0")
16+
@Reference(application = "${dubbo.application.id}", version = "1.2.0", group = "DEFAULT_GROUP")
1717
private HelloServiceB helloServiceB;
1818

1919
@Autowired
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.alibabacloud.mse.demo.c.service;
2+
3+
public interface HelloServiceC {
4+
String hello(String name);
5+
String world(String name);
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.alibabacloud.mse.demo.c.service;
2+
3+
public interface HelloServiceCTwo {
4+
String hello2(String name);
5+
String world2(String name);
6+
}

mse-simple-demo/B/src/main/java/com/alibabacloud/mse/demo/b/service/HelloServiceBImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import java.util.Random;
1010
import java.util.concurrent.TimeUnit;
1111

12-
@Service(version = "1.2.0")
12+
@Service(version = "1.2.0", group = "DEFAULT_GROUP")
1313
public class HelloServiceBImpl implements HelloServiceB {
1414

1515
@Autowired
@@ -18,7 +18,7 @@ public class HelloServiceBImpl implements HelloServiceB {
1818
@Autowired
1919
String serviceTag;
2020

21-
@Reference(application = "${dubbo.application.id}", version = "1.2.0")
21+
@Reference(application = "${dubbo.application.id}", version = "1.2.0", group = "DEFAULT_GROUP")
2222
private HelloServiceC helloServiceC;
2323

2424
private static final Random RANDOM = new Random();

mse-simple-demo/B/src/main/java/com/alibabacloud/mse/demo/b/service/HelloServiceBTwoImpl.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.alibabacloud.mse.demo.b.service;
22

3-
import com.alibabacloud.mse.demo.c.service.HelloServiceC;
43
import com.alibabacloud.mse.demo.c.service.HelloServiceCTwo;
54
import com.alibabacloud.mse.demo.common.TrafficAttribute;
65
import org.apache.dubbo.config.annotation.Reference;
@@ -11,7 +10,7 @@
1110
import java.util.Random;
1211
import java.util.concurrent.TimeUnit;
1312

14-
@Service(version = "1.2.0")
13+
@Service(version = "1.2.0", group = "DEFAULT_GROUP")
1514
public class HelloServiceBTwoImpl implements HelloServiceBTwo {
1615

1716
@Autowired
@@ -20,7 +19,7 @@ public class HelloServiceBTwoImpl implements HelloServiceBTwo {
2019
@Autowired
2120
String serviceTag;
2221

23-
@Reference(application = "${dubbo.application.id}", version = "1.2.0")
22+
@Reference(application = "${dubbo.application.id}", version = "1.2.0", group = "DEFAULT_GROUP")
2423
private HelloServiceCTwo helloServiceCTwo;
2524

2625
private static final Random RANDOM = new Random();

mse-simple-demo/C/src/main/java/com/alibabacloud/mse/demo/c/service/HelloServiceCImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import java.nio.charset.StandardCharsets;
1515

1616
@Slf4j
17-
@DubboService(version = "1.2.0")
17+
@DubboService(version = "1.2.0", group = "DEFAULT_GROUP")
1818
@RequiredArgsConstructor
1919
public class HelloServiceCImpl implements HelloServiceC {
2020

mse-simple-demo/C/src/main/java/com/alibabacloud/mse/demo/c/service/HelloServiceCTwoImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import java.nio.charset.StandardCharsets;
1515

1616
@Slf4j
17-
@DubboService(version = "1.2.0")
17+
@DubboService(version = "1.2.0", group = "DEFAULT_GROUP")
1818
@RequiredArgsConstructor
1919
public class HelloServiceCTwoImpl implements HelloServiceCTwo {
2020

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: spring-cloud-b-gray
5+
namespace: {{ .Release.Namespace }}
6+
spec:
7+
replicas: 0
8+
selector:
9+
matchLabels:
10+
app: spring-cloud-b-gray
11+
version: gray
12+
strategy:
13+
rollingUpdate:
14+
maxSurge: 100%
15+
maxUnavailable: 25%
16+
type: RollingUpdate
17+
template:
18+
metadata:
19+
labels:
20+
# msePilotAutoEnable: "on"
21+
msePilotCreateAppName: "spring-cloud-b"
22+
alicloud.service.tag: gray
23+
app: "spring-cloud-b-gray"
24+
version: gray
25+
spec:
26+
containers:
27+
- name: spring-cloud-b
28+
image: "{{ .Values.registry }}spring-cloud-b:{{ .Values.images.version }}"
29+
imagePullPolicy: Always
30+
env:
31+
- name: nacos.host
32+
value: "{{ .Values.nacos.host }}"
33+
- name: nacos.namespace
34+
value: "{{ .Values.nacos.namespace }}"
35+
{{ if .Values.MSE_DEBUG_HOST }}
36+
- name: MSE_DEBUG_HOST
37+
value: {{ .Values.MSE_DEBUG_HOST }}
38+
{{ end }}
39+
resources:
40+
{{ if .Values.resources.enable }}
41+
requests:
42+
cpu: {{ .Values.resources.request.cpu }}
43+
memory: {{ .Values.resources.request.memory }}
44+
limits:
45+
cpu: {{ .Values.resources.limit.cpu }}
46+
memory: {{ .Values.resources.limit.memory }}
47+
{{ end }}
48+
ports:
49+
- name: http-port
50+
containerPort: 20001
51+
hostAliases:
52+
{{ toYaml .Values.hostAliases | nindent 8 }}
53+
affinity:
54+
podAntiAffinity:
55+
requiredDuringSchedulingIgnoredDuringExecution:
56+
- topologyKey: topology.kubernetes.io/zone

0 commit comments

Comments
 (0)