Updated path matchers to be more user friendly, added better test examples in README.md

This commit is contained in:
Ben Swenka 2024-02-14 12:12:48 -07:00 committed by Wiktor Niesiobędzki
parent d11c380aec
commit 4513d7de0a
2 changed files with 10 additions and 3 deletions

View File

@ -84,7 +84,14 @@ __Congratulations__! You have successfully deployed an HTTP Load Balancer with C
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

View File

@ -89,12 +89,12 @@ resource "google_compute_url_map" "default" {
default_service = google_compute_backend_service.backend-a.id
path_rule {
paths = ["/b/*"]
paths = ["/anything/b/*"]
service = google_compute_backend_service.backend-b.id
}
path_rule {
paths = ["/*"]
paths = ["/anything/a/*"]
service = google_compute_backend_service.backend-a.id
}
}