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

envoy: add support to bind to privileged ports #32158

Merged

Conversation

mhofstetter
Copy link
Member

@mhofstetter mhofstetter commented Apr 24, 2024

Currently, the Envoy process of the Cilium Proxy doesn't have the capabilities to bind to privileged ports. Even if the respective capabilities would be configured in the Pods SecurityContext, the cilium-envoy-starter drops all capabilities before starting the Envoy process.

This commit adds support for binding to privileged ports by introducing a new Helm value envoy.securityContext.capabilities.keepCapNetBindService (bool - defaults to false).

If set to true, the cilium-envoy-starter keeps the capability NET_BIND_SERVICE when starting the Envoy process. This way, it's possible to bind to privileged ports.

Note: It's still required to add the capability NET_BIND_SERVICE to the respective container via Helm values

  • daemonset mode: envoy.securityContext.capabilities.envoy
  • embedded mode: securityContext.capabilities.ciliumAgent

Related to: #30840

@mhofstetter mhofstetter added kind/feature This introduces new functionality. release-note/misc This PR makes changes that have no direct user impact. area/servicemesh GH issues or PRs regarding servicemesh labels Apr 24, 2024
@mhofstetter mhofstetter force-pushed the pr/mhofstetter/envoy-support-priv-ports branch 2 times, most recently from 5327e0e to 88de362 Compare April 25, 2024 07:52
This commit updates Envoy (Cilium Proxy) to the latest version from
(`ciilum/proxy` - `main`) that includes support to keep the capability
`NET_BIND_SERVICE`.

Relates to: cilium/proxy#650

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
Currently, the Envoy process of the Cilium Proxy doesn't have the
capabilities to bind to privileged ports. Even if the respective capabilities
would be configured in the Pods SecurityContext, the `cilium-envoy-starter` would
drop all capabilities before starting the Envoy process.

This commit adds support for binding to privileged ports by introducing a new Helm
value `envoy.securityContext.capabilities.keepCapNetBindService` (`bool` - defaults to `false`).

If set to `true`, the `cilium-envoy-starter` keeps the capability `NET_BIND_SERVICE` when starting
the Envoy process. This way, it's possible to bind to privileged ports.

Note: It's still required to add the capability `NET_BIND_SERVICE` to the respective container

* daemonset mode: `envoy.securityContext.capabilities.envoy`
* embedded mode: `securityContext.capabilities.ciliumAgent`

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter mhofstetter force-pushed the pr/mhofstetter/envoy-support-priv-ports branch from 88de362 to 1db5f40 Compare April 25, 2024 11:04
@mhofstetter
Copy link
Member Author

/test

@mhofstetter mhofstetter marked this pull request as ready for review April 25, 2024 15:55
@mhofstetter mhofstetter requested review from a team as code owners April 25, 2024 15:55
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 29, 2024
@jrajahalme jrajahalme added this pull request to the merge queue Apr 29, 2024
Merged via the queue into cilium:main with commit 8a2a958 Apr 29, 2024
64 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/envoy-support-priv-ports branch April 29, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/servicemesh GH issues or PRs regarding servicemesh kind/feature This introduces new functionality. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants