-
Notifications
You must be signed in to change notification settings - Fork 544
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
Update docker image to run as non-root #2265
Conversation
5203ae7
to
f6547f1
Compare
fe17af1
to
22a27e7
Compare
Needs a mention of the breaking change and an entry in the changelog. |
26ef6d8
to
c8f7675
Compare
Signed-off-by: Zach Leslie <[email protected]>
Signed-off-by: Zach Leslie <[email protected]>
Signed-off-by: Zach Leslie <[email protected]>
Signed-off-by: Zach Leslie <[email protected]>
c8f7675
to
d102622
Compare
Thanks for the review folks. @mdisibio I pushed a commit for your feedback on the jsonnet. Feel free to call out anything else you'd like to see addressed here. |
I caught up with mdisibio earlier and we're good on the changes here. |
For anyone else whose helm release broke when this was released (chart version 1.9.0). The correct place to add the securityContext at the container level in the chart is here: https://github.com/grafana/helm-charts/blob/main/charts/tempo/values.yaml#L234 securityContext:
fsGroup: 10001 |
Signed-off-by: Jennie Pham <[email protected]>
Thanks for the note @gangstead. I checked the |
In understood this as add this to the tempo values: securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000 but actually I have to make sure to use the UID/GID from a previous release? Or use 10001? level=error ts=2024-06-04T12:02:37.078578894Z caller=poller.go:245 msg="failed to write tenant index" tenant=single-tenant err="open /var/tempo/traces/single-tenant/index.json.gz: permission denied" |
Combining both and using 10001 seems to work: securityContext:
fsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001 |
It worked for me with just I'm not really sure on the interaction between the |
If only Is the ingester writing data locally successfully after using your |
Yes. Looking in Grafana there are new traces being saved. Maybe I had some data loss and just didn't realize it? We only store traces for 36 hours due to the huge volume of storage it takes. It's too late for me to go back and verify. Losing some traces is fine in our case. |
yeah I also had to issues with my tempo configuration |
Actually, no, something is off. I can see the traces from today without issues, but no traces from past days. I am assuming the writing to the disk fails but it still shows some cached in memory? |
Nevermind, is seems that was just a hickup. I tried again now and I can see traces from today and traces from up to 14 days ago (which is the limit we configured). So everything is working, sorry for the confusion |
While testing Tempo v2.5.0 with |
Thanks @pharaujo, would you like to PR a change? |
@StefanLobbenmeierObjego Would you like to PR the |
Follow-up to grafana#2265 which missed tempo-vulture Signed-off-by: Pedro Araujo <[email protected]>
Follow-up to grafana#2265 which missed tempo-vulture Signed-off-by: Pedro Araujo <[email protected]>
Follow-up to grafana#2265 which missed tempo-vulture Signed-off-by: Pedro Araujo <[email protected]>
Follow-up to #2265 which missed tempo-vulture Signed-off-by: Pedro Araujo <[email protected]>
What this PR does:
BREAKING CHANGE
Here we make the image adjustment necessary to run Tempo as non-root in the
Docker container, as well as include some util jsonnet to allow statefulsets to
chown their data directories to match the new permissions.
With this new chown init contianer, both the ingester and metrics-generator
statefulsets start and function.
Note that the
securityContext.fsGroup(10001)
may be required for environmentsthat mount additional volumes which do not have read/write permissions for the
tempo
user. Users may also wish to recursivelychown
the/var/tempo
directory for the new ownership. This will need to be done only once.
Which issue(s) this PR fixes:
Fixes #334
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]