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

[target allocator] Not run the target allocator as root #1346

Closed
iblancasa opened this issue Jan 4, 2023 · 0 comments · Fixed by #1345
Closed

[target allocator] Not run the target allocator as root #1346

iblancasa opened this issue Jan 4, 2023 · 0 comments · Fixed by #1345

Comments

@iblancasa
Copy link
Contributor

Currently, the target allocator is run as root. This prevents the target allocator from being run in OpenShift without special capabilities.

When the target allocator pod is created, the following error can be seen in the kubectl describe <pod name> command output:

  Warning  Failed          12s (x2 over 12s)  kubelet            Error: container create failed: time="2023-01-03T15:56:58Z" level=error msg="runc create failed: unable to start container process: exec: \"./main\": stat ./main: permission denied"

How to reproduce

  1. Create an OCP cluster (version 4.11 in my case)
  2. Build and push to a registry the OTEL Collector Operator and Target Allocator container images
  3. $ kubectl create namespace oteltest
  4. $ kubectl -n oteltest create rolebinding default-view-oteltest --role=pod-view --serviceaccount=oteltest:ta
  5. $ kubectl create -f tests/e2e/targetallocator-features/00-install.yaml -n oteltest:ta
  6. Wait until the pod creation fails ($ kubectl get pods -n oteltest)

Note
The step 4 is executed manually because, when applying the manifest, it will fail because the TestStep kind is part of KUTTL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant