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) }