Closed GrahamDumpleton closed 4 months ago
Perhaps should use:
>>> socket.gethostbyaddr(os.environ["KUBERNETES_SERVICE_HOST"])
('kubernetes.default.svc.cluster.local', [], ['10.96.0.1'])
instead.
For now keep looking up kubernetes.default.svc
but possible change later if need be.
In future should perhaps add clusterDomain variable to Educates configuration so this can be overridden.
Describe the bug
In session manager config startup it uses:
to work out the internal cluster domain, eg.,
cluster.local
.In more recent versions of Loft virtual clusters, this is returning
kubernetes
alone, rather thankubernetes.svc.cluster.local
. Thus is not possible to calculate correct cluster domain andCLUSTER_DOMAIN
is being set tokubernetes
.The calculation should check if returned name actually starts with
kubernetes.default.svc
and if it doesn't then override it tocluster.local
.To cope with any other strange unexpected values, it should also be possible to manually override
clusterDomain
via the Educates data values when deploying it.Additional information
No response