fiaas-deploy-daemon icon indicating copy to clipboard operation
fiaas-deploy-daemon copied to clipboard

Option to disable service links environment variables

Open xavileon opened this issue 4 years ago • 4 comments

k8s injects a bunch of service links variables to be able to reach other services within a namespace via env vars. This feature is deprecated since a lot time ago. However, those environment variables are being injected anyway which makes some services to fail (e.g specific example being nodejs apps).

Disabling this environment variables injection is already possible in k8s 1.13 via the enableServiceLinks flag in the PodSpec.

It would be helpful to get this flag configurable (possibly default to false? given it shouldn't be used as it's a deprecated feature).

xavileon avatar Jul 03 '20 09:07 xavileon

I'm ok with implementing this as a configurable flag. Just keep in mind fiaas-deploy-daemon is in use in clusters with kubernetes 1.12, so it needs to work for those. I also thing it should default to true, since that is what kubernetes is doing.

tg90nor avatar Jul 03 '20 13:07 tg90nor

great! yeah, I think FIAAS is currently supporting k8s versions starting from 1.9 according to tests, so the implementation should handle different k8s versions indeed.

xavileon avatar Jul 03 '20 15:07 xavileon

There is probably some value in checking if we still need to support the oldest versions.

mortenlj avatar Jul 03 '20 21:07 mortenlj

It is generally not a good idea to use the service host/port environment variables, so I think it makes a lot of sense to make it possible to configure enableServiceLinks at the fiaas-deploy-daemon instance level.

oyvindio avatar Jul 06 '20 13:07 oyvindio

Done.

blockjesper avatar Apr 18 '24 08:04 blockjesper