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 setting capabilities on the app binary #1246

Closed
mejedi opened this issue Feb 27, 2024 · 2 comments · Fixed by #1271
Closed

Support setting capabilities on the app binary #1246

mejedi opened this issue Feb 27, 2024 · 2 comments · Fixed by #1271

Comments

@mejedi
Copy link
Contributor

mejedi commented Feb 27, 2024

Linux has a notion of capabilities, which is essentially a token allowing a certain privileged operation.

E.g. CAP_BPF allows loading ebpf programs for an otherwise unprivileged user.

The way to leverage capabilities with Docker is two fold:

  • at build time, use setcap tool to set file capabilities on a binary;
  • at run time, request matching capabilities via --cap-add option.

We are doing ebpf in go and we'd like to take advantage of ko's fast build times and convenience. We need a way to set custom capabilities on the app binary.

It looks like currently it is not supported, as far as I can tell from docs and implementation.

Would you be open for such contribution?

@mejedi
Copy link
Contributor Author

mejedi commented Feb 29, 2024

cc @imjasonh

@mejedi
Copy link
Contributor Author

mejedi commented Mar 12, 2024

cc @mattmoor @jonjohnsonjr

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