feat(kubernetes): advanced node drain options with agent failover [C9S-334] (#3346)

This commit is contained in:
Xing
2026-08-05 12:09:44 +12:00
committed by GitHub
parent b2009d1937
commit 5d4dbb5a67
18 changed files with 1135 additions and 34 deletions
+39
View File
@@ -6311,6 +6311,13 @@ paths:
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/kubernetes.drainNodePayload"
description: Drain options, matching kubectl drain flags. Defaults are applied
to any omitted field.
responses:
"204":
description: Success
@@ -13464,6 +13471,38 @@ components:
describe:
type: string
type: object
kubernetes.drainNodePayload:
properties:
DeleteEmptyDirData:
description: DeleteEmptyDirData allows eviction of pods using emptyDir volumes,
whose data is lost once the pod is deleted.
example: true
type: boolean
DisableEviction:
description: DisableEviction forces the use of direct pod deletion instead of
the eviction API, ignoring any configured PodDisruptionBudgets.
example: false
type: boolean
Force:
description: Force allows deletion of standalone pods not managed by a controller.
example: false
type: boolean
GracePeriodSeconds:
description: GracePeriodSeconds overrides each pod's termination grace period.
-1 uses the pod's own grace period.
example: -1
type: integer
IgnoreDaemonSets:
description: IgnoreDaemonSets skips DaemonSet-managed pods, which would
otherwise block the drain.
example: true
type: boolean
TimeoutSeconds:
description: TimeoutSeconds is the overall time to wait for the drain to
complete. Defaults to 60 when omitted.
example: 60
type: integer
type: object
kubernetes.kubernetesVersionResponse:
properties:
buildDate:
+38
View File
@@ -2486,6 +2486,38 @@ definitions:
describe:
type: string
type: object
kubernetes.drainNodePayload:
properties:
DeleteEmptyDirData:
description: DeleteEmptyDirData allows eviction of pods using emptyDir volumes,
whose data is lost once the pod is deleted.
example: true
type: boolean
DisableEviction:
description: DisableEviction forces the use of direct pod deletion instead
of the eviction API, ignoring any configured PodDisruptionBudgets.
example: false
type: boolean
Force:
description: Force allows deletion of standalone pods not managed by a controller.
example: false
type: boolean
GracePeriodSeconds:
description: GracePeriodSeconds overrides each pod's termination grace period.
-1 uses the pod's own grace period.
example: -1
type: integer
IgnoreDaemonSets:
description: IgnoreDaemonSets skips DaemonSet-managed pods, which would otherwise
block the drain.
example: true
type: boolean
TimeoutSeconds:
description: TimeoutSeconds is the overall time to wait for the drain to complete.
Defaults to 60 when omitted.
example: 60
type: integer
type: object
kubernetes.kubernetesVersionResponse:
properties:
buildDate:
@@ -15802,6 +15834,12 @@ paths:
name: name
required: true
type: string
- description: Drain options, matching kubectl drain flags. Defaults are applied
to any omitted field.
in: body
name: body
schema:
$ref: '#/definitions/kubernetes.drainNodePayload'
responses:
"204":
description: Success