annotations added to nodepools page

This commit is contained in:
allanice001
2025-09-04 03:09:17 +01:00
parent d831e911fd
commit d83efa4068
9 changed files with 1737 additions and 585 deletions

View File

@@ -2417,6 +2417,242 @@ const docTemplate = `{
}
}
},
"/api/v1/node-pools/{id}/annotations": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"node-pools"
],
"summary": "List annotations attached to a node pool (org scoped)",
"parameters": [
{
"type": "string",
"description": "Organization UUID",
"name": "X-Org-ID",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Node Pool ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/nodepools.annotationBrief"
}
}
},
"400": {
"description": "invalid id",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"403": {
"description": "organization required",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "fetch failed",
"schema": {
"type": "string"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"node-pools"
],
"summary": "Attach annotations to a node pool (org scoped)",
"parameters": [
{
"type": "string",
"description": "Organization UUID",
"name": "X-Org-ID",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Node Pool ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Annotation IDs to attach",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/nodepools.attachAnnotationsRequest"
}
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "invalid id / invalid annotation_ids",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"403": {
"description": "organization required",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "attach failed",
"schema": {
"type": "string"
}
}
}
}
},
"/api/v1/node-pools/{id}/annotations/{annotationId}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"node-pools"
],
"summary": "Detach one annotation from a node pool (org scoped)",
"parameters": [
{
"type": "string",
"description": "Organization UUID",
"name": "X-Org-ID",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Node Pool ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Annotation ID (UUID)",
"name": "annotationId",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "invalid id",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"403": {
"description": "organization required",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "detach failed",
"schema": {
"type": "string"
}
}
}
}
},
"/api/v1/node-pools/{id}/labels": {
"get": {
"security": [
@@ -5271,6 +5507,31 @@ const docTemplate = `{
}
}
},
"nodepools.annotationBrief": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"nodepools.attachAnnotationsRequest": {
"type": "object",
"properties": {
"annotation_ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"nodepools.attachLabelsRequest": {
"type": "object",
"properties": {

View File

@@ -2413,6 +2413,242 @@
}
}
},
"/api/v1/node-pools/{id}/annotations": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"node-pools"
],
"summary": "List annotations attached to a node pool (org scoped)",
"parameters": [
{
"type": "string",
"description": "Organization UUID",
"name": "X-Org-ID",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Node Pool ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/nodepools.annotationBrief"
}
}
},
"400": {
"description": "invalid id",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"403": {
"description": "organization required",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "fetch failed",
"schema": {
"type": "string"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"node-pools"
],
"summary": "Attach annotations to a node pool (org scoped)",
"parameters": [
{
"type": "string",
"description": "Organization UUID",
"name": "X-Org-ID",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Node Pool ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Annotation IDs to attach",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/nodepools.attachAnnotationsRequest"
}
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "invalid id / invalid annotation_ids",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"403": {
"description": "organization required",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "attach failed",
"schema": {
"type": "string"
}
}
}
}
},
"/api/v1/node-pools/{id}/annotations/{annotationId}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"node-pools"
],
"summary": "Detach one annotation from a node pool (org scoped)",
"parameters": [
{
"type": "string",
"description": "Organization UUID",
"name": "X-Org-ID",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Node Pool ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Annotation ID (UUID)",
"name": "annotationId",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "invalid id",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"403": {
"description": "organization required",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "detach failed",
"schema": {
"type": "string"
}
}
}
}
},
"/api/v1/node-pools/{id}/labels": {
"get": {
"security": [
@@ -5267,6 +5503,31 @@
}
}
},
"nodepools.annotationBrief": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"nodepools.attachAnnotationsRequest": {
"type": "object",
"properties": {
"annotation_ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"nodepools.attachLabelsRequest": {
"type": "object",
"properties": {

View File

@@ -319,6 +319,22 @@ definitions:
updated_at:
type: string
type: object
nodepools.annotationBrief:
properties:
id:
type: string
name:
type: string
value:
type: string
type: object
nodepools.attachAnnotationsRequest:
properties:
annotation_ids:
items:
type: string
type: array
type: object
nodepools.attachLabelsRequest:
properties:
label_ids:
@@ -2163,6 +2179,159 @@ paths:
summary: Update node pool (org scoped)
tags:
- node-pools
/api/v1/node-pools/{id}/annotations:
get:
consumes:
- application/json
parameters:
- description: Organization UUID
in: header
name: X-Org-ID
required: true
type: string
- description: Node Pool ID (UUID)
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/nodepools.annotationBrief'
type: array
"400":
description: invalid id
schema:
type: string
"401":
description: Unauthorized
schema:
type: string
"403":
description: organization required
schema:
type: string
"404":
description: not found
schema:
type: string
"500":
description: fetch failed
schema:
type: string
security:
- BearerAuth: []
summary: List annotations attached to a node pool (org scoped)
tags:
- node-pools
post:
consumes:
- application/json
parameters:
- description: Organization UUID
in: header
name: X-Org-ID
required: true
type: string
- description: Node Pool ID (UUID)
in: path
name: id
required: true
type: string
- description: Annotation IDs to attach
in: body
name: body
required: true
schema:
$ref: '#/definitions/nodepools.attachAnnotationsRequest'
produces:
- application/json
responses:
"204":
description: No Content
schema:
type: string
"400":
description: invalid id / invalid annotation_ids
schema:
type: string
"401":
description: Unauthorized
schema:
type: string
"403":
description: organization required
schema:
type: string
"404":
description: not found
schema:
type: string
"500":
description: attach failed
schema:
type: string
security:
- BearerAuth: []
summary: Attach annotations to a node pool (org scoped)
tags:
- node-pools
/api/v1/node-pools/{id}/annotations/{annotationId}:
delete:
consumes:
- application/json
parameters:
- description: Organization UUID
in: header
name: X-Org-ID
required: true
type: string
- description: Node Pool ID (UUID)
in: path
name: id
required: true
type: string
- description: Annotation ID (UUID)
in: path
name: annotationId
required: true
type: string
produces:
- application/json
responses:
"204":
description: No Content
schema:
type: string
"400":
description: invalid id
schema:
type: string
"401":
description: Unauthorized
schema:
type: string
"403":
description: organization required
schema:
type: string
"404":
description: not found
schema:
type: string
"500":
description: detach failed
schema:
type: string
security:
- BearerAuth: []
summary: Detach one annotation from a node pool (org scoped)
tags:
- node-pools
/api/v1/node-pools/{id}/labels:
get:
consumes: