fix: redeploy template — merge modify-params into redeploy params (single apply), bump TEST 5.1.14

This commit is contained in:
“Naeel”
2026-07-20 09:49:18 +04:00
parent 67ce3e4ab9
commit 53edffd255
12 changed files with 663 additions and 152 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ TOKEN_FILE="secrets/dev.token"
# Release versions
# Version
VERSION="3.1.11"
VERSION="3.1.12"
# Registry/S3 settings
REGISTRY_HOST="registry.kube5s.ru"
+1 -1
View File
@@ -4,7 +4,7 @@ TOKEN_FILE="secrets/prod.token"
# Release versions
# Version
VERSION="2.1.10"
VERSION="2.1.11"
# Registry/S3 settings
REGISTRY_HOST="registry.kube5s.ru"
+1 -1
View File
@@ -3,7 +3,7 @@ NUBES_API_ENDPOINT="https://lk-api-gateway-test.ngcloud.ru/api/v1/svc"
TOKEN_FILE="secrets/test.token"
# Version
VERSION="5.1.13"
VERSION="5.1.14"
# Docs generation — ONLY from docs_gen/<stand>/ (never from docs/)
DOCS_GEN_DIR="provider/docs_gen/test"
@@ -548,7 +548,6 @@ func (r *{{ToCamel .Name}}Resource) Update(ctx context.Context, req resource.Upd
{{- if .HasRedeploy }}
// --- Redeploy support (ARCHITECTURE.md) ---
if redeployRequested {
{{- if .RedeployParams }}
redeployParams := map[int]string{}
{{- range .RedeployParams }}
{{- if (IsNested .) }}
@@ -559,10 +558,17 @@ func (r *{{ToCamel .Name}}Resource) Update(ctx context.Context, req resource.Upd
redeployParams[{{.ID}}] = {{ParamFormat . (printf "plan.%s" (ToCamel .Code))}}
{{- end }}
{{- end }}
if err := r.client.RunRedeployOperation(ctx, instanceID.ValueString(), operationTimeout, redeployParams); err != nil {
// Merge modify-params into redeploy to avoid state drift
{{- range .ModifyParams }}
{{- if (IsNested .) }}
if plan.{{ToCamel .Code}} != nil {
redeployParams[{{.ID}}] = {{NestedJSONExpr . "plan"}}
}
{{- else }}
if err := r.client.RunRedeployOperation(ctx, instanceID.ValueString(), operationTimeout, nil); err != nil {
redeployParams[{{.ID}}] = {{ParamFormat . (printf "plan.%s" (ToCamel .Code))}}
{{- end }}
{{- end }}
if err := r.client.RunRedeployOperation(ctx, instanceID.ValueString(), operationTimeout, redeployParams); err != nil {
resp.Diagnostics.AddError("Ошибка клиента", err.Error())
return
}