feat: parameterize provider address and source for multi-stand (DEV/TEST/PROD) support
This commit is contained in:
@@ -27,6 +27,7 @@ func main() {
|
||||
// ⛔ 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", "registry.kube5s.ru/nubes-dev/nubes", "Provider source for example block")
|
||||
opsFlag := flag.Bool("ops", false, "Generate per-service operations docs (resources_ops_yaml → docs/.../operations)")
|
||||
flag.Parse()
|
||||
|
||||
@@ -51,6 +52,7 @@ func main() {
|
||||
panic("--version is required")
|
||||
}
|
||||
apiEndpoint := *apiEndpointFlag
|
||||
providerSource := *providerSourceFlag
|
||||
|
||||
servicesOrder := loadServicesList(servicesList)
|
||||
specs := loadSpecs(resourcesDir, servicesOrder)
|
||||
@@ -69,7 +71,7 @@ func main() {
|
||||
if excludeSet[spec.Name] {
|
||||
continue
|
||||
}
|
||||
writers.ResourceDocs(docsDir, spec, version, apiEndpoint)
|
||||
writers.ResourceDocs(docsDir, spec, version, apiEndpoint, providerSource)
|
||||
processedSpecs = append(processedSpecs, spec)
|
||||
}
|
||||
writers.IndexMD(docsDir, processedSpecs)
|
||||
|
||||
Reference in New Issue
Block a user