mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Handle empty clusterID in loadbalancer naming
This commit is contained in:
parent
c2848da107
commit
2d10c8a066
@ -31,7 +31,12 @@ import (
|
||||
|
||||
// Instance groups remain legacy named to stay consistent with ingress
|
||||
func makeInstanceGroupName(clusterID string) string {
|
||||
return fmt.Sprintf("k8s-ig--%s", clusterID)
|
||||
prefix := "k8s-ig"
|
||||
// clusterID might be empty for legacy clusters
|
||||
if clusterID == "" {
|
||||
return prefix
|
||||
}
|
||||
return fmt.Sprintf("%s--%s", prefix, clusterID)
|
||||
}
|
||||
|
||||
func makeBackendServiceName(loadBalancerName, clusterID string, shared bool, scheme cloud.LbScheme, protocol v1.Protocol, svcAffinity v1.ServiceAffinity) string {
|
||||
|
Loading…
Reference in New Issue
Block a user