- runtimes/go1.23: добавлен pgx/v5 v5.7.2 в go.mod, сгенерирован go.sum - runtimes/go1.23/Dockerfile: один stage golang:1.23-alpine, go mod download кеширует зависимости - internal/builder/context.go: тег Go runtime v0.1.0 → v0.1.1 - internal/api/handler/invoke.go: таймаут прокси-клиента теперь динамический из Function.Spec.TimeoutSec + 5s буфер (был хардкод 30s) - examples/POSTGRES/code/stress-go-pgstorm/handler.go: новая функция, 100 горутин, pgxpool, INSERT/COUNT/MAX, параметры: workers/duration_sec/max_delay_ms - examples/POSTGRES/resources.tf: добавлены sless_function.stress_go_pgstorm + trigger, timeout_sec=700 - deployments/k8s/operator.yaml: nginx ingress proxy-read-timeout=900s, proxy-send-timeout=900s - examples/*/main.tf: исправлен URL deck-api-test.ngcloud.ru → deck-test.ngcloud.ru (все 9 файлов) - Оператор: v0.1.39 (pgx/v5) → v0.1.40 (dynamic timeout)
59 lines
1.6 KiB
Terraform
59 lines
1.6 KiB
Terraform
// 2026-03-17 17:05
|
|
// main.tf — провайдеры и переменные для Nubes + sless.
|
|
terraform {
|
|
required_providers {
|
|
nubes = {
|
|
source = "terra.k8c.ru/nubes/nubes"
|
|
version = "5.0.19"
|
|
}
|
|
sless = {
|
|
source = "terra.k8c.ru/naeel/sless"
|
|
version = "~> 0.1.18"
|
|
}
|
|
}
|
|
}
|
|
|
|
variable "api_token" {
|
|
type = string
|
|
sensitive = true
|
|
description = "Nubes API token"
|
|
}
|
|
variable "s3_uid" {
|
|
type = string
|
|
sensitive = true
|
|
description = "Nubes S3 UID"
|
|
}
|
|
variable "realm" {
|
|
type = string
|
|
sensitive = true
|
|
description = "resource_realm parameter for nubes_postgres resource"
|
|
}
|
|
|
|
// 2026-03-18 — pg_user/pg_password помечены optional (default="") для сверки.
|
|
// Реальные credentials берутся из vault_secrets через locals в resources.tf.
|
|
variable "pg_user" {
|
|
type = string
|
|
sensitive = true
|
|
default = ""
|
|
description = "Только для сверки. Реальный username из nubes_postgres_user.pg_user.username. Должен совпадать с vault."
|
|
}
|
|
|
|
variable "pg_password" {
|
|
type = string
|
|
sensitive = true
|
|
default = ""
|
|
description = "Только для сверки. Реальный пароль из vault_secrets. Должен совпадать с tfvars."
|
|
}
|
|
|
|
provider "nubes" {
|
|
api_token = var.api_token
|
|
api_endpoint = "https://deck-test.ngcloud.ru/api/v1/index.cfm"
|
|
}
|
|
|
|
provider "sless" {
|
|
endpoint = "https://sless.kube5s.ru"
|
|
token = var.api_token
|
|
nubes_endpoint = "https://deck-test.ngcloud.ru/api/v1"
|
|
}
|
|
|