From 3f6b1cba578d4d009678d79ead740387f4769738 Mon Sep 17 00:00:00 2001 From: Zhan Ziyang Date: Sat, 22 Aug 2026 15:43:44 +0800 Subject: [PATCH] fix: keep Node SSR config optional during rollout --- internal/deploymentconfig/config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/deploymentconfig/config.go b/internal/deploymentconfig/config.go index 6cf4884..0569f6f 100644 --- a/internal/deploymentconfig/config.go +++ b/internal/deploymentconfig/config.go @@ -245,6 +245,13 @@ func validateExactDocumentKeys(document []byte) error { return err } } + nodeSsrValue, found := root["nodeSsr"] + if !found { + return nil + } + if _, ok := nodeSsrValue.(map[string]any); !ok { + return errors.New("nodeSsr must be a table") + } nodeSsr, err := exactTable(root, "", "nodeSsr") if err != nil { return err @@ -362,6 +369,9 @@ func (c Config) Validate() error { default: return fmt.Errorf("backend.type must be %q or %q", BackendTypeNative, BackendTypeContainer) } + if c.NodeSsr.Type == "" { + return nil + } if c.NodeSsr.Type != BackendTypeContainer { return fmt.Errorf("nodeSsr.type must be %q", BackendTypeContainer) }