-
Notifications
You must be signed in to change notification settings - Fork 200
Fix filesource provider with kubernetes symlink #11050
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
base: main
Are you sure you want to change the base?
Conversation
…he filesource provider.
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
This pull request does not have a backport label. Could you fix it @blakerouse? 🙏
|
💚 Build Succeeded
History
cc @blakerouse |
| finalTarget := filepath.Join(targetDir, targetBase) | ||
| _, err = os.Readlink(finalTarget) |
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.
Isn't this just target?
| finalTarget := filepath.Join(targetDir, targetBase) | |
| _, err = os.Readlink(finalTarget) | |
| _, err = os.Readlink(target) |
ycombinator
left a comment
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.
Just a nitpick. Code LGTM — thanks for all the comments and the unit test.
What does this PR do?
Currently the
filesourceprovider does not handle watching the correct paths because of how Kubernetes handles mounting sercrets into a container.Adds a unit test to validate the filesource provider works with secret replacement from Kubernetes.
Why is it important?
Ensures that secret replacement changes are noticed by the filesource provider.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added an entry in./changelog/fragmentsusing the changelog toolDisruptive User Impact
None
How to test this PR locally
mage unitTestRelated issues