Skip to content

Commit e6342ec

Browse files
authored
feat(k8s): deprecate ReplaceNode (use DeleteNode instead) (#34)
1 parent 0628e8a commit e6342ec

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

packages/clients/src/api/k8s/v1/api.gen.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ export class K8SV1GenAPI extends API {
550550
* pods (in a one node cluster for instance), you may experience some
551551
* disruption of your applications.
552552
*
553+
* @deprecated
553554
* @param request - The request {@link ReplaceNodeRequest}
554555
* @returns A Promise of Node
555556
*/
@@ -592,6 +593,14 @@ export class K8SV1GenAPI extends API {
592593
unmarshalNode,
593594
)
594595

596+
/**
597+
* This method allows to delete a specific node. Note that when there is not
598+
* enough space to reschedule all the pods (in a one node cluster for
599+
* instance), you may experience some disruption of your applications.
600+
*
601+
* @param request - The request {@link DeleteNodeRequest}
602+
* @returns A Promise of Node
603+
*/
595604
deleteNode = (request: Readonly<DeleteNodeRequest>) =>
596605
this.client.fetch<Node>(
597606
{

packages/clients/src/api/k8s/v1/content.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const NODE_TRANSIENT_STATUSES: NodeStatus[] = [
1515
'deleting',
1616
'rebooting',
1717
'upgrading',
18+
'starting',
1819
]
1920

2021
/** Lists transient statutes of the enum {@link PoolStatus}. */

packages/clients/src/api/k8s/v1/marshalling.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ export const unmarshalNode = (data: unknown) => {
170170
clusterId: data.cluster_id,
171171
conditions: data.conditions,
172172
createdAt: unmarshalDate(data.created_at),
173+
errorMessage: data.error_message,
173174
id: data.id,
174175
name: data.name,
175176
poolId: data.pool_id,

packages/clients/src/api/k8s/v1/types.gen.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export type NodeStatus =
8484
| 'rebooting'
8585
| 'creation_error'
8686
| 'upgrading'
87+
| 'starting'
8788

8889
export type PoolStatus =
8990
| 'unknown'
@@ -461,12 +462,14 @@ export interface Node {
461462
/** The public IPv6 address of the node */
462463
publicIpV6?: string
463464
/**
464-
* These conditions contains the Node Problem Detector conditions, as well as
465-
* some in house conditions.
465+
* @deprecated These conditions contains the Node Problem Detector conditions,
466+
* as well as some in house conditions.
466467
*/
467-
conditions: Record<string, string>
468+
conditions?: Record<string, string>
468469
/** The status of the node */
469470
status: NodeStatus
471+
/** Details of the error, if any occured when managing the node */
472+
errorMessage?: string
470473
/** The date at which the node was created */
471474
createdAt?: Date
472475
/** The date at which the node was last updated */

0 commit comments

Comments
 (0)