Skip to content
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

Add additional keys from BSL secret to credentials file store #7943

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kaovilai
Copy link
Contributor

Signed-off-by: Tiger Kaovilai tkaovila@redhat.com

Thank you for contributing to Velero!

Please add a summary of your change

Add additional files from secret to velero pod without restart to assists with some BSL encryption file requirements without restarting pod. It may require readding BSL to trigger write.

Does your change fix a particular issue?

Fixes #7767

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
@kaovilai kaovilai force-pushed the addAdditionalFilesFromSecretsToVeleroPod branch from fc2b87d to 8235f9b Compare June 27, 2024 04:37
@kaovilai kaovilai changed the title Add additional files from secret to velero pod without restart Add additional keys from BSL secret to credentials file store Jun 27, 2024
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 58.80%. Comparing base (c827fd0) to head (8235f9b).

Files Patch % Lines
internal/credentials/file_store.go 60.00% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7943   +/-   ##
=======================================
  Coverage   58.79%   58.80%           
=======================================
  Files         345      345           
  Lines       28766    28770    +4     
=======================================
+ Hits        16914    16918    +4     
  Misses      10423    10423           
  Partials     1429     1429           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

return "", errors.Wrap(err, "unable to close credentials file")
var credFilePath string
for key, data := range s.Data {
keyFilePath := filepath.Join(n.fsRoot, selector.Name, key)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new key file path follows pattern suggested in #7767 comments.

Below was the original path pattern. Can use prior pattern for just the credentials secret key, or for all keys.
keyFilePath := filepath.Join(n.fsRoot, fmt.Sprintf("%s-%s", selector.Name, selector.Key))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to add additional files from secret(s) to Velero pod without restart
1 participant