Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions errors/api/admin/cluster/cluster-not-found.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name = "CLUSTER_NOT_FOUND"
description = "The requested cluster was not found."
http_status = 400
---

# Cluster Not Found

The requested cluster was not found.
9 changes: 9 additions & 0 deletions errors/api/admin/cluster/datacenter/datacenter-not-found.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name = "CLUSTER_DATACENTER_NOT_FOUND"
description = "The requested datacenter was not found."
http_status = 400
---

# Datacenter Not Found

The requested datacenter was not found.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name = "CLUSTER_DATACENTER_NOT_IN_CLUSTER"
description = "The requested datacenter is not part of the requested cluster."
http_status = 400
---

# Datacenter Not In Cluster

The requested datacenter is not part of the requested cluster.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ imports:

service:
auth: true
base-path: /cluster
base-path: /admin/clusters
endpoints:
getServerIps:
path: /server_ips
Expand All @@ -16,8 +16,30 @@ service:
server_id: optional<uuid>
pool: optional<localCommons.PoolType>
response: GetServerIpsResponse
list:
path: ""
method: GET
docs: Get clusters
response: ListResponse
create:
path: ""
method: POST
docs: Create a new cluster
request:
body: CreateRequest
response: CreateResponse

types:
GetServerIpsResponse:
properties:
ips: list<string>
ListResponse:
properties:
clusters: list<localCommons.Cluster>
CreateRequest:
properties:
name_id: string
owner_team_id: optional<uuid>
CreateResponse:
properties:
cluster_id: uuid
44 changes: 44 additions & 0 deletions fern/definition/admin/clusters/datacenters/__package__.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

imports:
localCommons: ../../common.yml

service:
auth: true
base-path: /admin/clusters/{cluster_id}/datacenters
path-parameters:
cluster_id:
type: uuid
endpoints:
list:
path: ""
method: GET
docs: Get datacenters of a cluster
response: ListResponse
create:
path: ""
method: POST
request:
body: CreateRequest
response: CreateResponse
taint:
path: /{datacenter_id}/taint
path-parameters:
datacenter_id:
type: string
method: GET

types:
ListResponse:
properties:
datacenters: list<localCommons.Datacenter>
CreateRequest:
properties:
display_name: string
name_id: string
provider: localCommons.Provider
provider_datacenter_id: string
build_delivery_method: localCommons.BuildDeliveryMethod
CreateResponse:
properties:
datacenter_id: uuid
34 changes: 34 additions & 0 deletions fern/definition/admin/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,37 @@ types:
- job
- gg
- ats
Provider:
enum:
- linode
BuildDeliveryMethod:
enum:
- traffic_server
- s3_direct
Pool:
properties:
pool_type: PoolType
hardware: list<Hardware>
desired_count: integer
max_count: integer
drain_timeout: long
Hardware:
properties:
provider_hardware: string
Cluster:
properties:
cluster_id: uuid
name_id: string
create_ts: long
owner_team_id: optional<uuid>
Datacenter:
properties:
datacenter_id: uuid
cluster_id: uuid
name_id: string
display_name: string
provider: Provider
provider_datacenter_id: string
provider_api_token: optional<string>
pools: list<Pool>
build_delivery_method: BuildDeliveryMethod
6 changes: 3 additions & 3 deletions gen/secrets.baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@
"filename": "infra/nix/bolt/default.nix",
"hashed_secret": "7096ce78355a7fc302686472413e82c32dcd89cc",
"is_verified": false,
"line_number": 57
"line_number": 58
},
{
"type": "Base64 High Entropy String",
"filename": "infra/nix/bolt/default.nix",
"hashed_secret": "80a11fe90031acb43c4de1afdc8fee4bb665d183",
"is_verified": false,
"line_number": 58
"line_number": 59
}
],
"infra/nix/pkgs/clickhouse.nix": [
Expand Down Expand Up @@ -248,5 +248,5 @@
}
]
},
"generated_at": "2024-04-18T17:53:47Z"
"generated_at": "2024-04-24T21:36:21Z"
}
1 change: 1 addition & 0 deletions infra/nix/bolt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ let
"lib/bolt"
"lib/s3-util"
"proto"
"sdks/full/rust"
];

includeFilter = path: type: let
Expand Down
Loading