-
Notifications
You must be signed in to change notification settings - Fork 452
Add "--password-file-reload" flag to refresh password during each sync cycle #976
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
Open
vaibhavdesai137
wants to merge
9
commits into
kubernetes:master
Choose a base branch
from
vaibhavdesai137:add-password-file-reload-flag
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+76
−15
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5e22c34
add-password-file-reload-flag
vaibhavdesai137 7ef87f1
Update main.go
vaibhavdesai137 a50b04e
Remove password file reload functionality
vaibhavdesai137 11eb021
Simplify comment about token rotation
vaibhavdesai137 c6bd2d3
Implement password-file reload test in e2e script
vaibhavdesai137 0781d2f
Fix indentation in comments for clarity
vaibhavdesai137 18a1a0f
Format
vaibhavdesai137 4e6f9d2
Update main.go
vaibhavdesai137 73fd4a5
rename e2e test function & add max-attempts flag
vaibhavdesai137 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
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.
Is there a reason NOT to just re-read the file on every loop?
IOW, why not get rid of the "Finish populating credentials" block above (L752) and reload it here, if cred.PasswordFile is set?
If you set the period to milliseconds it might hurt (but this is the wrong tool for that anyway). On the order of seconds or longer it seems irrelevant and net simpler.
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.
Funny you mention this. In my local fork, I ended up re-reading from file everytime. Then I thought maybe others would find the feature helpful too so I decide to contribute back. Then I thought I don't want to upset idealists by forcing a disk read on every sync. And to keep changes backward compatible, I introduced a new flag.
If this were my repo, I certainly would have changed the default behavior :)
Let me update the PR. Will add tests too.
Thanks for the quick review
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.
Updated the PR to reload on each sync. Added e2e test as well.