Skip to content

Commit

Permalink
Add temp debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Nikiforov committed Mar 4, 2025
1 parent 211f384 commit af93ec6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/vaultRotateSecretId.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ func runVaultRotateSecretID(utils vaultRotateSecretIDUtils) error {
log.Entry().Infof("Your secret ID is about to expire in %.0f days", ttl.Round(time.Hour*24).Hours()/24)
}

// TODO: remove after testing
log.Entry().Debugf("%T, %v", ttl, ttl)
log.Entry().Debugf("%T, %v", time.Duration(config.DaysBeforeExpiry)*24*time.Hour, time.Duration(config.DaysBeforeExpiry)*24*time.Hour)
log.Entry().Debugf("%v", ttl > time.Duration(config.DaysBeforeExpiry)*24*time.Hour)

if ttl > time.Duration(config.DaysBeforeExpiry)*24*time.Hour {
log.Entry().Info("Secret ID TTL valid.")
return nil
Expand All @@ -112,6 +117,10 @@ func runVaultRotateSecretID(utils vaultRotateSecretIDUtils) error {
}

func writeVaultSecretIDToStore(config *vaultRotateSecretIdOptions, secretID string) error {
// TODO: remove after testing
log.Entry().Debugf("Secret ID: %s", secretID)
log.Entry().Debugf("Secret Store: %s", config.SecretStore)

switch config.SecretStore {
case "jenkins":
ctx := context.Background()
Expand Down

0 comments on commit af93ec6

Please sign in to comment.