lsergio opened a new issue, #6797:
URL: https://github.com/apache/camel-k/issues/6797
### Requirement
### Requirement
Set `enableServiceLinks: false` on the camel-k-operator Deployment's pod
template and on the builder Pods created by the `pod` build strategy
(`pkg/controller/build/build_pod.go`).
### Background
Related to #6724, which added an opt-in `enableServiceLinks` field on the
*Integration's own* pod template. The root cause there was Kubernetes'
service-link env var injection: for every Service in a namespace, Kubernetes
injects a `{SVC}_SERVICE_HOST` / `{SVC}_SERVICE_PORT` pair into every new pod
in that namespace. With a high enough Service count, the combined
args+env size passed to the container entrypoint exceeds the kernel's
`ARG_MAX` / `MAX_ARG_STRLEN`, and the container fails to even start:
exec /opt/java/openjdk/bin/java: argument list too long
This is a kernel E2BIG error from execve(), not an application fault.
#6724 fixed this for user Integrations by making it opt-in/configurable
via the (deprecated) pod template, since Integration pods are user-facing
and enableServiceLinks may be relied upon by some workloads.
The **camel-k-operator pod** and the **builder pods** are purely
internal to camel-k, are never a place where Docker-links-style service
discovery is used, and are just as exposed to this failure mode in a
namespace with many Services (the operator's own install namespace, or
whichever namespace builder pods run in). There's no legitimate use case
for service-link env injection on either, so these should default to
`enableServiceLinks: false` unconditionally, rather than requiring an
operator-deployer to configure it.
### What this does
- Sets `enableServiceLinks: false` on the operator Deployment's pod spec
(`pkg/resources/config/manager/operator-deployment.yaml`, consumed by
the Kustomize install via the `install/base/config` symlink) and on the
Helm chart's copy (`helm/camel-k/templates/operator-deployment.yaml`).
- Sets `EnableServiceLinks: ptr.To(false)` on the builder Pod's
`corev1.PodSpec` in `newBuildPod` (`pkg/controller/build/build_pod.go`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]