Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<properties>
<source.level>1.8</source.level>
<target.level>1.8</target.level>
<dubbo.version>3.1.0</dubbo.version>
<dubbo.version>4.0</dubbo.version>
<spring.version>4.3.29.RELEASE</spring.version>
<junit.version>4.13.1</junit.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ metadata:
name: dubbo-samples-xds-consumer
namespace: dubbo-demo
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
app: dubbo-samples-xds-consumer
Expand All @@ -30,7 +30,7 @@ spec:
spec:
containers:
- name: server
image: apache/dubbo-demo:dubbo-samples-xds-consumer_0.0.1
image: aamingaa/dubbo-demo:dubbo-samples-xds-consumer_0.0.1
livenessProbe:
httpGet:
path: /live
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<properties>
<source.level>1.8</source.level>
<target.level>1.8</target.level>
<dubbo.version>3.1.0</dubbo.version>
<dubbo.version>4.0</dubbo.version>
<spring.version>4.3.29.RELEASE</spring.version>
<junit.version>4.13.1</junit.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: apps/v1
kind: Deployment
metadata:
name: dubbo-samples-xds-provider-v2
namespace: dubbo-demo
spec:
replicas: 1
selector:
matchLabels:
app: dubbo-samples-xds-provider
version: v2
template:
metadata:
labels:
app: dubbo-samples-xds-provider
version: v2
spec:
containers:
- name: server
image: aamingaa/dubbo-demo:dubbo-samples-xds-provider_0.0.1
livenessProbe:
httpGet:
path: /live
port: 22222
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
httpGet:
path: /ready
port: 22222
initialDelaySeconds: 5
periodSeconds: 5
startupProbe:
httpGet:
path: /startup
port: 22222
failureThreshold: 30
periodSeconds: 10
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: dubbo-samples-xds-provider
name: dubbo-samples-xds-provider-v1
namespace: dubbo-demo
spec:
replicas: 3
replicas: 1
selector:
matchLabels:
app: dubbo-samples-xds-provider
version: v1
template:
metadata:
labels:
app: dubbo-samples-xds-provider
version: v1
spec:
containers:
- name: server
image: apache/dubbo-demo:dubbo-samples-xds-provider_0.0.1
image: aamingaa/dubbo-demo:dubbo-samples-xds-provider_0.0.1
livenessProbe:
httpGet:
path: /live
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: dubbo-samples-xds-provider
namespace: dubbo-demo
spec:
hosts:
- dubbo-samples-xds-provider.dubbo-demo.svc.cluster.local
http:
- route:
- destination:
host: dubbo-samples-xds-provider.dubbo-demo.svc.cluster.local
subset: v1
port:
# Specifies the port on the host being addressed. If the service exposes only one port, you don't need to choose the port explicitly
number: 50051
weight: 90
- destination:
host: dubbo-samples-xds-provider.dubbo-demo.svc.cluster.local
subset: v2
port:
# Specifies the port on the host being addressed. If the service exposes only one port, you don't need to choose the port explicitly
number: 50051
weight: 10

---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: dubbo-samples-xds-provider
namespace: dubbo-demo
spec:
host: dubbo-samples-xds-provider.dubbo-demo.svc.cluster.local
trafficPolicy:
loadBalancer:
# Envoy load balancing strategy
simple: ROUND_ROBIN
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2