diff --git a/pkg/action/render_template.go b/pkg/action/render_template.go index ed3deaa..2716a82 100644 --- a/pkg/action/render_template.go +++ b/pkg/action/render_template.go @@ -26,7 +26,7 @@ func RenderTemplate(path string, config *config.Config, runtime state.Runtime) ( result := new(bytes.Buffer) err = tpl.Execute(result, map[string]interface{}{ - "Config": config.Config, + "Config": config.Config.Values, "State": runtimeMap, }) if err != nil { diff --git a/pkg/action/render_template_test.go b/pkg/action/render_template_test.go index ce2bf01..37b9f4a 100644 --- a/pkg/action/render_template_test.go +++ b/pkg/action/render_template_test.go @@ -14,7 +14,9 @@ var _ = Describe("RenderTemplate action test", func() { It("renders the template with config and state", func() { config := agentConfig.NewConfig() config.Config = collector.Config{ - "testKey": "testValue", + Values: collector.ConfigValues{ + "testKey": "testValue", + }, } runtime, err := state.NewRuntime() Expect(err).ToNot(HaveOccurred())