cloud-on-k8s
cloud-on-k8s copied to clipboard
Set enableServiceLinks to false by default in pod specs
From Kubernetes 1.13 onwards, setting enableServiceLinks to false in the pod spec will prevent the injection of environment variables with service information into the pod. Since Elasticsearch, Kibana nor APM server depend on these injected variables, defaulting enableServiceLinks to false in all pod specs will help avoid issues with name clashes such as the one reported in #1987
@charith-elastic can I take this one? Seems pretty straightforward
Probably not wise to take it on just yet because the team hasn't had a chance to triage it. It's a bit tricky because we still support Kubernetes 1.11 and this setting is only available from 1.13 onwards.
This makes sense to me. It looks like a pod spec with that field will fail admission validation pre-1.13, so I think we'd have to do one of
- detect what version of k8s we're talking to before applying it
- control it via a feature flag. We already have separate yamls for 1.13+, so we could set it via an env var in that yaml
- wait until we don't support pre-1.13 any longer