IP won't get leased if it has the same endpoint name across the deployments.
provider-services 0.2.1
akash 0.22 (mainnet)
Reproducer
Deploy more than one SDL with the same endpoint name (e.g. I used web name) of the ip kind:
endpoints:
web:
kind: ip
services:
app:
...
expose:
- port: 8080
as: 8080
to:
- global: true
ip: web
...
The very next deployment with the same endpoint name (e.g. web) of the ip kind won't get the IP allocated ("ips": {}).
IP Operator logs
# kubectl -n akash-services logs akash-ip-operator-6f6ddc47f8-28jh9 |grep -C3 'creating metal-lb service'
D[2023-07-19|11:24:48.407] ip passthrough has changed, applying operator=ip lease=akash1z6ql9vzhsumpvumj4zs8juv7l5u2zyr5yax2ys/11988097/1/1/akash15tl6v6gd0nte0syyxnv57zmmspgju4c3xfmdhk
D[2023-07-19|11:24:48.407] Updating ip passthrough operator=ip lease=akash1z6ql9vzhsumpvumj4zs8juv7l5u2zyr5yax2ys/11988097/1/1/akash15tl6v6gd0nte0syyxnv57zmmspgju4c3xfmdhk
D[2023-07-19|11:24:48.408] metal LB config change event operator=ip client=metallb event-type=ADDED
D[2023-07-19|11:24:48.410] creating metal-lb service operator=ip client=metallb service=app port=8080 external-port=8080 sharing-key=akash1z6ql9vzhsumpvumj4zs8juv7l5u2zyr5yax2ys-ip-web exists=true
I[2023-07-19|11:24:48.418] update complete operator=ip lease=akash1z6ql9vzhsumpvumj4zs8juv7l5u2zyr5yax2ys/11988097/1/1/akash15tl6v6gd0nte0syyxnv57zmmspgju4c3xfmdhk
I[2023-07-19|11:24:48.423] ip address inventory operator=ip in-use=2 available=11
Notice exists=true (because some other deployment is using the same endpoint name [web] of the ip kind) , hence it isn't adding a new IP to the deployment.
To circumvent this one would simply need to rename the endpoint name (e.g. web => web1).
How to fix it?
I think the sharing-key should be unique.
Currently it includes only the <owner>-ip-<ip-endpoint-name> but it should probably include the <dseq>-<gseq>-<oseq> too, to be unique.
IP won't get leased if it has the same endpoint name across the deployments.
Reproducer
web
name) of theip
kind:The very next deployment with the same endpoint name (e.g.
web
) of theip
kind won't get the IP allocated ("ips": {}
).IP Operator logs
Notice
exists=true
(because some other deployment is using the same endpoint name [web
] of theip
kind) , hence it isn't adding a new IP to the deployment.To circumvent this one would simply need to rename the endpoint name (e.g.
web
=>web1
).How to fix it?
I think the
sharing-key
should be unique. Currently it includes only the<owner>-ip-<ip-endpoint-name>
but it should probably include the<dseq>-<gseq>-<oseq>
too, to be unique.