mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
agent: Don't render templates to stdout in supervisor mode (#20884)
This commit is contained in:
committed by
GitHub
parent
657ee3107a
commit
fe53c4684c
@@ -122,6 +122,9 @@ func (s *Server) Run(ctx context.Context, incomingVaultToken chan string) error
|
|||||||
return fmt.Errorf("template server failed to create: %w", err)
|
return fmt.Errorf("template server failed to create: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prevent the templates from being rendered to stdout in "dry" mode
|
||||||
|
s.runner.SetOutStream(io.Discard)
|
||||||
|
|
||||||
s.numberOfTemplates = len(s.runner.TemplateConfigMapping())
|
s.numberOfTemplates = len(s.runner.TemplateConfigMapping())
|
||||||
|
|
||||||
for {
|
for {
|
||||||
@@ -153,6 +156,10 @@ func (s *Server) Run(ctx context.Context, incomingVaultToken chan string) error
|
|||||||
s.logger.Error("template server failed with new Vault token", "error", err)
|
s.logger.Error("template server failed with new Vault token", "error", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prevent the templates from being rendered to stdout in "dry" mode
|
||||||
|
s.runner.SetOutStream(io.Discard)
|
||||||
|
|
||||||
go s.runner.Start()
|
go s.runner.Start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user