Skip to content

Instantly share code, notes, and snippets.

@mandarjog
Last active March 25, 2019 19:20
Show Gist options
  • Save mandarjog/a3779816f2b4f094c53bf39730152506 to your computer and use it in GitHub Desktop.
Save mandarjog/a3779816f2b4f094c53bf39730152506 to your computer and use it in GitHub Desktop.
1.1 route config examples
{
"name": "svc01-0.local:80",
"domains": [
"svc01-0.local",
"svc01-0.local:80"
],
"routes": [
{
"match": {
"prefix": "/"
},
"route": {
"cluster": "outbound|8080|all|svc01-0.service-graph01.svc.cluster.local",
"timeout": "0s",
"retry_policy": {
"retry_on": "connect-failure,refused-stream,unavailable,cancelled,resource-exhausted,retriable-status-codes",
"num_retries": 2,
"retry_host_predicate": [
{
"name": "envoy.retry_host_predicates.previous_hosts"
}
],
"host_selection_retry_max_attempts": "3",
"retriable_status_codes": [
503
]
},
"max_grpc_timeout": "0s"
},
"metadata": {
"filter_metadata": {
"istio": {
"config": "/apis/networking/v1alpha3/namespaces/service-graph01/virtual-service/entrypoint"
}
}
},
"decorator": {
"operation": "svc01-0.service-graph01.svc.cluster.local:8080/*"
},
"per_filter_config": {
"mixer": {
"forward_attributes": {
"attributes": {
"destination.service.namespace": {
"string_value": "service-graph01"
},
"destination.service.name": {
"string_value": "svc01-0"
},
"destination.service.uid": {
"string_value": "istio://service-graph01/services/svc01-0"
},
"destination.service.host": {
"string_value": "svc01-0.service-graph01.svc.cluster.local"
}
}
},
"mixer_attributes": {
"attributes": {
"destination.service.uid": {
"string_value": "istio://service-graph01/services/svc01-0"
},
"destination.service.host": {
"string_value": "svc01-0.service-graph01.svc.cluster.local"
},
"destination.service.namespace": {
"string_value": "service-graph01"
},
"destination.service.name": {
"string_value": "svc01-0"
}
}
},
"disable_check_calls": true
}
}
}
]
},
{
"name": "svc00-0.local:80",
"domains": [
"svc00-0.local",
"svc00-0.local:80"
],
"routes": [
{
"match": {
"prefix": "/"
},
"route": {
"weighted_clusters": {
"clusters": [
{
"name": "outbound|8080|v1|svc00-0.service-graph00.svc.cluster.local",
"weight": 10,
"per_filter_config": {
"mixer": {
"forward_attributes": {
"attributes": {
"destination.service.name": {
"string_value": "svc00-0"
},
"destination.service.namespace": {
"string_value": "service-graph00"
},
"destination.service.host": {
"string_value": "svc00-0.service-graph00.svc.cluster.local"
},
"destination.service.uid": {
"string_value": "istio://service-graph00/services/svc00-0"
}
}
},
"mixer_attributes": {
"attributes": {
"destination.service.uid": {
"string_value": "istio://service-graph00/services/svc00-0"
},
"destination.service.host": {
"string_value": "svc00-0.service-graph00.svc.cluster.local"
},
"destination.service.namespace": {
"string_value": "service-graph00"
},
"destination.service.name": {
"string_value": "svc00-0"
}
}
},
"disable_check_calls": true
}
}
},
{
"name": "outbound|8080|v2|svc00-0.service-graph00.svc.cluster.local",
"weight": 90,
"per_filter_config": {
"mixer": {
"forward_attributes": {
"attributes": {
"destination.service.name": {
"string_value": "svc00-0"
},
"destination.service.namespace": {
"string_value": "service-graph00"
},
"destination.service.host": {
"string_value": "svc00-0.service-graph00.svc.cluster.local"
},
"destination.service.uid": {
"string_value": "istio://service-graph00/services/svc00-0"
}
}
},
"mixer_attributes": {
"attributes": {
"destination.service.host": {
"string_value": "svc00-0.service-graph00.svc.cluster.local"
},
"destination.service.uid": {
"string_value": "istio://service-graph00/services/svc00-0"
},
"destination.service.namespace": {
"string_value": "service-graph00"
},
"destination.service.name": {
"string_value": "svc00-0"
}
}
},
"disable_check_calls": true
}
}
}
]
},
"timeout": "0s",
"retry_policy": {
"retry_on": "connect-failure,refused-stream,unavailable,cancelled,resource-exhausted,retriable-status-codes",
"num_retries": 2,
"retry_host_predicate": [
{
"name": "envoy.retry_host_predicates.previous_hosts"
}
],
"host_selection_retry_max_attempts": "3",
"retriable_status_codes": [
503
]
},
"max_grpc_timeout": "0s"
},
"metadata": {
"filter_metadata": {
"istio": {
"config": "/apis/networking/v1alpha3/namespaces/service-graph00/virtual-service/entrypoint"
}
}
},
"decorator": {
"operation": "entrypoint:80/*"
},
"per_filter_config": {
"mixer": {
"disable_check_calls": true
}
}
}
]
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment