srl-labs / clabernetes

containerlab, but in kubernetes!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExternalName services are named without the lab prefix

hellt opened this issue · comments

We fought recently about the service names and how the topology name might be omitted for cases where a user controls the namespaces and creates a namespace-per-lab.

I haven't gotten to this PR just yet, but for the consistency's sake it seems that ExternalName services should also have a topology prefix added:

kubectl get -n c9s-vlan svc | grep -iv vx
NAME              TYPE           CLUSTER-IP      EXTERNAL-IP                               PORT(S)                                                                                                                                                                                                   AGE
client1           ExternalName   <none>          vlan-client1.c9s-vlan.svc.cluster.local   <none>                                                                                                                                                                                                    15h
client2           ExternalName   <none>          vlan-client2.c9s-vlan.svc.cluster.local   <none>                                                                                                                                                                                                    15h
srl1              ExternalName   <none>          vlan-srl1.c9s-vlan.svc.cluster.local      <none>                                                                                                                                                                                                    15h
srl2              ExternalName   <none>          vlan-srl2.c9s-vlan.svc.cluster.local      <none>                                                                                                                                                                                                    15h
vlan-client1      LoadBalancer   10.96.232.165   172.18.1.10                               161:32442/UDP,21:32059/TCP,22:32030/TCP,23:30920/TCP,80:31205/TCP,443:32489/TCP,830:31231/TCP,5000:31769/TCP,5900:30902/TCP,6030:31583/TCP,9339:32089/TCP,9340:30311/TCP,9559:30974/TCP,57400:31386/TCP   15h
vlan-client2      LoadBalancer   10.96.164.37    172.18.1.11                               161:30025/UDP,21:31127/TCP,22:30779/TCP,23:30542/TCP,80:31104/TCP,443:32142/TCP,830:30102/TCP,5000:31116/TCP,5900:31559/TCP,6030:30734/TCP,9339:32250/TCP,9340:31922/TCP,9559:30745/TCP,57400:30817/TCP   15h
vlan-srl1         LoadBalancer   10.96.221.110   172.18.1.12                               161:30581/UDP,21:32591/TCP,22:31752/TCP,23:30164/TCP,80:32272/TCP,443:32365/TCP,830:30360/TCP,5000:30618/TCP,5900:30454/TCP,6030:32155/TCP,9339:32736/TCP,9340:32268/TCP,9559:31412/TCP,57400:30100/TCP   15h
vlan-srl2         LoadBalancer   10.96.64.176    172.18.1.13                               161:32109/UDP,21:30903/TCP,22:31495/TCP,23:32174/TCP,80:31128/TCP,443:30720/TCP,830:32017/TCP,5000:30708/TCP,5900:32520/TCP,6030:31586/TCP,9339:31917/TCP,9340:31631/TCP,9559:32731/TCP,57400:32076/TCP   15h

ExternalName services are so called "node aliases" to enable nodes of the same lab to reach each other using the "node names", hence they are prefix agnostic.

This enables the "clab experience", where nodes are in the same namespace by default.

To keep c9s single-namespace friendly the node alias feature will be toggle-able, and disabled by default.
Clabverter should have a flag to enable this service.