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

fix(setup): runAs root to install tooling #388

Merged
merged 2 commits into from
Aug 1, 2023
Merged

Conversation

megglos
Copy link
Contributor

@megglos megglos commented Aug 1, 2023

Since camunda/camunda#13418 got merged the zeebe container runs with an unprivileged zeebe user.

As the chaos tooling makes use of apt to install some tools needed to e.g. stress the cpu or modify ip routes we need to also overwrite the runAsUser to root to make that possible still.

Unfortnately the k8s exec API is not offering a way to override the user see https://github.com/kubernetes/kubectl/blob/master/pkg/cmd/exec/exec.go#L104

The first commit resolves an issue that lead to test failure, see testcontainers/testcontainers-go#1359 (comment)

@megglos megglos force-pushed the meg-386-root-for-apt branch from a7e2bc8 to 39ac313 Compare August 1, 2023 12:23
@megglos megglos force-pushed the meg-386-root-for-apt branch from 39ac313 to 4d121aa Compare August 1, 2023 13:02
@megglos megglos marked this pull request as ready for review August 1, 2023 13:06
@megglos megglos requested a review from ChrisKujawa as a code owner August 1, 2023 13:06
@megglos
Copy link
Contributor Author

megglos commented Aug 1, 2023

tested manually via chaos-cli

(chaostk) ➜  ./zbchaos disconnect gateway
...
(chaostk) ➜  go-chaos git:(meg-386-root-for-apt) k get deployment zeebe-gateway -o yaml | grep runAs
          runAsUser: 0
          
(chaostk) ➜  ./zbchaos stress broker   
...       
(chaostk) ➜  go-chaos git:(meg-386-root-for-apt) k get statefulset zeebe -o yaml | grep runAs
          runAsUser: 0

@megglos megglos requested a review from lenaschoenburg August 1, 2023 13:09
Copy link
Member

@lenaschoenburg lenaschoenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding a fix 👍

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 this pull request may close these issues.

2 participants