Skip to content

Commit 8db1f53

Browse files
committed
Always evaluate templates
- This is required because certain agents might start before their labels are synced. If some of the snippets assigned to them contain template variables, loading the config will fail.
1 parent c5a1918 commit 8db1f53

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

pkg/config/agentmanagement_remote_config.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,6 @@ func appendExternalLabels(c *Config, externalLabels map[string]string) {
164164
}
165165

166166
func evaluateTemplate(config string, templateVariables map[string]any) (string, error) {
167-
// Avoid doing anything if there are no template variables
168-
if len(templateVariables) == 0 {
169-
return config, nil
170-
}
171-
172167
tpl, err := template.New("config").Parse(config)
173168
if err != nil {
174169
return "", err

0 commit comments

Comments
 (0)