mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +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)
|
||||
}
|
||||
|
||||
// prevent the templates from being rendered to stdout in "dry" mode
|
||||
s.runner.SetOutStream(io.Discard)
|
||||
|
||||
s.numberOfTemplates = len(s.runner.TemplateConfigMapping())
|
||||
|
||||
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)
|
||||
continue
|
||||
}
|
||||
|
||||
// prevent the templates from being rendered to stdout in "dry" mode
|
||||
s.runner.SetOutStream(io.Discard)
|
||||
|
||||
go s.runner.Start()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user