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
Member

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.

@github-actions github-actions bot requested review from reasonerjt and ywk253100 June 27, 2024 04:35
@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 52.63158% with 9 lines in your changes missing coverage. Please review.

Project coverage is 59.17%. Comparing base (78c97d9) to head (f3b1d22).

Files with missing lines Patch % Lines
internal/credentials/file_store.go 52.63% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7943   +/-   ##
=======================================
  Coverage   59.17%   59.17%           
=======================================
  Files         370      370           
  Lines       39487    39491    +4     
=======================================
+ Hits        23366    23370    +4     
  Misses      14647    14647           
  Partials     1474     1474           

☔ 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
Member 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))

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
@kaovilai kaovilai force-pushed the addAdditionalFilesFromSecretsToVeleroPod branch from 8235f9b to f3b1d22 Compare December 25, 2024 07:20
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