You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now there is a bit of code that figures out what the external addresses are and which are internal. This assumes rfc-1918 address space, which may be a stretch.
We probable need the make flags for this if the defaults don't suite you. A pod can then use these by inspecting the node object (I think that how you do it) and set some env vars which can then be used.
My use case: prom metrics should be exposed on the private port.
The text was updated successfully, but these errors were encountered:
So. In k8s land you can not get the IP address of the node - this makes sense because why would a pod care. But systemk just uses the host networking and there you may care. I have the following use-case: I want to start coredns listening on the public interface (and or address), but the metrics should only be exported on the internal (or the other interface).
From within a Pod there is now easy way to get that other interface, you need to connect to the API, get the node object and jsonpath the stuff you need from there.
Another option is an init-container that does some ip addr dance, writes a file, which is then read by the other container and sets some env vars.
The option I'm pondering here is to have default environment variables that just hold this information: SYSTEMK_INTERNAL_IPV4 and the like. These would be set on startup and thus be available to all pods. I like this a lot, the biggest downside is this is not done in k8s, so your podspec isn't universal anymore.
The latter begs a bigger question, how much of the spec can we possibly support and when (and why) do we need to deviate?
Right now there is a bit of code that figures out what the external addresses are and which are internal. This assumes rfc-1918 address space, which may be a stretch.
We probable need the make flags for this if the defaults don't suite you. A pod can then use these by inspecting the node object (I think that how you do it) and set some env vars which can then be used.
My use case: prom metrics should be exposed on the private port.
The text was updated successfully, but these errors were encountered: