New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate database encryption keys in bootstrap tooling #1340
Conversation
log.Fatal().Err(err).Msg("could not check if db encryption key already exists") | ||
} | ||
if exists { | ||
log.Warn().Msg("DB encryption key already exists, exiting...") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to print the path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it to the logger f958aea
if err != nil { | ||
log.Fatal().Err(err).Msg("could not generate db encryption key") | ||
} | ||
log.Info().Msg("generated db encryption key") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to print path
if err != nil { | ||
return nil, nil, nil, fmt.Errorf("could not generate secrets db encryption key: %w", err) | ||
} | ||
log.Info().Msg("generated db encryption key") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.Info().Msg("generated db encryption key") | |
log.Info().Msg("saved db encryption key") |
otherwise, we are printing the same log twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two logs are for two separate commands. One is for setting up all of your keys at once (key.go
) the other is only for creating the encryption key (db_encryption_key.go
), so we wouldn't see these logs twice running either command.
bors merge |
Codecov Report
@@ Coverage Diff @@
## master #1340 +/- ##
==========================================
- Coverage 55.39% 55.39% -0.01%
==========================================
Files 510 511 +1
Lines 31892 31923 +31
==========================================
+ Hits 17667 17684 +17
- Misses 11851 11862 +11
- Partials 2374 2377 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Updates bootstrap tooling to generate database encryption keys and adds a tool for existing operators to generate an encryption key file.