Date: Wed, 5 Feb 2025 05:13:42 -0800
Subject: [PATCH 12/22] Change Note to use note class
---
custom-per-route-options.html.md.erb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index 724399ed..96bd559c 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -132,8 +132,10 @@ For example:
### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm
To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`.
-Note: The command `map-route` supports the `--option` flag only for new routes.
-To update an existing route, the command `update-route` must be used as described before.
+
+
+The command map-route
supports the --option
flag only for new routes.
+To update an existing route, the command update-route
must be used as described before.
For example:
From 32d49f1c8ae3d7583a55400fc36e3caf0ee03ff6 Mon Sep 17 00:00:00 2001
From: Daria <66593181+Dariquest@users.noreply.github.com>
Date: Wed, 5 Feb 2025 14:26:25 +0100
Subject: [PATCH 13/22] Rename host MY-APP to MY-HOST
---
custom-per-route-options.html.md.erb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index 96bd559c..9e077e48 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -36,7 +36,7 @@ To configure per-route load balancing for an application that has not yet been p
applications:
- name: MY-APP
routes:
- - route: MY-APP.EXAMPLE.COM
+ - route: MY-HOST.EXAMPLE.COM
options:
loadbalancing: least-connection
```
@@ -58,10 +58,10 @@ To configure per-route load balancing for an application that has not yet been p
Alternatively, you can query the `routes` API endpoint for the app's route:
```
- cf curl /v3/routes/?hosts=MY-APP
+ cf curl /v3/routes/?hosts=MY-HOST
```
- Where `MY-APP` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm setting:
+ Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm setting:
```
"options": {"loadbalancing": "least-connection"}
@@ -75,7 +75,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun
1. Run the update-route command:
```
- cf update-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin
+ cf update-route EXAMPLE.COM --host MY-HOST--option=loadbalancing=round-robin
```
2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`).
@@ -120,7 +120,7 @@ For example:
1. Run the create-route command:
```
- cf create-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin
+ cf create-route EXAMPLE.COM --host MY-HOST --option=loadbalancing=round-robin
```
2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`).
@@ -154,7 +154,7 @@ For example:
To verify route options, you can query the route using the `route` command:
```
- cf route EXAMPLE.COM --hostname MY-APP
+ cf route EXAMPLE.COM --hostname MY-HOST
```
The response lists the chosen `loadbalancing` algorithm option, e.g. `loadbalancing`:
```
From e57290dd91bbe5cf253457176c78659c837985bd Mon Sep 17 00:00:00 2001
From: Daria <66593181+Dariquest@users.noreply.github.com>
Date: Wed, 5 Feb 2025 14:28:50 +0100
Subject: [PATCH 14/22] Correct the chapter vars
---
custom-per-route-options.html.md.erb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index 9e077e48..8cce2916 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -75,7 +75,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun
1. Run the update-route command:
```
- cf update-route EXAMPLE.COM --host MY-HOST--option=loadbalancing=round-robin
+ cf update-route EXAMPLE.COM --host MY-HOST --option=loadbalancing=round-robin
```
2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`).
@@ -114,7 +114,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun
}
```
-### Creating a Route with a specified Load Balancing Algorithm
+### Creating a Route with a specified Load Balancing Algorithm
To create a route with the per-route `loadbalancing` option, you can use the cli command `create-route`.
For example:
From 4226c08d7547b953e4cfb4e23e6349781cc21552 Mon Sep 17 00:00:00 2001
From: Daria <66593181+Dariquest@users.noreply.github.com>
Date: Wed, 5 Feb 2025 14:41:06 +0100
Subject: [PATCH 15/22] Unification
---
custom-per-route-options.html.md.erb | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index 8cce2916..d9314a8c 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -41,7 +41,7 @@ To configure per-route load balancing for an application that has not yet been p
loadbalancing: least-connection
```
- Where `MY-APP` is the name of your app and `MY-APP.EXAMPLE.COM` is the route you want to map to your app.
+ Where `MY-APP` is the name of your app and `MY-HOST.EXAMPLE.COM` is the route you want to map to your app.
1. Push the app with the manifest:
@@ -49,11 +49,11 @@ To configure per-route load balancing for an application that has not yet been p
cf push -f manifest.yml
```
-2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`).
+2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`).
The response lists the chosen `loadbalancing` algorithm option:
```
- options: {loadbalancing=least-connection}
+ options: {loadbalancing=least-connection}
```
Alternatively, you can query the `routes` API endpoint for the app's route:
@@ -81,7 +81,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun
The response lists the changed `loadbalancing` algorithm option:
```
- options: {loadbalancing: round-robin}
+ options: {loadbalancing=round-robin}
```
Alternatively, it is also possible to `cf curl` the `/v3/routes` API.
@@ -122,11 +122,11 @@ For example:
```
cf create-route EXAMPLE.COM --host MY-HOST --option=loadbalancing=round-robin
```
-2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`).
+2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`).
The response lists the changed `loadbalancing` algorithm option:
```
- options: { loadbalancing: round-robin }
+ options: {loadbalancing=round-robin}
```
### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm
@@ -143,11 +143,11 @@ For example:
```
cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin
```
-2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`).
+2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`).
The response lists the changed `loadbalancing` algorithm option:
```
- options: { loadbalancing: round-robin }
+ options: { loadbalancing=round-robin }
```
### Retrieve Route Options
@@ -158,5 +158,5 @@ To verify route options, you can query the route using the `route` command:
```
The response lists the chosen `loadbalancing` algorithm option, e.g. `loadbalancing`:
```
- options: {loadbalancing=least-connection}
+ options: {loadbalancing=least-connection}
```
From 9180f0048c1c5e8ac5460a4f21ce53a65fb3c0df Mon Sep 17 00:00:00 2001
From: Daria <66593181+Dariquest@users.noreply.github.com>
Date: Wed, 5 Feb 2025 18:06:32 +0100
Subject: [PATCH 16/22] Remove repeating route check sections
---
custom-per-route-options.html.md.erb | 78 ++++++++++------------------
1 file changed, 28 insertions(+), 50 deletions(-)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index d9314a8c..4ad56869 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -49,42 +49,18 @@ To configure per-route load balancing for an application that has not yet been p
cf push -f manifest.yml
```
-2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`).
-
- The response lists the chosen `loadbalancing` algorithm option:
- ```
- options: {loadbalancing=least-connection}
- ```
- Alternatively, you can query the `routes` API endpoint for the app's route:
-
- ```
- cf curl /v3/routes/?hosts=MY-HOST
- ```
-
- Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm setting:
-
- ```
- "options": {"loadbalancing": "least-connection"}
- ```
-
### Change Load Balancing of an Existing App
To change the per-route `loadbalancing` option of an existing route, you can use the cli command, `update-route`.
-For example, to change an app route's algorithm from `least-connection` to `round-robin`:
+For example, to change an app route's algorithm from `least-connection` to `round-robin`, you can run the `update-route` command:
-1. Run the update-route command:
```
- cf update-route EXAMPLE.COM --host MY-HOST --option=loadbalancing=round-robin
+ cf update-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin
```
-2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`).
- The response lists the changed `loadbalancing` algorithm option:
- ```
- options: {loadbalancing=round-robin}
- ```
+Alternatively, it is also possible to `cf curl` the `/v3/routes` API.
- Alternatively, it is also possible to `cf curl` the `/v3/routes` API.
1. Run the `PATCH` request to the targeted API endpoint:
```
@@ -98,7 +74,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun
Where `GUID` is the unique identifier for the route.
-2. To confirm the setting, query the `routes` API endpoint for the route:
+1. To confirm the setting, query the `routes` API endpoint for the route:
```
cf curl /v3/routes/GUID
@@ -115,48 +91,50 @@ For example, to change an app route's algorithm from `least-connection` to `roun
```
### Creating a Route with a specified Load Balancing Algorithm
-To create a route with the per-route `loadbalancing` option, you can use the cli command `create-route`.
-For example:
-1. Run the create-route command:
- ```
- cf create-route EXAMPLE.COM --host MY-HOST --option=loadbalancing=round-robin
- ```
-2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`).
+To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`.
+For example:
- The response lists the changed `loadbalancing` algorithm option:
```
- options: {loadbalancing=round-robin}
+ cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin
```
-### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm
+### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm
To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`.
+For example:
+
+ ```
+ cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin
+ ```
+
The command map-route
supports the --option
flag only for new routes.
To update an existing route, the command update-route
must be used as described before.
-For example:
+### Retrieve Route Options
+
+To verify route options, you can query the route using the `route` command:
-1. Run a map-route command:
```
- cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin
+ cf route EXAMPLE.COM --hostname MY-HOST
```
-2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`).
-
- The response lists the changed `loadbalancing` algorithm option:
+
+ The response lists the chosen `loadbalancing` algorithm option, e.g. `least-connection`:
+
```
- options: { loadbalancing=round-robin }
+ options: {loadbalancing=least-connection}
```
-### Retrieve Route Options
+ Alternatively, you can query the `routes` API endpoint for the app's route:
-To verify route options, you can query the route using the `route` command:
```
- cf route EXAMPLE.COM --hostname MY-HOST
+ cf curl /v3/routes/?hosts=MY-HOST
```
- The response lists the chosen `loadbalancing` algorithm option, e.g. `loadbalancing`:
+
+ Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm option as well:
+
```
- options: {loadbalancing=least-connection}
+ "options": {"loadbalancing": "least-connection"}
```
From 907f00a54c2d77fd6255a65aa160e3f718a87236 Mon Sep 17 00:00:00 2001
From: Daria <66593181+Dariquest@users.noreply.github.com>
Date: Wed, 5 Feb 2025 18:23:41 +0100
Subject: [PATCH 17/22] Chapter adjustments
---
custom-per-route-options.html.md.erb | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index 4ad56869..33ba556b 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -49,7 +49,7 @@ To configure per-route load balancing for an application that has not yet been p
cf push -f manifest.yml
```
-### Change Load Balancing of an Existing App
+### Change Load Balancing of an Existing Route
To change the per-route `loadbalancing` option of an existing route, you can use the cli command, `update-route`.
@@ -74,7 +74,7 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API.
Where `GUID` is the unique identifier for the route.
-1. To confirm the setting, query the `routes` API endpoint for the route:
+1. To confirm the option, query the `routes` API endpoint for the route:
```
cf curl /v3/routes/GUID
@@ -82,7 +82,7 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API.
Where `GUID` is the unique identifier for the route.
- The response lists the new `round-robin` setting:
+ The response lists the new `round-robin` option:
```
"options": {
@@ -90,7 +90,7 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API.
}
```
-### Creating a Route with a specified Load Balancing Algorithm
+### Creating a Route with a specified Load Balancing Algorithm
To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`.
For example:
@@ -127,7 +127,7 @@ To verify route options, you can query the route using the `route` command:
options: {loadbalancing=least-connection}
```
- Alternatively, you can query the `routes` API endpoint for the app's route:
+ Alternatively, you can query the `routes` API endpoint for a route:
```
cf curl /v3/routes/?hosts=MY-HOST
From f71173687f6468badd0e97529a39df3b80d60f8b Mon Sep 17 00:00:00 2001
From: Daria <66593181+Dariquest@users.noreply.github.com>
Date: Thu, 6 Feb 2025 12:01:04 +0100
Subject: [PATCH 18/22] Last review round
---
custom-per-route-options.html.md.erb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index 33ba556b..8c29de93 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -59,7 +59,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun
cf update-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin
```
-Alternatively, it is also possible to `cf curl` the `/v3/routes` API.
+Alternatively, it is also possible to update the per-route load balancing option via the `/v3/routes` API.
1. Run the `PATCH` request to the targeted API endpoint:
@@ -90,7 +90,7 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API.
}
```
-### Creating a Route with a specified Load Balancing Algorithm
+### Create a Route with a specific Load Balancing Algorithm
To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`.
For example:
@@ -99,7 +99,7 @@ For example:
cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin
```
-### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm
+### Map a Route to an Existing App with specific Load Balancing Algorithm
To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`.
From 985c202247030151255d320a99869e81dfd37ebc Mon Sep 17 00:00:00 2001
From: Daria <66593181+Dariquest@users.noreply.github.com>
Date: Thu, 6 Feb 2025 12:27:09 +0100
Subject: [PATCH 19/22] Add api way to create a route with a per-route option
---
custom-per-route-options.html.md.erb | 32 +++++++++++++---------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index 8c29de93..83de6725 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -61,7 +61,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun
Alternatively, it is also possible to update the per-route load balancing option via the `/v3/routes` API.
-1. Run the `PATCH` request to the targeted API endpoint:
+Run the `PATCH` request to the targeted API endpoint:
```
cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \
@@ -74,22 +74,6 @@ Alternatively, it is also possible to update the per-route load balancing option
Where `GUID` is the unique identifier for the route.
-1. To confirm the option, query the `routes` API endpoint for the route:
-
- ```
- cf curl /v3/routes/GUID
- ```
-
- Where `GUID` is the unique identifier for the route.
-
- The response lists the new `round-robin` option:
-
- ```
- "options": {
- "loadbalancing": "round-robin"
- }
- ```
-
### Create a Route with a specific Load Balancing Algorithm
To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`.
@@ -99,6 +83,20 @@ For example:
cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin
```
+Alternatively, it is also possible to create a route with a per-route load balancing option via the `/v3/routes` API:
+
+ ```
+ cf curl /v3/routes -X POST -H "Content-type: application/json" \
+ -d '{
+ "host": "MY-HOST",
+ "path": "MY-PATH",
+ ...
+ "options": {
+ "loadbalancing": "round-robin"
+ }
+ }'
+ ```
+
### Map a Route to an Existing App with specific Load Balancing Algorithm
To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`.
From 864568685ab4cbcf3a4e5ee1df2492ca0d00b2e2 Mon Sep 17 00:00:00 2001
From: Daria <66593181+Dariquest@users.noreply.github.com>
Date: Thu, 6 Feb 2025 12:31:45 +0100
Subject: [PATCH 20/22] Tags correction
---
custom-per-route-options.html.md.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index 83de6725..560ab957 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -49,7 +49,7 @@ To configure per-route load balancing for an application that has not yet been p
cf push -f manifest.yml
```
-### Change Load Balancing of an Existing Route
+### Change Load Balancing Algorithm of an Existing Route
To change the per-route `loadbalancing` option of an existing route, you can use the cli command, `update-route`.
From c823864511fe9cab95195f3423d7599378931d7f Mon Sep 17 00:00:00 2001
From: Daria <66593181+Dariquest@users.noreply.github.com>
Date: Thu, 6 Feb 2025 14:16:29 +0100
Subject: [PATCH 21/22] word-level improvement
Co-authored-by: Clemens Hoffmann
---
custom-per-route-options.html.md.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index 560ab957..711cd7c4 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -113,7 +113,7 @@ To update an existing route, the command update-route
must be used
### Retrieve Route Options
-To verify route options, you can query the route using the `route` command:
+To read route options, you can query the route using the `route` command:
```
cf route EXAMPLE.COM --hostname MY-HOST
From a6546209d78c23b8dc1801e8497b77fcb41755d2 Mon Sep 17 00:00:00 2001
From: Daria <66593181+Dariquest@users.noreply.github.com>
Date: Thu, 6 Feb 2025 14:21:56 +0100
Subject: [PATCH 22/22] add cf routes command doc
---
custom-per-route-options.html.md.erb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb
index 711cd7c4..0b0d560e 100644
--- a/custom-per-route-options.html.md.erb
+++ b/custom-per-route-options.html.md.erb
@@ -136,3 +136,5 @@ To read route options, you can query the route using the `route` command:
```
"options": {"loadbalancing": "least-connection"}
```
+
+To retrieve all the routes with the corresponding options in a space of an organization, you can use `routes` command.