-
Notifications
You must be signed in to change notification settings - Fork 151
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
Make SCC more restrictive #513
Conversation
The agent writes log checkpoints to @jvoravong, can you please validate this change from Splunk O11y side? We need to make sure that all host metrics are collected correctly with the dropped capabilities? Also we need to make sure that container and journald logs are collected using both log engines fluend/otel. |
I'll validate these changes early next week. |
Hi, I can see that you're dropping the default capabilities provided when CRI-O is the container engine (as per the "default_capabilities" section of https://github.com/cri-o/cri-o/blob/main/docs/crio.conf.5.md). Docker however, grants additional capabilities as default, see here: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities. Can you please assess these additional capabilities and look at dropping as many of these that aren't required? The additional ones granted by Docker are:
Alternatively, dropping "ALL" and then adding back in only the capabilities the otel-collector needs would be best practice. Thank you! |
I have executed functional tests manually with these changes on Red Hat OpenShift Local. All tests are passing except 3 These are expected failures since the hostname would be different and docker/containerd logs wouldn't be there. |
Finished up some testing:
Using Kuberenetes 1.24 and Openshift 4.11 (Rosa)
Warning log printed with a Helm Install
Fluentd containers entering a crashloop
@harshit-splunk please look into the Fluentd crashes. |
I believe this is caused by disabling |
I did specifically miss mentioning that. I observed the receiver offset files in /var/addon/splunk/otel_pos were successfully being written to. Which was surprising... |
Interesting, if this cannot be fixed for fluentd, we can just update the template and Anyway, first we need to know why fluentd is failing. |
Actually, the checkpoint directory is mounted as the volume when otel logs engine is used. So, it is able to write there. splunk-otel-collector-chart/helm-charts/splunk-otel-collector/templates/daemonset.yaml Lines 383 to 384 in 0f63517
It's missing in fluentd. I'll include that in this PR. |
@harshit-splunk fluentd configuration is a bit confusing but it's also mounted at /var/log splunk-otel-collector-chart/helm-charts/splunk-otel-collector/templates/daemonset.yaml Lines 200 to 201 in 0f63517
|
Co-authored-by: jvoravong <[email protected]>
@dmitryax @jvoravong Fluentd internally writes to |
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.
Fluentd works with these latest changes. Good work. Giving my approval, let's also give dmitryax a chance to respond.
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.
LGTM
#509
The agent doesn't write in the root directory. So it makes sense to enable
readOnlyRootFilesystem
.By default, CRI-O will add the following capabilities. That can be dropped as well.
You can checked current capabilities using: