Discuss/Draft: Automatically adjust Elastic Beat hostPath permissions #6612
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.
relates #6599, #6600, #6280
I would like to handle Beat
hostpath
permissions similar to Agent being done in #6599. Unfortunately Beats seems to be a bit more complicated and strict when it comes to permissions.Issues
data
directory, not just the root so recursive operations are needed when adjusting permissions.chmod
files that it doesn't like the ownership/permissions of (see details inhostPathVolumeInitContainerCommand
func)What this means is we need to know the UID that beat is running as, which isn't especially difficult in a standard Kubernetes environment, but when Openshift is involved, this is not predictable.
Does anyone see a path forward for handling
hostPaths
automatically for Beat in Openshift outside of detecting it, and doing nothing (as we do now). The current solution in this PR works (in limited testing) outside of Openshift.