Skip to content
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

Support running as non-root on OpenShift/CRI-O and log collection #891

Closed
jvoravong opened this issue Aug 17, 2023 · 2 comments
Closed

Support running as non-root on OpenShift/CRI-O and log collection #891

jvoravong opened this issue Aug 17, 2023 · 2 comments
Labels
enhancement New feature or request Stale

Comments

@jvoravong
Copy link
Contributor

jvoravong commented Aug 17, 2023

Is your feature request related to a problem? Please describe.

Description:

There is a log collection permissions issue when deploying on OpenShift/CRI-O and trying to run the agent as a non-root user. Last tested on OpnShift version v4.13 with both otel or fluentd as the logging engine. This problem is not present when Docker and containerd are the runtime.

  • We use a custom security context constraint on OpenShift with RunAsUser set to RunAsAny. Documentation on SCC indicates that this configuration should be feasible.
  • The root issue arises from the chart’s inability to consistently set the log data file permissions so the agent container can read the log data.
  • The security context constraint used likely has to be updated. The daemonset for the agent may also need to be updated.

Error:

Error: cannot start pipelines: storage client: open /var/addon/splunk/otel_pos/receiver_filelog_: permission denied
2023/08/15 15:31:28 main.go:94: application run finished with error: cannot start pipelines: storage client: open /var/addon/splunk/otel_pos/receiver_filelog_: permission denied

Describe the solution you'd like

Make the necessary updates to the involved security context constraints or agent daemonset so that OpenShift/CRI-O users can collect logs while also running the agent in non-root user mode.

Describe alternatives you've considered

No response

Additional context

How To Reproduce:

  distribution: openshift
  logsEngine: otel
  agent:
    securityContext:
      runAsUser: 20000
      runAsGroup: 20000
  distribution: openshift
  logsEngine: fluentd
  fluentd:
    securityContext:
      runAsUser: 20000
      runAsGroup: 20000

Links:

@jvoravong jvoravong added the enhancement New feature or request label Aug 17, 2023
@github-actions
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. If this issue is still relevant, please leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label Oct 17, 2023
@atoulme
Copy link
Contributor

atoulme commented Dec 5, 2023

Moving to Splunk ideas. Use https://ideas.splunk.com/ideas/SFXIMMID-I-470 to follow this development moving forward.

@atoulme atoulme closed this as completed Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

2 participants