@rulebricks/cli 2.1.7 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -16
- package/cluster-setup/aws/README.md +96 -47
- package/cluster-setup/aws/check-aws-access.sh +216 -52
- package/cluster-setup/aws/parameters.json +13 -0
- package/cluster-setup/aws/rulebricks-cluster.cfn.yaml +355 -0
- package/cluster-setup/azure/README.md +103 -55
- package/cluster-setup/azure/check-aks-prereqs.sh +236 -56
- package/cluster-setup/azure/parameters.json +30 -0
- package/cluster-setup/azure/rulebricks-cluster.bicep +546 -0
- package/cluster-setup/gcp/README.md +51 -34
- package/cluster-setup/gcp/check-gke-prereqs.sh +222 -60
- package/dist/commands/backup.d.ts +5 -0
- package/dist/commands/backup.js +104 -0
- package/dist/commands/deploy.d.ts +3 -1
- package/dist/commands/deploy.js +226 -326
- package/dist/commands/destroy.d.ts +1 -1
- package/dist/commands/destroy.js +73 -123
- package/dist/commands/init.d.ts +5 -1
- package/dist/commands/init.js +78 -54
- package/dist/commands/list.d.ts +1 -0
- package/dist/commands/list.js +74 -0
- package/dist/commands/open.d.ts +1 -1
- package/dist/commands/open.js +4 -12
- package/dist/commands/redeploy.d.ts +6 -0
- package/dist/commands/redeploy.js +310 -0
- package/dist/commands/restore.d.ts +5 -0
- package/dist/commands/restore.js +338 -0
- package/dist/commands/status.js +62 -49
- package/dist/commands/upgrade.js +74 -51
- package/dist/components/DNSWaitScreen.d.ts +5 -1
- package/dist/components/DNSWaitScreen.js +47 -41
- package/dist/components/Wizard/WizardContext.d.ts +157 -36
- package/dist/components/Wizard/WizardContext.js +872 -160
- package/dist/components/Wizard/steps/CloudProviderStep.js +192 -107
- package/dist/components/Wizard/steps/DomainStep.js +5 -24
- package/dist/components/Wizard/steps/ExternalServicesStep.d.ts +6 -0
- package/dist/components/Wizard/steps/ExternalServicesStep.js +645 -0
- package/dist/components/Wizard/steps/FeatureConfigStep.d.ts +2 -1
- package/dist/components/Wizard/steps/FeatureConfigStep.js +739 -425
- package/dist/components/Wizard/steps/FeaturesStep.js +31 -35
- package/dist/components/Wizard/steps/ObservabilityStep.d.ts +6 -0
- package/dist/components/Wizard/steps/ObservabilityStep.js +137 -0
- package/dist/components/Wizard/steps/ReviewStep.d.ts +2 -1
- package/dist/components/Wizard/steps/ReviewStep.js +56 -12
- package/dist/components/Wizard/steps/StorageStep.d.ts +9 -0
- package/dist/components/Wizard/steps/StorageStep.js +592 -0
- package/dist/components/Wizard/steps/SupabaseCredentialsStep.js +20 -21
- package/dist/components/Wizard/steps/VersionStep.js +45 -23
- package/dist/components/Wizard/steps/index.d.ts +3 -3
- package/dist/components/Wizard/steps/index.js +3 -3
- package/dist/components/common/CommandApproval.d.ts +12 -0
- package/dist/components/common/CommandApproval.js +91 -0
- package/dist/components/common/DeploymentPicker.d.ts +14 -0
- package/dist/components/common/DeploymentPicker.js +16 -0
- package/dist/components/common/index.d.ts +2 -0
- package/dist/components/common/index.js +2 -0
- package/dist/index.js +94 -62
- package/dist/lib/cloudCli.d.ts +134 -63
- package/dist/lib/cloudCli.js +512 -220
- package/dist/lib/clusterSetupDefaults.d.ts +30 -0
- package/dist/lib/clusterSetupDefaults.js +64 -0
- package/dist/lib/commandApproval.d.ts +26 -0
- package/dist/lib/commandApproval.js +114 -0
- package/dist/lib/config.d.ts +12 -10
- package/dist/lib/config.js +91 -33
- package/dist/lib/configFixtures.d.ts +5 -0
- package/dist/lib/configFixtures.js +513 -0
- package/dist/lib/deploymentHealth.d.ts +32 -0
- package/dist/lib/deploymentHealth.js +157 -0
- package/dist/lib/dns.d.ts +1 -1
- package/dist/lib/dns.js +19 -1
- package/dist/lib/dns.test.d.ts +1 -0
- package/dist/lib/dns.test.js +27 -0
- package/dist/lib/dockerHub.d.ts +12 -1
- package/dist/lib/dockerHub.js +18 -8
- package/dist/lib/helm.d.ts +4 -0
- package/dist/lib/helm.js +16 -0
- package/dist/lib/helmValues.d.ts +25 -0
- package/dist/lib/helmValues.js +1841 -289
- package/dist/lib/helmValues.test.d.ts +1 -0
- package/dist/lib/helmValues.test.js +1012 -0
- package/dist/lib/htpasswd.d.ts +1 -0
- package/dist/lib/htpasswd.js +15 -0
- package/dist/lib/kubernetes.d.ts +124 -17
- package/dist/lib/kubernetes.js +576 -145
- package/dist/lib/secrets.d.ts +23 -0
- package/dist/lib/secrets.js +158 -0
- package/dist/lib/validateValues.d.ts +31 -0
- package/dist/lib/validateValues.js +253 -0
- package/dist/lib/versions.d.ts +82 -11
- package/dist/lib/versions.js +131 -31
- package/dist/lib/versions.test.d.ts +1 -0
- package/dist/lib/versions.test.js +81 -0
- package/dist/lib/wizardSteps.d.ts +14 -0
- package/dist/lib/wizardSteps.js +23 -0
- package/dist/lib/workloadIdentity.d.ts +26 -0
- package/dist/lib/workloadIdentity.js +323 -0
- package/dist/lib/workloadIdentity.test.d.ts +1 -0
- package/dist/lib/workloadIdentity.test.js +57 -0
- package/dist/types/index.d.ts +1860 -164
- package/dist/types/index.js +518 -295
- package/package.json +9 -4
- package/schema/values.schema.json +1934 -0
- package/cluster-setup/aws/cluster.yaml +0 -33
- package/cluster-setup/azure/main.bicep +0 -282
- package/cluster-setup/azure/main.parameters.json +0 -21
- package/dist/components/Wizard/steps/CredentialsStep.d.ts +0 -6
- package/dist/components/Wizard/steps/CredentialsStep.js +0 -22
- package/dist/components/Wizard/steps/DeploymentModeStep.d.ts +0 -5
- package/dist/components/Wizard/steps/DeploymentModeStep.js +0 -26
- package/dist/components/Wizard/steps/TierStep.d.ts +0 -6
- package/dist/components/Wizard/steps/TierStep.js +0 -29
- package/dist/lib/terraform.d.ts +0 -66
- package/dist/lib/terraform.js +0 -754
- package/terraform/aws/main.tf +0 -355
- package/terraform/azure/main.tf +0 -371
- package/terraform/gcp/main.tf +0 -407
package/dist/index.js
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
3
4
|
import { Command } from "commander";
|
|
4
5
|
import { render } from "ink";
|
|
5
6
|
import chalk from "chalk";
|
|
6
7
|
import { InitWizard } from "./commands/init.js";
|
|
7
8
|
import { DeployCommand } from "./commands/deploy.js";
|
|
9
|
+
import { RedeployCommand } from "./commands/redeploy.js";
|
|
8
10
|
import { UpgradeCommand } from "./commands/upgrade.js";
|
|
9
11
|
import { DestroyCommand } from "./commands/destroy.js";
|
|
10
12
|
import { StatusCommand } from "./commands/status.js";
|
|
13
|
+
import { ListCommand } from "./commands/list.js";
|
|
11
14
|
import { LogsCommand } from "./commands/logs.js";
|
|
12
15
|
import { CloneCommand } from "./commands/clone.js";
|
|
13
16
|
import { OpenCommand } from "./commands/open.js";
|
|
14
17
|
import { BenchmarkCommand } from "./commands/benchmark.js";
|
|
18
|
+
import { BackupCommand } from "./commands/backup.js";
|
|
19
|
+
import { RestoreCommand } from "./commands/restore.js";
|
|
15
20
|
import { listDeployments, deploymentExists } from "./lib/config.js";
|
|
16
|
-
import
|
|
21
|
+
import { DeploymentPicker } from "./components/common/DeploymentPicker.js";
|
|
22
|
+
const require = createRequire(import.meta.url);
|
|
23
|
+
const packageJson = require("../package.json");
|
|
17
24
|
const VERSION = packageJson.version;
|
|
18
25
|
const program = new Command();
|
|
19
26
|
program
|
|
@@ -41,15 +48,31 @@ program
|
|
|
41
48
|
.command("deploy")
|
|
42
49
|
.description("Deploy Rulebricks to your cluster")
|
|
43
50
|
.argument("[name]", "Deployment name")
|
|
44
|
-
.option("--
|
|
45
|
-
.option("--version <version>", "
|
|
51
|
+
.option("--chart-version <version>", "Specific chart version to deploy")
|
|
52
|
+
.option("--version <version>", "Deprecated alias for --chart-version")
|
|
53
|
+
.option("--inline-secrets", "Write secrets inline into values.yaml instead of creating Kubernetes Secrets (dev clusters only)")
|
|
46
54
|
.action(async (name, options) => {
|
|
47
|
-
const deploymentName = name || (await selectDeployment());
|
|
55
|
+
const deploymentName = name || (await selectDeployment("deploy"));
|
|
48
56
|
if (!deploymentName) {
|
|
49
|
-
console.error(chalk.red('No
|
|
57
|
+
console.error(chalk.red('No deployments found. Run "rulebricks init" first.'));
|
|
50
58
|
process.exit(1);
|
|
51
59
|
}
|
|
52
|
-
const { waitUntilExit } = render(_jsx(DeployCommand, { name: deploymentName,
|
|
60
|
+
const { waitUntilExit } = render(_jsx(DeployCommand, { name: deploymentName, version: options.chartVersion || options.version, inlineSecrets: options.inlineSecrets }));
|
|
61
|
+
await waitUntilExit();
|
|
62
|
+
});
|
|
63
|
+
// Redeploy command
|
|
64
|
+
program
|
|
65
|
+
.command("redeploy")
|
|
66
|
+
.description("Reconfigure and redeploy an existing Rulebricks deployment")
|
|
67
|
+
.argument("[name]", "Deployment name")
|
|
68
|
+
.option("--chart-version <version>", "Specific chart version to deploy")
|
|
69
|
+
.action(async (name, options) => {
|
|
70
|
+
const deploymentName = name || (await selectDeployment("redeploy"));
|
|
71
|
+
if (!deploymentName) {
|
|
72
|
+
console.error(chalk.red('No deployments found. Run "rulebricks init" first.'));
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
const { waitUntilExit } = render(_jsx(RedeployCommand, { name: deploymentName, chartVersion: options.chartVersion }));
|
|
53
76
|
await waitUntilExit();
|
|
54
77
|
});
|
|
55
78
|
// Upgrade command
|
|
@@ -60,23 +83,10 @@ program
|
|
|
60
83
|
.option("--version <version>", "Target version (defaults to latest)")
|
|
61
84
|
.option("--dry-run", "Preview changes without applying")
|
|
62
85
|
.action(async (name, options) => {
|
|
63
|
-
|
|
86
|
+
const deploymentName = name || (await selectDeployment("upgrade"));
|
|
64
87
|
if (!deploymentName) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
console.error(chalk.red('No deployments found. Run "rulebricks init" first.'));
|
|
68
|
-
process.exit(1);
|
|
69
|
-
}
|
|
70
|
-
else if (deployments.length > 1) {
|
|
71
|
-
console.error(chalk.red("Please specify a deployment to upgrade.\n"));
|
|
72
|
-
console.log("Available deployments:");
|
|
73
|
-
for (const d of deployments) {
|
|
74
|
-
console.log(` ${chalk.yellow("•")} ${d}`);
|
|
75
|
-
}
|
|
76
|
-
console.log(`\nUsage: ${chalk.cyan("rulebricks upgrade <name>")}`);
|
|
77
|
-
process.exit(1);
|
|
78
|
-
}
|
|
79
|
-
deploymentName = deployments[0]; // Only one deployment, auto-select
|
|
88
|
+
console.error(chalk.red('No deployments found. Run "rulebricks init" first.'));
|
|
89
|
+
process.exit(1);
|
|
80
90
|
}
|
|
81
91
|
const { waitUntilExit } = render(_jsx(UpgradeCommand, { name: deploymentName, targetVersion: options.version, dryRun: options.dryRun }));
|
|
82
92
|
await waitUntilExit();
|
|
@@ -86,9 +96,9 @@ program
|
|
|
86
96
|
.command("destroy")
|
|
87
97
|
.description("Destroy a Rulebricks deployment")
|
|
88
98
|
.argument("[name]", "Deployment name")
|
|
89
|
-
.option("--cluster", "Also destroy cloud infrastructure (EKS/GKE/AKS cluster)")
|
|
90
99
|
.option("--config", "Also delete local configuration files")
|
|
91
100
|
.option("-f, --force", "Skip confirmation")
|
|
101
|
+
.option("--purge", "Force removal of cluster-shared CRDs (cert-manager/keda/strimzi/prometheus); by default they're removed only when this is the last Rulebricks deployment on the cluster")
|
|
92
102
|
.action(async (name, options) => {
|
|
93
103
|
// For destroy, require explicit deployment name
|
|
94
104
|
if (!name) {
|
|
@@ -106,7 +116,7 @@ program
|
|
|
106
116
|
}
|
|
107
117
|
process.exit(1);
|
|
108
118
|
}
|
|
109
|
-
const { waitUntilExit } = render(_jsx(DestroyCommand, { name: name,
|
|
119
|
+
const { waitUntilExit } = render(_jsx(DestroyCommand, { name: name, config: options.config, force: options.force, purge: options.purge }));
|
|
110
120
|
await waitUntilExit();
|
|
111
121
|
});
|
|
112
122
|
// Status command
|
|
@@ -115,9 +125,9 @@ program
|
|
|
115
125
|
.description("Show deployment status")
|
|
116
126
|
.argument("[name]", "Deployment name")
|
|
117
127
|
.action(async (name) => {
|
|
118
|
-
const deploymentName = name || (await selectDeployment());
|
|
128
|
+
const deploymentName = name || (await selectDeployment("show status for"));
|
|
119
129
|
if (!deploymentName) {
|
|
120
|
-
console.error(chalk.red(
|
|
130
|
+
console.error(chalk.red('No deployments found. Run "rulebricks init" first.'));
|
|
121
131
|
process.exit(1);
|
|
122
132
|
}
|
|
123
133
|
const { waitUntilExit } = render(_jsx(StatusCommand, { name: deploymentName }));
|
|
@@ -134,23 +144,10 @@ program
|
|
|
134
144
|
.option("-t, --tail <lines>", "Number of lines to show", "100")
|
|
135
145
|
.option("-s, --split", "Show logs in split-pane view (side-by-side columns)")
|
|
136
146
|
.action(async (name, component, options) => {
|
|
137
|
-
|
|
147
|
+
const deploymentName = name || (await selectDeployment("view logs for"));
|
|
138
148
|
if (!deploymentName) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
console.error(chalk.red('No deployments found. Run "rulebricks init" first.'));
|
|
142
|
-
process.exit(1);
|
|
143
|
-
}
|
|
144
|
-
else if (deployments.length > 1) {
|
|
145
|
-
console.error(chalk.red("Please specify a deployment to view logs for.\n"));
|
|
146
|
-
console.log("Available deployments:");
|
|
147
|
-
for (const d of deployments) {
|
|
148
|
-
console.log(` ${chalk.yellow("•")} ${d}`);
|
|
149
|
-
}
|
|
150
|
-
console.log(`\nUsage: ${chalk.cyan("rulebricks logs <name> [component]")}`);
|
|
151
|
-
process.exit(1);
|
|
152
|
-
}
|
|
153
|
-
deploymentName = deployments[0]; // Only one deployment, auto-select
|
|
149
|
+
console.error(chalk.red('No deployments found. Run "rulebricks init" first.'));
|
|
150
|
+
process.exit(1);
|
|
154
151
|
}
|
|
155
152
|
const { waitUntilExit } = render(_jsx(LogsCommand, { name: deploymentName, component: component, follow: options.follow, tail: parseInt(options.tail, 10), split: options.split }));
|
|
156
153
|
await waitUntilExit();
|
|
@@ -160,17 +157,8 @@ program
|
|
|
160
157
|
.command("list")
|
|
161
158
|
.description("List all deployments")
|
|
162
159
|
.action(async () => {
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
if (deployments.length === 0) {
|
|
166
|
-
console.log(chalk.yellow('No deployments found. Run "rulebricks init" to create one.'));
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
console.log(chalk.bold("\nDeployments:\n"));
|
|
170
|
-
for (const name of deployments) {
|
|
171
|
-
console.log(` ${listColor("•")} ${name}`);
|
|
172
|
-
}
|
|
173
|
-
console.log("");
|
|
160
|
+
const { waitUntilExit } = render(_jsx(ListCommand, {}));
|
|
161
|
+
await waitUntilExit();
|
|
174
162
|
});
|
|
175
163
|
// Clone command
|
|
176
164
|
program
|
|
@@ -189,7 +177,6 @@ program
|
|
|
189
177
|
.argument("<name>", "Deployment name")
|
|
190
178
|
.option("--config", "Open config.yaml only")
|
|
191
179
|
.option("--values", "Open values.yaml only")
|
|
192
|
-
.option("--terraform", "Open terraform directory only")
|
|
193
180
|
.action(async (name, options) => {
|
|
194
181
|
// Validate deployment exists before rendering
|
|
195
182
|
const exists = await deploymentExists(name);
|
|
@@ -208,9 +195,7 @@ program
|
|
|
208
195
|
? "config"
|
|
209
196
|
: options.values
|
|
210
197
|
? "values"
|
|
211
|
-
:
|
|
212
|
-
? "terraform"
|
|
213
|
-
: "all";
|
|
198
|
+
: "all";
|
|
214
199
|
const { waitUntilExit } = render(_jsx(OpenCommand, { name: name, target: target }));
|
|
215
200
|
await waitUntilExit();
|
|
216
201
|
});
|
|
@@ -223,8 +208,41 @@ program
|
|
|
223
208
|
const { waitUntilExit } = render(_jsx(BenchmarkCommand, { name: name }));
|
|
224
209
|
await waitUntilExit();
|
|
225
210
|
});
|
|
226
|
-
//
|
|
227
|
-
|
|
211
|
+
// Backup command
|
|
212
|
+
program
|
|
213
|
+
.command("backup")
|
|
214
|
+
.description("Run an on-demand database backup")
|
|
215
|
+
.argument("[name]", "Deployment name")
|
|
216
|
+
.action(async (name) => {
|
|
217
|
+
const deploymentName = name || (await selectDeployment("back up"));
|
|
218
|
+
if (!deploymentName) {
|
|
219
|
+
console.error(chalk.red('No deployments found. Run "rulebricks init" first.'));
|
|
220
|
+
process.exit(1);
|
|
221
|
+
}
|
|
222
|
+
const { waitUntilExit } = render(_jsx(BackupCommand, { name: deploymentName }));
|
|
223
|
+
await waitUntilExit();
|
|
224
|
+
});
|
|
225
|
+
// Restore command
|
|
226
|
+
program
|
|
227
|
+
.command("restore")
|
|
228
|
+
.description("Restore the database from a backup")
|
|
229
|
+
.argument("[name]", "Deployment name")
|
|
230
|
+
.action(async (name) => {
|
|
231
|
+
const deploymentName = name || (await selectDeployment("restore"));
|
|
232
|
+
if (!deploymentName) {
|
|
233
|
+
console.error(chalk.red('No deployments found. Run "rulebricks init" first.'));
|
|
234
|
+
process.exit(1);
|
|
235
|
+
}
|
|
236
|
+
const { waitUntilExit } = render(_jsx(RestoreCommand, { name: deploymentName }));
|
|
237
|
+
await waitUntilExit();
|
|
238
|
+
});
|
|
239
|
+
/**
|
|
240
|
+
* Resolves a deployment name when none was given on the command line.
|
|
241
|
+
* - 0 deployments: returns null (callers print the "run init first" error)
|
|
242
|
+
* - 1 deployment: auto-selects it
|
|
243
|
+
* - multiple: renders an interactive picker; Esc exits cleanly
|
|
244
|
+
*/
|
|
245
|
+
async function selectDeployment(action) {
|
|
228
246
|
const deployments = await listDeployments();
|
|
229
247
|
if (deployments.length === 0) {
|
|
230
248
|
return null;
|
|
@@ -232,8 +250,22 @@ async function selectDeployment() {
|
|
|
232
250
|
if (deployments.length === 1) {
|
|
233
251
|
return deployments[0];
|
|
234
252
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
253
|
+
const selection = await new Promise((resolve) => {
|
|
254
|
+
const { unmount, clear } = render(_jsx(DeploymentPicker, { deployments: deployments, action: action, onSelect: (name) => {
|
|
255
|
+
clear();
|
|
256
|
+
unmount();
|
|
257
|
+
resolve(name);
|
|
258
|
+
}, onCancel: () => {
|
|
259
|
+
clear();
|
|
260
|
+
unmount();
|
|
261
|
+
resolve(null);
|
|
262
|
+
} }));
|
|
263
|
+
});
|
|
264
|
+
if (selection === null) {
|
|
265
|
+
// User cancelled the picker; not an error.
|
|
266
|
+
console.log(chalk.gray("Cancelled."));
|
|
267
|
+
process.exit(0);
|
|
268
|
+
}
|
|
269
|
+
return selection;
|
|
238
270
|
}
|
|
239
271
|
program.parse();
|
package/dist/lib/cloudCli.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Cloud CLI detection and dynamic resource listing
|
|
3
3
|
*
|
|
4
4
|
* Detects installed cloud CLIs (AWS, GCP, Azure), checks authentication status,
|
|
5
|
-
* and provides functions to list regions and
|
|
5
|
+
* and provides functions to list regions, clusters, and storage dynamically.
|
|
6
6
|
*/
|
|
7
7
|
import { CloudProvider } from "../types/index.js";
|
|
8
8
|
/**
|
|
@@ -26,6 +26,41 @@ export interface AllCloudCliStatus {
|
|
|
26
26
|
anyAvailable: boolean;
|
|
27
27
|
anyInstalled: boolean;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Managed Kubernetes cluster discovered through a cloud provider CLI.
|
|
31
|
+
*/
|
|
32
|
+
export interface DiscoveredCluster {
|
|
33
|
+
provider: CloudProvider;
|
|
34
|
+
name: string;
|
|
35
|
+
region: string;
|
|
36
|
+
projectId?: string;
|
|
37
|
+
resourceGroup?: string;
|
|
38
|
+
status?: string;
|
|
39
|
+
version?: string;
|
|
40
|
+
nodeCount?: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* AWS IAM role discovered through the AWS CLI.
|
|
44
|
+
*/
|
|
45
|
+
export interface IamRole {
|
|
46
|
+
name: string;
|
|
47
|
+
arn: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Azure user-assigned managed identity discovered through the Azure CLI.
|
|
51
|
+
*/
|
|
52
|
+
export interface AzureManagedIdentity {
|
|
53
|
+
name: string;
|
|
54
|
+
clientId: string;
|
|
55
|
+
resourceGroup?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* GCP service account discovered through the gcloud CLI.
|
|
59
|
+
*/
|
|
60
|
+
export interface GcpServiceAccount {
|
|
61
|
+
email: string;
|
|
62
|
+
displayName?: string;
|
|
63
|
+
}
|
|
29
64
|
/**
|
|
30
65
|
* Check if AWS CLI is installed and authenticated
|
|
31
66
|
*/
|
|
@@ -42,27 +77,46 @@ export declare function listS3Buckets(): Promise<string[]>;
|
|
|
42
77
|
* List EKS clusters in a specific region
|
|
43
78
|
*/
|
|
44
79
|
export declare function listEksClusters(region: string): Promise<string[]>;
|
|
80
|
+
export type AuroraLogicalReplication = "enabled" | "disabled" | "unknown";
|
|
81
|
+
/**
|
|
82
|
+
* Best-effort preflight for an external AWS Aurora Postgres cluster: Supabase
|
|
83
|
+
* Realtime needs logical replication (wal_level=logical), which on Aurora is the
|
|
84
|
+
* STATIC cluster parameter rds.logical_replication - it lives in a custom DB
|
|
85
|
+
* cluster parameter group and needs a reboot, so bootstrap.sql can't set it and
|
|
86
|
+
* Realtime crashloops without it. Parses the cluster id + region from the writer
|
|
87
|
+
* endpoint and reads the attached parameter group. Fails OPEN ("unknown") on any
|
|
88
|
+
* ambiguity (non-Aurora host, denied describe, unexpected value) so it never
|
|
89
|
+
* blocks a deploy spuriously.
|
|
90
|
+
*/
|
|
91
|
+
export declare function checkAuroraLogicalReplication(host: string, fallbackRegion?: string): Promise<{
|
|
92
|
+
status: AuroraLogicalReplication;
|
|
93
|
+
parameterGroup?: string;
|
|
94
|
+
}>;
|
|
45
95
|
/**
|
|
46
|
-
*
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*
|
|
51
|
-
|
|
96
|
+
* List EKS clusters across all accessible AWS regions.
|
|
97
|
+
*/
|
|
98
|
+
export declare function listAllEksClusters(): Promise<DiscoveredCluster[]>;
|
|
99
|
+
/**
|
|
100
|
+
* Discover active EKS clusters in one region.
|
|
101
|
+
*/
|
|
102
|
+
export declare function discoverEksClustersInRegion(region: string): Promise<DiscoveredCluster[]>;
|
|
103
|
+
/**
|
|
104
|
+
* List IAM roles for selection (e.g. IRSA roles for S3 / AMP). Returns an empty
|
|
105
|
+
* list on any failure so callers can fall back to manual entry.
|
|
106
|
+
*/
|
|
107
|
+
export declare function listIamRoles(): Promise<IamRole[]>;
|
|
108
|
+
/**
|
|
109
|
+
* Get the active AWS account ID (useful for constructing/validating ARNs).
|
|
110
|
+
*/
|
|
111
|
+
export declare function getAwsAccountId(): Promise<string | null>;
|
|
112
|
+
/**
|
|
113
|
+
* Check if gcloud CLI is installed and authenticated enough to list clusters.
|
|
52
114
|
*/
|
|
53
115
|
export declare function checkGcloudCli(): Promise<CloudCliStatus>;
|
|
54
116
|
/**
|
|
55
117
|
* Get the active GCP project ID
|
|
56
118
|
*/
|
|
57
119
|
export declare function getGcpProjectId(): Promise<string | null>;
|
|
58
|
-
/**
|
|
59
|
-
* Check if GCP Application Default Credentials (ADC) are configured
|
|
60
|
-
* ADC is required for Terraform to authenticate with Google Cloud
|
|
61
|
-
*/
|
|
62
|
-
export declare function checkGcpApplicationDefaultCredentials(): Promise<{
|
|
63
|
-
configured: boolean;
|
|
64
|
-
error?: string;
|
|
65
|
-
}>;
|
|
66
120
|
/**
|
|
67
121
|
* List available GCP regions
|
|
68
122
|
*/
|
|
@@ -71,25 +125,63 @@ export declare function listGcpRegions(): Promise<string[]>;
|
|
|
71
125
|
* List GCS buckets
|
|
72
126
|
*/
|
|
73
127
|
export declare function listGcsBuckets(): Promise<string[]>;
|
|
128
|
+
/**
|
|
129
|
+
* List GCP service accounts for selection (e.g. for GKE Workload Identity).
|
|
130
|
+
* Returns an empty list on any failure so callers can fall back to manual entry.
|
|
131
|
+
*/
|
|
132
|
+
export declare function listGcpServiceAccounts(): Promise<GcpServiceAccount[]>;
|
|
74
133
|
/**
|
|
75
134
|
* List GKE clusters in a specific region
|
|
76
135
|
* Note: GKE supports both regional and zonal clusters. We search for regional clusters.
|
|
77
136
|
*/
|
|
78
137
|
export declare function listGkeClusters(region: string): Promise<string[]>;
|
|
79
138
|
/**
|
|
80
|
-
*
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
139
|
+
* List GKE clusters across the active GCP project.
|
|
140
|
+
*/
|
|
141
|
+
export declare function listAllGkeClusters(): Promise<DiscoveredCluster[]>;
|
|
142
|
+
/**
|
|
143
|
+
* Discover running GKE clusters in a selected region/location.
|
|
144
|
+
*/
|
|
145
|
+
export declare function discoverGkeClustersInRegion(region: string): Promise<DiscoveredCluster[]>;
|
|
146
|
+
/**
|
|
147
|
+
* Check if Azure CLI is installed and authenticated enough to list clusters.
|
|
87
148
|
*/
|
|
88
149
|
export declare function checkAzureCli(): Promise<CloudCliStatus>;
|
|
89
150
|
/**
|
|
90
151
|
* Get the active Azure subscription ID
|
|
91
152
|
*/
|
|
92
153
|
export declare function getAzureSubscriptionId(): Promise<string | null>;
|
|
154
|
+
/**
|
|
155
|
+
* Get the active Azure tenant ID. Used to auto-fill workload-identity tenant
|
|
156
|
+
* fields so users don't have to look it up manually.
|
|
157
|
+
*/
|
|
158
|
+
export declare function getAzureTenantId(): Promise<string | null>;
|
|
159
|
+
/**
|
|
160
|
+
* List Azure user-assigned managed identities for selection (workload identity
|
|
161
|
+
* client IDs). Returns an empty list on any failure so callers can fall back to
|
|
162
|
+
* manual entry.
|
|
163
|
+
*/
|
|
164
|
+
export declare function listAzureManagedIdentities(): Promise<AzureManagedIdentity[]>;
|
|
165
|
+
/**
|
|
166
|
+
* A Prometheus remote_write target the user can write to, with the full URL
|
|
167
|
+
* pre-assembled so the wizard never has to hand-build it.
|
|
168
|
+
*/
|
|
169
|
+
export interface RemoteWriteTarget {
|
|
170
|
+
name: string;
|
|
171
|
+
url: string;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Discovers Azure Monitor Prometheus remote_write targets: every Data Collection
|
|
175
|
+
* Rule that ingests the Microsoft-PrometheusMetrics stream, paired with its Data
|
|
176
|
+
* Collection Endpoint's metrics-ingestion endpoint, assembled into the exact
|
|
177
|
+
* remote_write URL. Works for any DCR the caller can see (not just ones we made).
|
|
178
|
+
*/
|
|
179
|
+
export declare function listAzurePrometheusTargets(): Promise<RemoteWriteTarget[]>;
|
|
180
|
+
/**
|
|
181
|
+
* Discovers AWS Managed Prometheus (AMP) workspaces in a region and assembles the
|
|
182
|
+
* remote_write URL (<prometheusEndpoint>api/v1/remote_write) for each.
|
|
183
|
+
*/
|
|
184
|
+
export declare function listAwsPrometheusWorkspaces(region: string): Promise<RemoteWriteTarget[]>;
|
|
93
185
|
/**
|
|
94
186
|
* List available Azure regions (locations)
|
|
95
187
|
*/
|
|
@@ -107,30 +199,13 @@ export declare function listAzureBlobContainers(storageAccount: string): Promise
|
|
|
107
199
|
*/
|
|
108
200
|
export declare function listAksClusters(resourceGroup?: string): Promise<string[]>;
|
|
109
201
|
/**
|
|
110
|
-
*
|
|
202
|
+
* List AKS clusters across the active Azure subscription.
|
|
111
203
|
*/
|
|
112
|
-
export declare
|
|
204
|
+
export declare function listAllAksClusters(): Promise<DiscoveredCluster[]>;
|
|
113
205
|
/**
|
|
114
|
-
*
|
|
206
|
+
* Discover running AKS clusters in a selected Azure location.
|
|
115
207
|
*/
|
|
116
|
-
export declare function
|
|
117
|
-
allRegistered: boolean;
|
|
118
|
-
missing: string[];
|
|
119
|
-
}>;
|
|
120
|
-
/**
|
|
121
|
-
* Check Azure VM quota for a specific region
|
|
122
|
-
*
|
|
123
|
-
* @param region - Azure region to check quota for
|
|
124
|
-
* @param requiredCores - Number of vCPUs required
|
|
125
|
-
* @returns Quota check result with availability info
|
|
126
|
-
*/
|
|
127
|
-
export declare function checkAzureVmQuota(region: string, requiredCores: number): Promise<{
|
|
128
|
-
sufficient: boolean;
|
|
129
|
-
available: number;
|
|
130
|
-
limit: number;
|
|
131
|
-
used: number;
|
|
132
|
-
error?: string;
|
|
133
|
-
}>;
|
|
208
|
+
export declare function discoverAksClustersInRegion(region: string): Promise<DiscoveredCluster[]>;
|
|
134
209
|
/**
|
|
135
210
|
* Check all cloud CLIs in parallel
|
|
136
211
|
*/
|
|
@@ -149,6 +224,22 @@ export declare function listBuckets(provider: CloudProvider): Promise<string[]>;
|
|
|
149
224
|
export declare function listClusters(provider: CloudProvider, region: string, options?: {
|
|
150
225
|
azureResourceGroup?: string;
|
|
151
226
|
}): Promise<string[]>;
|
|
227
|
+
/**
|
|
228
|
+
* List managed Kubernetes clusters discoverable through a provider CLI.
|
|
229
|
+
*/
|
|
230
|
+
export declare function listManagedClusters(provider: CloudProvider): Promise<DiscoveredCluster[]>;
|
|
231
|
+
/**
|
|
232
|
+
* List managed Kubernetes clusters discoverable through a provider CLI in a
|
|
233
|
+
* selected region/location. This is used by init to avoid account-wide fan-out.
|
|
234
|
+
*/
|
|
235
|
+
export declare function discoverClustersInRegion(provider: CloudProvider, region: string): Promise<DiscoveredCluster[]>;
|
|
236
|
+
/**
|
|
237
|
+
* Refresh kubeconfig credentials for a selected managed Kubernetes cluster.
|
|
238
|
+
*/
|
|
239
|
+
export declare function updateKubeconfig(provider: CloudProvider, clusterName: string, region: string, options?: {
|
|
240
|
+
gcpProjectId?: string;
|
|
241
|
+
azureResourceGroup?: string;
|
|
242
|
+
}): Promise<void>;
|
|
152
243
|
/**
|
|
153
244
|
* Get installation URLs for cloud CLIs
|
|
154
245
|
*/
|
|
@@ -161,26 +252,6 @@ export declare const CLI_INSTALL_URLS: Record<CloudProvider, {
|
|
|
161
252
|
* Get login commands for cloud CLIs
|
|
162
253
|
*/
|
|
163
254
|
export declare const CLI_LOGIN_COMMANDS: Record<CloudProvider, string | string[]>;
|
|
164
|
-
/**
|
|
165
|
-
* Terraform installation status
|
|
166
|
-
*/
|
|
167
|
-
export interface TerraformStatus {
|
|
168
|
-
installed: boolean;
|
|
169
|
-
version?: string;
|
|
170
|
-
error?: string;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Check if Terraform is installed
|
|
174
|
-
*/
|
|
175
|
-
export declare function checkTerraform(): Promise<TerraformStatus>;
|
|
176
|
-
/**
|
|
177
|
-
* Terraform installation info
|
|
178
|
-
*/
|
|
179
|
-
export declare const TERRAFORM_INSTALL_INFO: {
|
|
180
|
-
name: string;
|
|
181
|
-
url: string;
|
|
182
|
-
installCmd: string;
|
|
183
|
-
};
|
|
184
255
|
/**
|
|
185
256
|
* List S3 buckets in a specific region
|
|
186
257
|
* Note: S3 buckets are global, but we filter by region
|