Updated path matchers to be more user friendly, added better test examples in README.md
This commit is contained in:
parent
d11c380aec
commit
4513d7de0a
|
@ -84,7 +84,14 @@ __Congratulations__! You have successfully deployed an HTTP Load Balancer with C
|
||||||
|
|
||||||
You can simply invoke the service by calling
|
You can simply invoke the service by calling
|
||||||
|
|
||||||
curl -H "Authorization: Bearer $(gcloud auth print-identity-token)" -H "Content-Type: application/json" http://$LB_IP
|
Check the default path:
|
||||||
|
curl -H "Authorization: Bearer $(gcloud auth print-identity-token)" -H "Content-Type: application/json" http://$LB_IP/anything
|
||||||
|
|
||||||
|
Specifically call the producer A path:
|
||||||
|
curl -H "Authorization: Bearer $(gcloud auth print-identity-token)" -H "Content-Type: application/json" http://$LB_IP/anything/a/*
|
||||||
|
|
||||||
|
Specifically call the producer B path:
|
||||||
|
curl -H "Authorization: Bearer $(gcloud auth print-identity-token)" -H "Content-Type: application/json" http://$LB_IP/anything/b/*
|
||||||
|
|
||||||
## Cleaning up your environment
|
## Cleaning up your environment
|
||||||
|
|
||||||
|
|
|
@ -89,12 +89,12 @@ resource "google_compute_url_map" "default" {
|
||||||
default_service = google_compute_backend_service.backend-a.id
|
default_service = google_compute_backend_service.backend-a.id
|
||||||
|
|
||||||
path_rule {
|
path_rule {
|
||||||
paths = ["/b/*"]
|
paths = ["/anything/b/*"]
|
||||||
service = google_compute_backend_service.backend-b.id
|
service = google_compute_backend_service.backend-b.id
|
||||||
}
|
}
|
||||||
|
|
||||||
path_rule {
|
path_rule {
|
||||||
paths = ["/*"]
|
paths = ["/anything/a/*"]
|
||||||
service = google_compute_backend_service.backend-a.id
|
service = google_compute_backend_service.backend-a.id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue