VOL-417 Changes to the proxy config to eliminate the use of camelCase and also
to ensure that null/false/0 values are also shown. Also added a fix
to enable the health service and the schema service.
Change-Id: I954faff7015aed39b7b586b7eeaf1636d91a0878
diff --git a/envoy/front-proxy/voltha-grpc-proxy-no-http.template.json b/envoy/front-proxy/voltha-grpc-proxy-no-http.template.json
index fcdc8a4..4741d34 100644
--- a/envoy/front-proxy/voltha-grpc-proxy-no-http.template.json
+++ b/envoy/front-proxy/voltha-grpc-proxy-no-http.template.json
@@ -37,6 +37,11 @@
},
{
"timeout_ms": 0,
+ "prefix": "/voltha.HealthService",
+ "cluster": "voltha-grpc"
+ },
+ {
+ "timeout_ms": 0,
"prefix": "/voltha.",
"cluster": "voltha-grpc"
},
@@ -55,12 +60,12 @@
"name": "grpc_json_transcoder",
"config": {
"proto_descriptor": "/envoy/proto.pb",
- "services": ["voltha.VolthaGlobalService"],
+ "services": ["voltha.VolthaGlobalService","voltha.HealthService","schema.SchemaService"],
"print_options": {
"add_whitespace": false,
- "always_print_primitive_fields": false,
+ "always_print_primitive_fields": true,
"always_print_enums_as_ints": false,
- "preserve_proto_field_names": false
+ "preserve_proto_field_names": true
}
}
@@ -107,6 +112,11 @@
},
{
"timeout_ms": 0,
+ "prefix": "/voltha.HealthService",
+ "cluster": "voltha-grpc"
+ },
+ {
+ "timeout_ms": 0,
"prefix": "/voltha.",
"cluster": "voltha-grpc"
},
diff --git a/envoy/front-proxy/voltha-grpc-proxy-no-https.template.json b/envoy/front-proxy/voltha-grpc-proxy-no-https.template.json
index 22e7788..7c5ba2e 100644
--- a/envoy/front-proxy/voltha-grpc-proxy-no-https.template.json
+++ b/envoy/front-proxy/voltha-grpc-proxy-no-https.template.json
@@ -32,6 +32,11 @@
},
{
"timeout_ms": 0,
+ "prefix": "/voltha.HealthService",
+ "cluster": "voltha-grpc"
+ },
+ {
+ "timeout_ms": 0,
"prefix": "/voltha.",
"cluster": "voltha-grpc"
},
@@ -50,12 +55,12 @@
"name": "grpc_json_transcoder",
"config": {
"proto_descriptor": "/envoy/proto.pb",
- "services": ["voltha.VolthaGlobalService"],
+ "services": ["voltha.VolthaGlobalService","voltha.HealthService","schema.SchemaService"],
"print_options": {
"add_whitespace": false,
- "always_print_primitive_fields": false,
+ "always_print_primitive_fields": true,
"always_print_enums_as_ints": false,
- "preserve_proto_field_names": false
+ "preserve_proto_field_names": true
}
}
@@ -102,6 +107,11 @@
},
{
"timeout_ms": 0,
+ "prefix": "/voltha.HealthService",
+ "cluster": "voltha-grpc"
+ },
+ {
+ "timeout_ms": 0,
"prefix": "/voltha.",
"cluster": "voltha-grpc"
},
diff --git a/envoy/front-proxy/voltha-grpc-proxy.template.json b/envoy/front-proxy/voltha-grpc-proxy.template.json
index a8e41ee..5ba984f 100644
--- a/envoy/front-proxy/voltha-grpc-proxy.template.json
+++ b/envoy/front-proxy/voltha-grpc-proxy.template.json
@@ -37,6 +37,11 @@
},
{
"timeout_ms": 0,
+ "prefix": "/voltha.HealthService",
+ "cluster": "voltha-grpc"
+ },
+ {
+ "timeout_ms": 0,
"prefix": "/voltha.",
"cluster": "voltha-grpc"
},
@@ -55,12 +60,12 @@
"name": "grpc_json_transcoder",
"config": {
"proto_descriptor": "/envoy/proto.pb",
- "services": ["voltha.VolthaGlobalService"],
+ "services": ["voltha.VolthaGlobalService","voltha.HealthService","schema.SchemaService"],
"print_options": {
"add_whitespace": false,
- "always_print_primitive_fields": false,
+ "always_print_primitive_fields": true,
"always_print_enums_as_ints": false,
- "preserve_proto_field_names": false
+ "preserve_proto_field_names": true
}
}
@@ -107,6 +112,11 @@
},
{
"timeout_ms": 0,
+ "prefix": "/voltha.HealthService",
+ "cluster": "voltha-grpc"
+ },
+ {
+ "timeout_ms": 0,
"prefix": "/voltha.",
"cluster": "voltha-grpc"
},
@@ -125,12 +135,12 @@
"name": "grpc_json_transcoder",
"config": {
"proto_descriptor": "/envoy/proto.pb",
- "services": ["voltha.VolthaGlobalService"],
+ "services": ["voltha.VolthaGlobalService","voltha.HealthService","schema.SchemaService"],
"print_options": {
"add_whitespace": false,
- "always_print_primitive_fields": false,
+ "always_print_primitive_fields": true,
"always_print_enums_as_ints": false,
- "preserve_proto_field_names": false
+ "preserve_proto_field_names": true
}
}
@@ -177,6 +187,11 @@
},
{
"timeout_ms": 0,
+ "prefix": "/voltha.HealthService",
+ "cluster": "voltha-grpc"
+ },
+ {
+ "timeout_ms": 0,
"prefix": "/voltha.",
"cluster": "voltha-grpc"
},
@@ -214,9 +229,15 @@
"lb_type": "round_robin",
"features": "http2",
"hosts": [
- {
- "url": "tcp://{{- .VolthaVip }}"
- }
+ {{block "viplist" .VolthaRR}}
+ {{- range .}}
+ {{- if isFirst2}}
+ {{- printf "{\"url\": \"tcp://%s\"}" . }}
+ {{- else }}
+ {{- printf ",{\"url\": \"tcp://%s\"}" . }}
+ {{- end }}
+ {{- end}}
+ {{- end}}
]
},
{