1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// SPDX-FileCopyrightText: 2026 RAprogramm <andrey.rozanov.vl@gmail.com>
// SPDX-License-Identifier: MIT
//! Kubernetes cluster subcommands.
use clap::Subcommand;
/// Kubernetes subcommands.
#[derive(Subcommand, Debug)]
pub enum KubernetesCommands {
/// List all Kubernetes clusters.
List {
/// Maximum number of clusters to return.
#[arg(long)]
limit: Option<i32>,
/// Number of clusters to skip.
#[arg(long)]
offset: Option<i32>
},
/// Show detailed info for a cluster.
Info {
/// Cluster ID.
#[arg(long)]
id: i32
},
/// Create a new Kubernetes cluster.
Create {
/// Cluster name.
#[arg(long)]
name: String,
/// Kubernetes version (e.g., 1.30).
#[arg(long)]
type_: String
},
/// Delete a cluster by ID.
Delete {
/// Cluster ID.
#[arg(long)]
id: i32
},
/// Update cluster settings.
Update {
/// Cluster ID.
#[arg(long)]
id: i32,
/// New cluster name.
#[arg(long)]
name: Option<String>
},
/// List node groups for a cluster.
NodegroupList {
/// Cluster ID.
#[arg(long)]
id: i32
},
/// Create a node group for a cluster.
NodegroupCreate {
/// Cluster ID.
#[arg(long)]
id: i32,
/// Node group name.
#[arg(long)]
name: String
},
/// Delete a node group from a cluster.
NodegroupDelete {
/// Cluster ID.
#[arg(long)]
id: i32,
/// Node group ID.
#[arg(long)]
group_id: i32
},
/// List nodes for a cluster.
NodeList {
/// Cluster ID.
#[arg(long)]
id: i32
},
/// List installed addons for a cluster.
AddonList {
/// Cluster ID.
#[arg(long)]
id: i32
},
/// Install an addon on a cluster.
AddonInstall {
/// Cluster ID.
#[arg(long)]
id: i32,
/// Addon name (e.g., calico, metrics-server).
#[arg(long)]
addon_name: String
},
/// Delete an addon from a cluster.
AddonDelete {
/// Cluster ID.
#[arg(long)]
id: i32,
/// Addon name to delete.
#[arg(long)]
addon_name: String
},
/// List available Kubernetes presets.
PresetList,
/// List available Kubernetes versions.
VersionList,
/// List available Kubernetes network drivers.
NetworkDrivers,
/// Get kubeconfig for a cluster.
Kubeconfig {
/// Cluster ID.
#[arg(long)]
id: i32
},
/// Show cluster resources (deprecated).
#[command(hide = true)]
Resources {
/// Cluster ID.
#[arg(long)]
id: i32
}
}