Retrieve actual pod network at startup
As per !63 (diffs)
Currently the pod network is hardcoded, but the webeos-config-operator should retrieve the list of pod networks at startup from clusternetworks.network.openshift.io/default
and put them in a variable. Then the vhost template can generate the proper list for RemoteIPInternalProxy
from that variable. There can be several networks, pass all of them to RemoteIPInternalProxy
.
We will need to grant the k8s serviceaccount running webeos pods the permission to get clusternetworks.network.openshift.io/default
Retrieve the clusternetworks
resource using a simple Get()
with go-client (need to import the relevant resource definition from https://github.com/openshift/api/blob/master/network/v1/types.go)