88 lines
1.7 KiB
HCL
88 lines
1.7 KiB
HCL
Kind = "service-router"
|
|
Name = "service-router"
|
|
|
|
Routes = [
|
|
{
|
|
Match {
|
|
HTTP {
|
|
PathPrefix = "/identity"
|
|
}
|
|
},
|
|
Destination {
|
|
Service = "identity"
|
|
}
|
|
},
|
|
{
|
|
Match {
|
|
HTTP {
|
|
PathPrefix = "/basket"
|
|
}
|
|
},
|
|
Destination {
|
|
Service = "basket"
|
|
}
|
|
},
|
|
{
|
|
Match {
|
|
HTTP {
|
|
PathPrefix = "/catalog"
|
|
}
|
|
},
|
|
Destination {
|
|
Service = "catalog"
|
|
}
|
|
},
|
|
{
|
|
Match {
|
|
HTTP {
|
|
PathPrefix = "/order"
|
|
}
|
|
},
|
|
Destination {
|
|
Service = "order"
|
|
}
|
|
},
|
|
{
|
|
Match {
|
|
HTTP {
|
|
PathPrefix = "/pricing"
|
|
}
|
|
},
|
|
Destination {
|
|
Service = "pricing"
|
|
}
|
|
},
|
|
{
|
|
Match {
|
|
HTTP {
|
|
PathPrefix = "/service"
|
|
}
|
|
#HTTP {
|
|
# Methods = ["GET", "POST", "PUT"]
|
|
#},
|
|
},
|
|
Destination {
|
|
Service = "service"
|
|
#ServiceSubset = "<service-subset-at-destination>"
|
|
#Namespace = "<namespace-at-destination>"
|
|
#Partition = "<partition-at-destination>"
|
|
#PrefixRewrite = "<new-prefix-after-routing>" ## required specifying either Routes.Match.HTTP.PathPrefix or Routes.Match.HTTP.PathExact
|
|
#RequestTimeout = 0
|
|
#IdleTimeout = 0
|
|
#NumRetries = 1
|
|
#RetryOnConnectFailure = false
|
|
#RetryOn = ["reset", "unavailable"]
|
|
#RetryOnStatusCodes = [500, 502, 503]
|
|
#RequestHeaders = {
|
|
#Set = {
|
|
# "X-Web-Version" : "<text-string>"
|
|
#}
|
|
#}
|
|
}
|
|
#ResponseHeaders = {
|
|
#Set = {
|
|
# "X-Web-Version" : "<text-string>"
|
|
#}
|
|
#}
|
|
}
|
|
] |