@vfarcic/dot-ai 0.116.0 → 0.118.0
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 +91 -137
- package/dist/core/ai-provider-factory.d.ts +4 -2
- package/dist/core/ai-provider-factory.d.ts.map +1 -1
- package/dist/core/ai-provider-factory.js +17 -6
- package/dist/core/capability-operations.js +1 -1
- package/dist/core/generic-session-manager.d.ts +67 -0
- package/dist/core/generic-session-manager.d.ts.map +1 -0
- package/dist/core/generic-session-manager.js +192 -0
- package/dist/core/pattern-operations.js +1 -1
- package/dist/core/providers/noop-provider.d.ts +47 -0
- package/dist/core/providers/noop-provider.d.ts.map +1 -0
- package/dist/core/providers/noop-provider.js +63 -0
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +13 -13
- package/dist/core/session-utils.d.ts +3 -6
- package/dist/core/session-utils.d.ts.map +1 -1
- package/dist/core/session-utils.js +5 -13
- package/dist/core/shared-prompt-loader.d.ts +15 -3
- package/dist/core/shared-prompt-loader.d.ts.map +1 -1
- package/dist/core/shared-prompt-loader.js +67 -14
- package/dist/core/unified-creation-session.d.ts +3 -10
- package/dist/core/unified-creation-session.d.ts.map +1 -1
- package/dist/core/unified-creation-session.js +34 -75
- package/dist/core/unified-creation-types.d.ts +31 -22
- package/dist/core/unified-creation-types.d.ts.map +1 -1
- package/dist/interfaces/mcp.d.ts.map +1 -1
- package/dist/interfaces/mcp.js +9 -34
- package/dist/tools/answer-question.d.ts.map +1 -1
- package/dist/tools/answer-question.js +12 -12
- package/dist/tools/choose-solution.js +1 -1
- package/dist/tools/generate-manifests.d.ts.map +1 -1
- package/dist/tools/generate-manifests.js +9 -10
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +6 -6
- package/dist/tools/organizational-data.js +12 -12
- package/dist/tools/project-setup/discovery.d.ts +15 -0
- package/dist/tools/project-setup/discovery.d.ts.map +1 -0
- package/dist/tools/project-setup/discovery.js +104 -0
- package/dist/tools/project-setup/generate-scope.d.ts +15 -0
- package/dist/tools/project-setup/generate-scope.d.ts.map +1 -0
- package/dist/tools/project-setup/generate-scope.js +237 -0
- package/dist/tools/project-setup/report-scan.d.ts +15 -0
- package/dist/tools/project-setup/report-scan.d.ts.map +1 -0
- package/dist/tools/project-setup/report-scan.js +156 -0
- package/dist/tools/project-setup/types.d.ts +111 -0
- package/dist/tools/project-setup/types.d.ts.map +1 -0
- package/dist/tools/project-setup/types.js +8 -0
- package/dist/tools/project-setup.d.ts +28 -0
- package/dist/tools/project-setup.d.ts.map +1 -0
- package/dist/tools/project-setup.js +134 -0
- package/dist/tools/recommend.js +1 -1
- package/dist/tools/remediate.js +1 -1
- package/dist/tools/version.d.ts +0 -7
- package/dist/tools/version.d.ts.map +1 -1
- package/dist/tools/version.js +5 -34
- package/package.json +4 -2
- package/prompts/capability-inference.md +2 -2
- package/prompts/infrastructure-trigger-expansion.md +2 -2
- package/prompts/intent-analysis.md +2 -2
- package/prompts/kyverno-generation.md +14 -14
- package/prompts/manifest-generation.md +5 -5
- package/prompts/map-intent-to-operation.md +2 -2
- package/prompts/pattern-complete-error.md +1 -1
- package/prompts/pattern-complete-success.md +4 -4
- package/prompts/pattern-rationale.md +1 -1
- package/prompts/pattern-resources.md +1 -1
- package/prompts/pattern-review.md +5 -5
- package/prompts/policy-complete-apply.md +4 -4
- package/prompts/policy-complete-discard.md +1 -1
- package/prompts/policy-complete-error.md +1 -1
- package/prompts/policy-complete-save.md +4 -4
- package/prompts/policy-complete-success.md +4 -4
- package/prompts/policy-namespace-scope.md +1 -1
- package/prompts/question-generation.md +5 -5
- package/prompts/resource-analysis.md +3 -3
- package/prompts/resource-selection.md +3 -3
- package/prompts/solution-enhancement.md +4 -4
- package/scripts/anthropic.nu +9 -13
- package/scripts/common.nu +31 -33
- package/scripts/ingress.nu +5 -4
- package/scripts/kubernetes.nu +38 -53
- package/shared-prompts/prd-create.md +15 -1
- package/shared-prompts/prd-done.md +1 -0
- package/shared-prompts/prd-next.md +0 -2
- package/shared-prompts/prd-start.md +2 -2
- package/dist/core/doc-discovery.d.ts +0 -38
- package/dist/core/doc-discovery.d.ts.map +0 -1
- package/dist/core/doc-discovery.js +0 -231
- package/dist/core/doc-testing-session.d.ts +0 -109
- package/dist/core/doc-testing-session.d.ts.map +0 -1
- package/dist/core/doc-testing-session.js +0 -696
- package/dist/core/doc-testing-types.d.ts +0 -127
- package/dist/core/doc-testing-types.d.ts.map +0 -1
- package/dist/core/doc-testing-types.js +0 -53
- package/dist/core/nushell-runtime.d.ts +0 -39
- package/dist/core/nushell-runtime.d.ts.map +0 -1
- package/dist/core/nushell-runtime.js +0 -103
- package/dist/core/platform-operations.d.ts +0 -70
- package/dist/core/platform-operations.d.ts.map +0 -1
- package/dist/core/platform-operations.js +0 -294
- package/dist/tools/build-platform.d.ts +0 -25
- package/dist/tools/build-platform.d.ts.map +0 -1
- package/dist/tools/build-platform.js +0 -277
- package/dist/tools/test-docs.d.ts +0 -22
- package/dist/tools/test-docs.d.ts.map +0 -1
- package/dist/tools/test-docs.js +0 -351
- package/prompts/doc-testing-done.md +0 -51
- package/prompts/doc-testing-fix.md +0 -120
- package/prompts/doc-testing-scan.md +0 -140
- package/prompts/doc-testing-test-section.md +0 -169
- package/prompts/platform-operations-parse-script-help.md +0 -68
- package/scripts/ack.nu +0 -195
- package/scripts/argo-workflows.nu +0 -47
- package/scripts/argocd.nu +0 -85
- package/scripts/aso.nu +0 -74
- package/scripts/backstage.nu +0 -349
- package/scripts/cert-manager.nu +0 -13
- package/scripts/cnpg.nu +0 -14
- package/scripts/dot.nu +0 -32
- package/scripts/external-secrets.nu +0 -110
- package/scripts/gatekeeper.nu +0 -19
- package/scripts/github.nu +0 -42
- package/scripts/image.nu +0 -67
- package/scripts/kro.nu +0 -11
- package/scripts/kubevela.nu +0 -22
- package/scripts/port.nu +0 -71
- package/scripts/prometheus.nu +0 -21
- package/scripts/registry.nu +0 -55
- package/scripts/storage.nu +0 -210
- package/scripts/tests.nu +0 -12
- package/scripts/velero.nu +0 -45
- package/shared-prompts/validate-docs.md +0 -22
package/scripts/port.nu
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env nu
|
|
2
|
-
|
|
3
|
-
# Installs Port.io for software catalog management
|
|
4
|
-
#
|
|
5
|
-
# Examples:
|
|
6
|
-
# > main apply port myuser my-repo
|
|
7
|
-
def "main apply port" [
|
|
8
|
-
github_user: string
|
|
9
|
-
github_repo: string
|
|
10
|
-
--port-client-id: string, # Port Client ID (optional, falls back to PORT_CLIENT_ID env var)
|
|
11
|
-
--port-client-secret: string # Port Client Secret (optional, falls back to PORT_CLIENT_SECRET env var)
|
|
12
|
-
] {
|
|
13
|
-
|
|
14
|
-
start "https://getport.io"
|
|
15
|
-
|
|
16
|
-
print $"
|
|
17
|
-
(ansi yellow_bold)Sign Up(ansi reset) \(if not already registered\) and (ansi yellow_bold)Log In(ansi reset) to Port.
|
|
18
|
-
Press any key to continue.
|
|
19
|
-
"
|
|
20
|
-
input
|
|
21
|
-
|
|
22
|
-
mut client_id = $port_client_id
|
|
23
|
-
if ($client_id | is-empty) and ("PORT_CLIENT_ID" in $env) {
|
|
24
|
-
$client_id = $env.PORT_CLIENT_ID
|
|
25
|
-
} else if ($client_id | is-empty) {
|
|
26
|
-
error make { msg: "Port Client ID required via --port-client-id parameter or PORT_CLIENT_ID environment variable" }
|
|
27
|
-
}
|
|
28
|
-
$"export PORT_CLIENT_ID=($client_id)\n"
|
|
29
|
-
| save --append .env
|
|
30
|
-
|
|
31
|
-
mut client_secret = $port_client_secret
|
|
32
|
-
if ($client_secret | is-empty) and ("PORT_CLIENT_SECRET" in $env) {
|
|
33
|
-
$client_secret = $env.PORT_CLIENT_SECRET
|
|
34
|
-
} else if ($client_secret | is-empty) {
|
|
35
|
-
error make { msg: "Port Client Secret required via --port-client-secret parameter or PORT_CLIENT_SECRET environment variable" }
|
|
36
|
-
}
|
|
37
|
-
$"export PORT_CLIENT_SECRET=($client_secret)\n"
|
|
38
|
-
| save --append .env
|
|
39
|
-
|
|
40
|
-
print $"
|
|
41
|
-
Install (ansi green_bold)Port's GitHub app(ansi reset).
|
|
42
|
-
Open https://docs.getport.io/build-your-software-catalog/sync-data-to-catalog/git/github/#installation for more information.
|
|
43
|
-
Press any key to continue.
|
|
44
|
-
"
|
|
45
|
-
input
|
|
46
|
-
|
|
47
|
-
(
|
|
48
|
-
helm upgrade --install port-k8s-exporter port-k8s-exporter
|
|
49
|
-
--repo https://port-labs.github.io/helm-charts
|
|
50
|
-
--namespace port-k8s-exporter --create-namespace
|
|
51
|
-
--set $"secret.secrets.portClientId=($client_id)"
|
|
52
|
-
--set $"secret.secrets.portClientSecret=($client_secret)"
|
|
53
|
-
--set stateKey="k8s-exporter"
|
|
54
|
-
--set createDefaultResources=false
|
|
55
|
-
--set "extraEnv[0].name"="dot"
|
|
56
|
-
--set "extraEnv[0].value"=dot
|
|
57
|
-
--wait
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
# Guides cleanup of Port.io resources
|
|
63
|
-
def "main delete port" [] {
|
|
64
|
-
|
|
65
|
-
print $"
|
|
66
|
-
Delete all items from the (ansi yellow_bold)Catalog(ansi reset), (ansi yellow_bold)Self-service(ansi reset), and (ansi yellow_bold)Builder > Data model(ansi reset) pages in Port's Web UI.
|
|
67
|
-
Press any key to continue.
|
|
68
|
-
"
|
|
69
|
-
input
|
|
70
|
-
|
|
71
|
-
}
|
package/scripts/prometheus.nu
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env nu
|
|
2
|
-
|
|
3
|
-
def apply_prometheus [ingress_class: string, ingress_host: string] {
|
|
4
|
-
|
|
5
|
-
open values-prometheus.yaml
|
|
6
|
-
| upsert grafana.ingress.ingressClassName $ingress_class
|
|
7
|
-
| upsert grafana.ingress.hosts.0 $"grafana.($ingress_host)"
|
|
8
|
-
| upsert prometheus.ingress.ingressClassName $ingress_class
|
|
9
|
-
| upsert prometheus.ingress.hosts.0 $"prometheus.($ingress_host)"
|
|
10
|
-
| save values-prometheus.yaml --force
|
|
11
|
-
|
|
12
|
-
(
|
|
13
|
-
helm upgrade --install
|
|
14
|
-
kube-prometheus-stack kube-prometheus-stack
|
|
15
|
-
--repo https://prometheus-community.github.io/helm-charts
|
|
16
|
-
--values values-prometheus.yaml
|
|
17
|
-
--namespace prometheus-system --create-namespace
|
|
18
|
-
--wait
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
}
|
package/scripts/registry.nu
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env nu
|
|
2
|
-
|
|
3
|
-
# Returns registry information.
|
|
4
|
-
#
|
|
5
|
-
# Parameters:
|
|
6
|
-
# --registry-server: Container registry server (optional, falls back to REGISTRY_SERVER env var)
|
|
7
|
-
# --registry-user: Container registry user (optional, falls back to REGISTRY_USER env var)
|
|
8
|
-
# --registry-email: Container registry email (optional, falls back to REGISTRY_EMAIL env var)
|
|
9
|
-
# --registry-password: Container registry password/token (optional, falls back to REGISTRY_PASSWORD env var)
|
|
10
|
-
#
|
|
11
|
-
# Example: `{server: "my-server", user: "my-user", email: "my-email", password: "my-password"}`
|
|
12
|
-
def --env "main get registry" [
|
|
13
|
-
--registry-server: string,
|
|
14
|
-
--registry-user: string,
|
|
15
|
-
--registry-email: string,
|
|
16
|
-
--registry-password: string
|
|
17
|
-
]: [
|
|
18
|
-
string -> record
|
|
19
|
-
] {
|
|
20
|
-
|
|
21
|
-
mut server = $registry_server
|
|
22
|
-
if ($server | is-empty) and ("REGISTRY_SERVER" in $env) {
|
|
23
|
-
$server = $env.REGISTRY_SERVER
|
|
24
|
-
} else if ($server | is-empty) {
|
|
25
|
-
error make { msg: "Registry server required via --registry-server parameter or REGISTRY_SERVER environment variable" }
|
|
26
|
-
}
|
|
27
|
-
$"export REGISTRY_SERVER=($server)\n" | save --append .env
|
|
28
|
-
|
|
29
|
-
mut user = $registry_user
|
|
30
|
-
if ($user | is-empty) and ("REGISTRY_USER" in $env) {
|
|
31
|
-
$user = $env.REGISTRY_USER
|
|
32
|
-
} else if ($user | is-empty) {
|
|
33
|
-
error make { msg: "Registry user required via --registry-user parameter or REGISTRY_USER environment variable" }
|
|
34
|
-
}
|
|
35
|
-
$"export REGISTRY_USER=($user)\n" | save --append .env
|
|
36
|
-
|
|
37
|
-
mut email = $registry_email
|
|
38
|
-
if ($email | is-empty) and ("REGISTRY_EMAIL" in $env) {
|
|
39
|
-
$email = $env.REGISTRY_EMAIL
|
|
40
|
-
} else if ($email | is-empty) {
|
|
41
|
-
error make { msg: "Registry email required via --registry-email parameter or REGISTRY_EMAIL environment variable" }
|
|
42
|
-
}
|
|
43
|
-
$"export REGISTRY_EMAIL=($email)\n" | save --append .env
|
|
44
|
-
|
|
45
|
-
mut password = $registry_password
|
|
46
|
-
if ($password | is-empty) and ("REGISTRY_PASSWORD" in $env) {
|
|
47
|
-
$password = $env.REGISTRY_PASSWORD
|
|
48
|
-
} else if ($password | is-empty) {
|
|
49
|
-
error make { msg: "Registry password required via --registry-password parameter or REGISTRY_PASSWORD environment variable" }
|
|
50
|
-
}
|
|
51
|
-
$"export REGISTRY_PASSWORD=($password)\n" | save --append .env
|
|
52
|
-
|
|
53
|
-
{server: $server, user: $user, email: $email, password: $password}
|
|
54
|
-
|
|
55
|
-
}
|
package/scripts/storage.nu
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env nu
|
|
2
|
-
|
|
3
|
-
# Creates cloud storage resources based on the specified provider
|
|
4
|
-
#
|
|
5
|
-
# Returns:
|
|
6
|
-
# A record with the storage bucket name
|
|
7
|
-
def create_storage [provider: string, auth = true] {
|
|
8
|
-
|
|
9
|
-
let bucket = $"dot-(date now | format date "%Y%m%d%H%M%S")"
|
|
10
|
-
$"export STORAGE_NAME=($bucket)\n" | save --append .env
|
|
11
|
-
|
|
12
|
-
if $provider == "aws" {
|
|
13
|
-
|
|
14
|
-
(
|
|
15
|
-
aws s3api create-bucket --bucket $bucket
|
|
16
|
-
--region us-east-1
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
aws iam create-user --user-name velero
|
|
20
|
-
|
|
21
|
-
(
|
|
22
|
-
aws iam put-user-policy --user-name velero
|
|
23
|
-
--policy-name velero
|
|
24
|
-
--policy-document file://aws-storage-policy.json
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
let access_key_id = (
|
|
28
|
-
aws iam create-access-key --user-name velero
|
|
29
|
-
| from json
|
|
30
|
-
| get AccessKey.AccessKeyId
|
|
31
|
-
)
|
|
32
|
-
$"export STORAGE_ACCESS_KEY_ID=($access_key_id)\n"
|
|
33
|
-
| save --append .env
|
|
34
|
-
|
|
35
|
-
} else if $provider == "google" {
|
|
36
|
-
|
|
37
|
-
if $auth {
|
|
38
|
-
gcloud auth login
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
(
|
|
42
|
-
gcloud storage buckets create $"gs://($bucket)"
|
|
43
|
-
--project $env.PROJECT_ID --location us-east1
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
(
|
|
47
|
-
gcloud iam service-accounts create velero
|
|
48
|
-
--project $env.PROJECT_ID --display-name "Velero"
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
let sa_email = $"velero@($env.PROJECT_ID).iam.gserviceaccount.com"
|
|
52
|
-
|
|
53
|
-
(
|
|
54
|
-
gcloud iam roles create velero.server
|
|
55
|
-
--project $env.PROJECT_ID
|
|
56
|
-
--file google-permissions.yaml
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
(
|
|
60
|
-
gcloud projects add-iam-policy-binding $env.PROJECT_ID
|
|
61
|
-
--member $"serviceAccount:($sa_email)"
|
|
62
|
-
--role $"projects/($env.PROJECT_ID)/roles/velero.server"
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
(
|
|
66
|
-
gsutil iam ch
|
|
67
|
-
$"serviceAccount:($sa_email):objectAdmin"
|
|
68
|
-
$"gs://($bucket)"
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
(
|
|
72
|
-
gcloud iam service-accounts keys create
|
|
73
|
-
google-creds.json --iam-account $sa_email
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
} else if $provider == "azure" {
|
|
77
|
-
|
|
78
|
-
let sa_id = $"velero(uuidgen | cut -d '-' -f5 | tr '[A-Z]' '[a-z]')"
|
|
79
|
-
$"export AZURE_SA_ID=($sa_id)\n" | save --append .env
|
|
80
|
-
|
|
81
|
-
(
|
|
82
|
-
az storage account create
|
|
83
|
-
--name $sa_id
|
|
84
|
-
--resource-group $env.RESOURCE_GROUP
|
|
85
|
-
--sku Standard_GRS --encryption-services blob
|
|
86
|
-
--https-only true --min-tls-version TLS1_2
|
|
87
|
-
--kind BlobStorage --access-tier Hot
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
(
|
|
91
|
-
az storage container create --name velero
|
|
92
|
-
--public-access off --account-name $sa_id
|
|
93
|
-
--resource-group $env.RESOURCE_GROUP
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
let subscription_id = (az account list
|
|
97
|
-
--query '[?isDefault].id' --output tsv)
|
|
98
|
-
|
|
99
|
-
open azure-permissions.json
|
|
100
|
-
| upsert AssignableScopes.0 $"/subscriptions/($subscription_id)"
|
|
101
|
-
| save azure-permissions.json --force
|
|
102
|
-
|
|
103
|
-
(
|
|
104
|
-
az role definition create
|
|
105
|
-
--role-definition azure-permissions.json
|
|
106
|
-
--resource-group $env.RESOURCE_GROUP
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
let tenant_id = (az account list
|
|
110
|
-
--query '[?isDefault].tenantId' --output tsv)
|
|
111
|
-
|
|
112
|
-
let client_secret = (az ad sp create-for-rbac
|
|
113
|
-
--name velero --role Velero --query 'password'
|
|
114
|
-
--output tsv
|
|
115
|
-
--scopes $"/subscriptions/($subscription_id)"
|
|
116
|
-
--resource-group $env.RESOURCE_GROUP
|
|
117
|
-
)
|
|
118
|
-
|
|
119
|
-
let client_id = (az ad sp list --display-name "velero"
|
|
120
|
-
--query '[0].appId' --output tsv)
|
|
121
|
-
$"export AZURE_CLIENT_ID=($client_id)\n"
|
|
122
|
-
| save --append .env
|
|
123
|
-
|
|
124
|
-
$"AZURE_SUBSCRIPTION_ID=($subscription_id)
|
|
125
|
-
AZURE_TENANT_ID=($tenant_id)
|
|
126
|
-
AZURE_CLIENT_ID=($client_id)
|
|
127
|
-
AZURE_CLIENT_SECRET=($client_secret)
|
|
128
|
-
AZURE_RESOURCE_GROUP=($env.RESOURCE_GROUP)
|
|
129
|
-
AZURE_CLOUD_NAME=AzurePublicCloud" | save azure-creds.env --force
|
|
130
|
-
|
|
131
|
-
} else {
|
|
132
|
-
|
|
133
|
-
print $"(ansi red_bold)($provider)(ansi reset) is not a supported."
|
|
134
|
-
exit 1
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
{name: $bucket}
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
# Destroys cloud storage resources created for the specified provider
|
|
143
|
-
def destroy_storage [provider: string, storage_name: string, delete_project = true] {
|
|
144
|
-
|
|
145
|
-
if $provider == "aws" {
|
|
146
|
-
|
|
147
|
-
do --ignore-errors {
|
|
148
|
-
|
|
149
|
-
(
|
|
150
|
-
aws iam delete-access-key --user-name velero
|
|
151
|
-
--access-key-id $env.STORAGE_ACCESS_KEY_ID
|
|
152
|
-
--region us-east-1
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
(
|
|
156
|
-
aws iam delete-user-policy --user-name velero
|
|
157
|
-
--policy-name velero
|
|
158
|
-
--region us-east-1
|
|
159
|
-
)
|
|
160
|
-
|
|
161
|
-
aws iam delete-user --user-name velero
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
(
|
|
166
|
-
aws s3 rm $"s3://($storage_name)" --recursive
|
|
167
|
-
--include "*"
|
|
168
|
-
)
|
|
169
|
-
|
|
170
|
-
(
|
|
171
|
-
aws s3api delete-bucket --bucket $storage_name
|
|
172
|
-
--region us-east-1
|
|
173
|
-
)
|
|
174
|
-
|
|
175
|
-
} else if $provider == "google" {
|
|
176
|
-
|
|
177
|
-
(
|
|
178
|
-
gcloud storage rm $"gs://($storage_name)" --recursive
|
|
179
|
-
--project $env.PROJECT_ID
|
|
180
|
-
)
|
|
181
|
-
|
|
182
|
-
if $delete_project {
|
|
183
|
-
gcloud projects delete $env.PROJECT_ID --quiet
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
} else if $provider == "azure" {
|
|
187
|
-
|
|
188
|
-
(
|
|
189
|
-
az storage container delete --name velero
|
|
190
|
-
--account-name $env.AZURE_SA_ID
|
|
191
|
-
)
|
|
192
|
-
|
|
193
|
-
(
|
|
194
|
-
az storage account delete
|
|
195
|
-
--name $env.AZURE_SA_ID
|
|
196
|
-
--resource-group $env.RESOURCE_GROUP --yes
|
|
197
|
-
)
|
|
198
|
-
|
|
199
|
-
az ad sp delete --id $env.AZURE_CLIENT_ID
|
|
200
|
-
|
|
201
|
-
az role definition delete --name Velero
|
|
202
|
-
|
|
203
|
-
} else {
|
|
204
|
-
|
|
205
|
-
print $"(ansi red_bold)($provider)(ansi reset) is not a supported."
|
|
206
|
-
exit 1
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
}
|
package/scripts/tests.nu
DELETED
package/scripts/velero.nu
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env nu
|
|
2
|
-
|
|
3
|
-
# Installs Velero backup and restore solution for Kubernetes with provider-specific configuration
|
|
4
|
-
def apply_velero [provider: string, storage_name: string] {
|
|
5
|
-
|
|
6
|
-
if $provider == "aws" {
|
|
7
|
-
|
|
8
|
-
(
|
|
9
|
-
velero install --provider aws
|
|
10
|
-
--plugins velero/velero-plugin-for-aws:v1.10.0
|
|
11
|
-
--bucket $storage_name
|
|
12
|
-
--backup-location-config region=us-east-1
|
|
13
|
-
--snapshot-location-config region=us-east-1
|
|
14
|
-
--secret-file ./aws-creds.conf --output yaml
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
} else if $provider == "google" {
|
|
18
|
-
|
|
19
|
-
(
|
|
20
|
-
velero install --provider gcp
|
|
21
|
-
--plugins velero/velero-plugin-for-gcp:v1.11.0
|
|
22
|
-
--bucket $storage_name
|
|
23
|
-
--secret-file ./google-creds.json --output yaml
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
} else if $provider == "azure" {
|
|
27
|
-
|
|
28
|
-
(
|
|
29
|
-
velero install --provider azure
|
|
30
|
-
--plugins velero/velero-plugin-for-microsoft-azure:v1.11.0
|
|
31
|
-
--bucket $storage_name
|
|
32
|
-
--service-account-name velero
|
|
33
|
-
--pod-labels azure.workload.identity/use=true
|
|
34
|
-
--secret-file azure-creds.env
|
|
35
|
-
--backup-location-config $"useAAD='true',resourceGroup=($env.RESOURCE_GROUP),storageAccount=($env.AZURE_SA_ID)"
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
} else {
|
|
39
|
-
|
|
40
|
-
print $"(ansi red_bold)($provider)(ansi reset) is not a supported."
|
|
41
|
-
exit 1
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: validate-docs
|
|
3
|
-
description: Validate documentation files for accuracy and quality
|
|
4
|
-
category: documentation
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Validate Documentation
|
|
8
|
-
|
|
9
|
-
What documentation do you want to validate?
|
|
10
|
-
|
|
11
|
-
**Examples:**
|
|
12
|
-
- "Validate my README.md file"
|
|
13
|
-
- "Validate all markdown files in the docs/ directory"
|
|
14
|
-
- "Validate API documentation for broken links and examples"
|
|
15
|
-
- "Validate installation guide for outdated commands"
|
|
16
|
-
- "Validate tutorial documentation for accuracy"
|
|
17
|
-
|
|
18
|
-
**Your validation request**: [Please specify which documentation files you want to validate]
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
Once you specify the documentation, I'll call the `testDocs` tool to analyze your files for accuracy, functionality, broken examples, outdated commands, invalid links, and overall quality.
|