I would like to propose a feature request here, and I would like to hear what you guys think about it.
I would like to have another flag in the Podspec than
hostNetwork. Which will allow me to get the node’s name without saving a hostPort for the container, and to not expose the container to the node’s namespace.
My request is to have a different flag than
hostNetwork: true that will allow a pod that is running on a node to know the node’s name (/etc/hostname). The reason that I would like my pod to know the hostname is to allow a Daemonset that I deploy to give me when using my app the data that I want to collect from the nodes and in addition the hostname.
Because I do not want to be too intrusive by saving a hostPort for each of the pods of my daemonset.
When we are using this flag we are blocking the hostPort with the containerPort of the container which is blocking other deployments of the same daemonset that collect data from the nodes from other namespaces and use the same port (containerPort).
Kubernetes version: 1.20
Installation method: kubeadm
Host OS: centos8
CNI and version: calico
CRI and version: docker