restic optional env vars - only use if in secret#2033
Open
tesshuflower wants to merge 1 commit into
Open
Conversation
For optional env vars, rather than simply setting in the job/pod, with a mount that is optional, only set them if the var/key exists in the secret. We already have the secret loaded before reconciling the job. Fixes: backube#2032 Signed-off-by: Tesshu Flower <tflower@redhat.com>
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tesshuflower The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2033 +/- ##
=======================================
- Coverage 68.8% 68.7% -0.2%
=======================================
Files 58 58
Lines 6097 6056 -41
=======================================
- Hits 4199 4164 -35
+ Misses 1584 1581 -3
+ Partials 314 311 -3
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Describe what this PR does
Restic mover:
For optional env vars, rather than simply setting in the job/pod, with a mount that is optional, only set them if the var/key exists in the secret. We already have the secret loaded before reconciling the job.
Related issues:
Fixes: #2032
Prevents env vars such as
AZURE_TENANT_ID,AZURE_CLIENT_IDandAZURE_FEDERATED_TOKEN_FILEfrom overrwriting env vars that may already be present or injected into the pod when the user doesn't explicitly set them in the restic secret.