mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-28 05:47:08 +02:00
switch to debug logging for some vault log messages (#2299)
This commit is contained in:
parent
b070d2f4ed
commit
67727147f8
@ -40,7 +40,7 @@ func getVaultClientFromConfig(config StepConfig, creds VaultCredentials) (vaultC
|
||||
address, addressOk := config.Config["vaultServerUrl"].(string)
|
||||
// if vault isn't used it's not an error
|
||||
if !addressOk || creds.AppRoleID == "" || creds.AppRoleSecretID == "" {
|
||||
log.Entry().Info("Skipping fetching secrets from vault since it is not configured")
|
||||
log.Entry().Debug("Skipping fetching secrets from vault since it is not configured")
|
||||
return nil, nil
|
||||
}
|
||||
namespace := ""
|
||||
@ -85,7 +85,7 @@ func resolveVaultReference(ref *ResourceReference, config *StepConfig, client va
|
||||
|
||||
secretValue = lookupPath(client, vaultPath, ¶m)
|
||||
if secretValue != nil {
|
||||
log.Entry().Infof("Resolved param '%s' with vault path '%s'", param.Name, vaultPath)
|
||||
log.Entry().Debugf("Resolved param '%s' with vault path '%s'", param.Name, vaultPath)
|
||||
if ref.Type == "vaultSecret" {
|
||||
config.Config[param.Name] = *secretValue
|
||||
} else if ref.Type == "vaultSecretFile" {
|
||||
@ -133,7 +133,7 @@ func createTemporarySecretFile(namePattern string, content string) (string, erro
|
||||
}
|
||||
|
||||
func lookupPath(client vaultClient, path string, param *StepParameters) *string {
|
||||
log.Entry().Infof("Trying to resolve vault parameter '%s' at '%s'", param.Name, path)
|
||||
log.Entry().Debugf("Trying to resolve vault parameter '%s' at '%s'", param.Name, path)
|
||||
secret, err := client.GetKvSecret(path)
|
||||
if err != nil {
|
||||
log.Entry().WithError(err).Warnf("Couldn't fetch secret at '%s'", path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user