File tree Expand file tree Collapse file tree 5 files changed +123
-3
lines changed Expand file tree Collapse file tree 5 files changed +123
-3
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ WORKDIR /home/gradle/src
75
75
RUN gradle :envoy-control-runner:assemble --parallel --no-daemon
76
76
77
77
FROM envoyproxy/envoy-alpine-dev:6c2137468c25d167dbbe4719b0ecaf343bfb4233 as envoy
78
- COPY heroku/envoy.yaml /etc/envoy.yaml
78
+ COPY heroku/envoy1.yaml /etc/envoy1.yaml
79
+ COPY heroku/envoy2.yaml /etc/envoy2.yaml
79
80
COPY heroku/envoy-front-proxy.yaml /etc/envoy-front-proxy.yaml
80
81
COPY --from=consul /bin/consul /bin/consul
81
82
@@ -84,6 +85,7 @@ RUN mkdir /tmp/envoy-control-dist /tmp/envoy-control /bin/envoy-control /etc/env
84
85
COPY --from=build /home/gradle/src/envoy-control-runner/build/distributions/ /tmp/envoy-control-dist
85
86
COPY ./envoy-control-runner/src/main/resources/application.yaml /etc/envoy-control/
86
87
COPY heroku/register-echo1.json /etc/envoy-control/
88
+ COPY heroku/register-echo2.json /etc/envoy-control/
87
89
RUN tar -xf /tmp/envoy-control-dist/envoy-control-runner*.tar -C /tmp/envoy-control
88
90
RUN mv /tmp/envoy-control/envoy-control-runner*/ /bin/envoy-control/envoy-control-runner
89
91
# APP_PORT: 8080
Original file line number Diff line number Diff line change @@ -27,10 +27,15 @@ node:
27
27
add_upstream_external_address_header : true
28
28
resources_dir : " /etc/envoy/extra"
29
29
proxy_settings :
30
+ incoming :
31
+ endpoints :
32
+ - pathPrefix : " /"
33
+ clients : ["echo2"]
30
34
outgoing :
31
35
dependencies :
32
36
- service : " consul"
33
37
- service : " echo1"
38
+ - service : " echo2"
34
39
static_resources :
35
40
listeners :
36
41
- name : ingress_direct_response
@@ -60,7 +65,7 @@ static_resources:
60
65
direct_response :
61
66
status : 200
62
67
body :
63
- inline_string : " Hello"
68
+ inline_string : " Hello from echo1 "
64
69
http_filters :
65
70
- name : envoy.filters.http.router
66
71
clusters :
Original file line number Diff line number Diff line change
1
+ admin :
2
+ access_log_path : /dev/stdout
3
+ address :
4
+ socket_address :
5
+ address : 0.0.0.0
6
+ port_value : 10022
7
+ dynamic_resources :
8
+ lds_config : {ads: {}}
9
+ cds_config : {ads: {}}
10
+ ads_config :
11
+ api_type : GRPC
12
+ grpc_services :
13
+ envoy_grpc :
14
+ cluster_name : envoy-control-xds
15
+ node :
16
+ cluster : test-cluster
17
+ id : test-id
18
+ metadata :
19
+ service_name : " echo2"
20
+ ads : true
21
+ ingress_host : " 0.0.0.0"
22
+ ingress_port : 10020
23
+ egress_host : " 0.0.0.0"
24
+ egress_port : 10021
25
+ use_remote_address : true
26
+ access_log_enabled : false
27
+ add_upstream_external_address_header : true
28
+ resources_dir : " /etc/envoy/extra"
29
+ proxy_settings :
30
+ incoming :
31
+ endpoints :
32
+ - pathPrefix : " /"
33
+ clients : ["echo1"]
34
+ outgoing :
35
+ dependencies :
36
+ - service : " consul"
37
+ - service : " echo1"
38
+ - service : " echo2"
39
+ static_resources :
40
+ listeners :
41
+ - name : ingress_direct_response
42
+ address :
43
+ socket_address :
44
+ address : 0.0.0.0
45
+ port_value : 10023
46
+ filter_chains :
47
+ - filters :
48
+ - name : envoy.filters.network.http_connection_manager
49
+ typed_config :
50
+ " @type " : type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
51
+ use_remote_address : true
52
+ stat_prefix : ingress_http
53
+ codec_type : AUTO
54
+ route_config :
55
+ name : local_route
56
+ virtual_hosts :
57
+ - name : local_service
58
+ domains : ["*"]
59
+ routes :
60
+ - match : { prefix: "/status/envoy/"}
61
+ route :
62
+ cluster : this_admin
63
+ prefix_rewrite : " /"
64
+ - match : { path: "/" }
65
+ direct_response :
66
+ status : 200
67
+ body :
68
+ inline_string : " Hello from echo2"
69
+ http_filters :
70
+ - name : envoy.filters.http.router
71
+ clusters :
72
+ - name : local_service
73
+ connect_timeout : 1s
74
+ hosts :
75
+ - socket_address :
76
+ address : 127.0.0.1
77
+ port_value : 10023
78
+ http2_protocol_options : {}
79
+ - name : envoy-control-xds
80
+ connect_timeout : 1s
81
+ hosts :
82
+ - socket_address :
83
+ address : 127.0.0.1
84
+ port_value : 50000
85
+ http2_protocol_options : {}
86
+ - name : this_admin
87
+ type : STATIC
88
+ connect_timeout : 1s
89
+ load_assignment :
90
+ cluster_name : this_admin
91
+ endpoints :
92
+ - lb_endpoints :
93
+ - endpoint :
94
+ address :
95
+ socket_address :
96
+ address : 127.0.0.1
97
+ port_value : 10022
Original file line number Diff line number Diff line change
1
+ {
2
+ "ID" :" echo2" ,
3
+ "Name" :" echo2" ,
4
+ "Tags" :[
5
+ " primary"
6
+ ],
7
+ "Address" :" 127.0.0.1" ,
8
+ "Port" :10020 ,
9
+ "Check" :{
10
+ "DeregisterCriticalServiceAfter" :" 90m" ,
11
+ "http" :" http://127.0.0.1:10020" ,
12
+ "Interval" :" 10s"
13
+ }
14
+ }
15
+
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ echo "Launching Envoy-control with $START_ARGUMENTS"
15
15
16
16
# start envoys
17
17
sed -i " s/{{.IngressListenerPort}}/${PORT:- 10000} /g" /etc/envoy-front-proxy.yaml
18
- sh -c ' sleep 20; /usr/local/bin/envoy --base-id 1 -c /etc/envoy.yaml' &
18
+ sh -c ' sleep 20; /usr/local/bin/envoy --base-id 1 -c /etc/envoy1.yaml' &
19
+ sh -c ' sleep 20; /usr/local/bin/envoy --base-id 2 -c /etc/envoy2.yaml' &
19
20
/usr/local/bin/envoy -c /etc/envoy-front-proxy.yaml &
20
21
21
22
sh -c ' sleep 25; curl -X PUT -s localhost:8500/v1/agent/service/register -T /etc/envoy-control/register-echo1.json' &
You can’t perform that action at this time.
0 commit comments