Commit 8e028ffa authored by Michael Kozono's avatar Michael Kozono

Add Geo node name field to API

parent a58c009f
......@@ -19,6 +19,7 @@ Example response:
[
{
"id": 1,
"name": "us-node",
"url": "https://primary.example.com/",
"internal_url": "https://internal.example.com/",
"primary": true,
......@@ -31,6 +32,7 @@ Example response:
},
{
"id": 2,
"name": "cn-node",
"url": "https://secondary.example.com/",
"internal_url": "https://secondary.example.com/",
"primary": false,
......@@ -59,6 +61,7 @@ Example response:
```json
{
"id": 1,
"name": "us-node",
"url": "https://primary.example.com/",
"internal_url": "https://primary.example.com/",
"primary": true,
......@@ -85,7 +88,8 @@ PUT /geo_nodes/:id
|----------------------|---------|-----------|---------------------------------------------------------------------------|
| `id` | integer | yes | The ID of the Geo node. |
| `enabled` | boolean | no | Flag indicating if the Geo node is enabled. |
| `url` | string | no | The URL to connect to the Geo node. |
| `name` | string | yes | The unique identifier for the Geo node. Must match `geo_node_name` if it is set in gitlab.rb, otherwise it must match `external_url`. |
| `url` | string | yes | The user-facing URL of the Geo node. |
| `internal_url` | string | no | The URL defined on the primary node that secondary nodes should use to contact it. Returns `url` if not set.|
| `files_max_capacity` | integer | no | Control the maximum concurrency of LFS/attachment backfill for this secondary node. |
| `repos_max_capacity` | integer | no | Control the maximum concurrency of repository backfill for this secondary node. |
......@@ -96,6 +100,7 @@ Example response:
```json
{
"id": 1,
"name": "cn-node",
"url": "https://secondary.example.com/",
"internal_url": "https://secondary.example.com/",
"primary": false,
......@@ -138,6 +143,7 @@ Example response:
```json
{
"id": 1,
"name": "us-node",
"url": "https://primary.example.com/",
"internal_url": "https://primary.example.com/",
"primary": true,
......
......@@ -143,7 +143,8 @@ module API
end
params do
optional :enabled, type: Boolean, desc: 'Flag indicating if the Geo node is enabled'
optional :url, type: String, desc: 'The URL to connect to the Geo node'
optional :name, type: String, desc: 'The unique identifier for the Geo node. Must match `geo_node_name` if it is set in gitlab.rb, otherwise it must match `external_url`'
optional :url, type: String, desc: 'The user-facing URL of the Geo node'
optional :internal_url, type: String, desc: 'The URL defined on the primary node that secondary nodes should use to contact it. Defaults to url'
optional :files_max_capacity, type: Integer, desc: 'Control the maximum concurrency of LFS/attachment backfill for this secondary node'
optional :repos_max_capacity, type: Integer, desc: 'Control the maximum concurrency of repository backfill for this secondary node'
......
......@@ -456,6 +456,7 @@ module EE
include ::API::Helpers::RelatedResourcesHelpers
expose :id
expose :name
expose :url
expose :internal_url
expose :primary?, as: :primary
......
......@@ -2,6 +2,7 @@
"type": "object",
"required" : [
"id",
"name",
"url",
"primary",
"enabled",
......@@ -14,6 +15,7 @@
],
"properties" : {
"id": { "type": "integer" },
"name": { "type": ["string", "null"] },
"url": { "type": ["string", "null"] },
"primary": { "type": "boolean" },
"internal_url": { "type": ["string", "null"] },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment