-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OpenAPI.yaml and Modify rrs service
* rename rr module to rrs
- Loading branch information
1 parent
283d67b
commit 93de4a5
Showing
3 changed files
with
96 additions
and
74 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: Kubernetes Zone API | ||
version: 1.0.0 | ||
description: API for fetching Kubernetes node zone information | ||
servers: | ||
- url: http://{node_ip}:8080 | ||
variables: | ||
node_ip: | ||
default: "localhost" | ||
description: IP address of the node running the service | ||
|
||
paths: | ||
/zones: | ||
get: | ||
tags: | ||
- Zones | ||
summary: Get zone data | ||
description: Returns zone data from the Kubernetes API | ||
responses: | ||
'200': | ||
description: Successful response | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
additionalProperties: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Node' | ||
example: | ||
rack-1: | ||
- name: "ncn-m001" | ||
status: "Ready" | ||
roles: "control-plane" | ||
age: "2024-10-25T12:40:04Z" | ||
version: "v1.24.17" | ||
cpu: "32" | ||
memory: "131032624Ki" | ||
'404': | ||
description: Not Found | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
'500': | ||
description: Server Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
|
||
components: | ||
schemas: | ||
Node: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
example: "ncn-m001" | ||
status: | ||
type: string | ||
enum: [Ready, NotReady, Unknown] | ||
example: "Ready" | ||
roles: | ||
type: string | ||
example: "control-plane" | ||
age: | ||
type: string | ||
format: date-time | ||
example: "2024-10-25T12:40:04Z" | ||
version: | ||
type: string | ||
example: "v1.24.17" | ||
cpu: | ||
type: string | ||
example: "32" | ||
memory: | ||
type: string | ||
example: "131032624Ki" | ||
required: | ||
- name | ||
- status | ||
- age | ||
- version | ||
|
||
Error: | ||
type: object | ||
properties: | ||
error: | ||
type: string | ||
example: "Not Found" | ||
required: | ||
- error |