-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
secrets: Fix bug about not wait for secrets.json to become available
When we added support for CSI directories, we introduced a bug that we no longer wait for secrets.json to become available, because os.Stat call would fail with file not exist error immediately. Since in CSI directories case the directory would be guaranteed to be available immediately (unlike the vault case), assume file not exist errors from os.Stat as using file instead of directory, and let filewatcher.New to handle the waiting as before. Also add a test for it. While I'm here, also remove the usages of os.IsNotExist and os.IsExist follow the docs.
- Loading branch information
Showing
4 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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 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 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 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