fix(docs): remove stand-specific hardcodes

This commit is contained in:
“Naeel”
2026-09-03 16:14:28 +03:00
parent 6bf514e03a
commit aa0f7f6402
7 changed files with 170 additions and 51 deletions
+8 -4
View File
@@ -24,10 +24,8 @@ func main() {
servicesListFlag := flag.String("services", "", "Path to TOOLS/config/{stand}/services_list.txt")
excludeFlag := flag.String("exclude", "", "Comma-separated resource names to skip")
versionFlag := flag.String("version", "", "Provider version for example block")
// ⛔ LEGACY DEFAULT (index.cfm) — переопределяется через NUBES_API_ENDPOINT в profile.env.
// Никогда не использовать deck-api.ngcloud.ru напрямую.
apiEndpointFlag := flag.String("api-endpoint", "https://lk-api-gateway.ngcloud.ru/api/v1/svc", "API endpoint for example block")
providerSourceFlag := flag.String("provider-source", "tf-registry.containerk8s.services.ngcloud.ru/nubes-dev/nubes", "Provider source for example block")
apiEndpointFlag := flag.String("api-endpoint", "", "API endpoint for example block (required)")
providerSourceFlag := flag.String("provider-source", "", "Provider source for example block (required)")
opsFlag := flag.Bool("ops", false, "Generate per-service operations docs (resources_ops_yaml → docs/.../operations)")
flag.Parse()
@@ -52,7 +50,13 @@ func main() {
panic("--version is required")
}
apiEndpoint := *apiEndpointFlag
if apiEndpoint == "" {
panic("--api-endpoint is required")
}
providerSource := *providerSourceFlag
if providerSource == "" {
panic("--provider-source is required")
}
servicesOrder := loadServicesList(servicesList)
specs := loadSpecs(resourcesDir, servicesOrder)