File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -88,10 +88,11 @@ func (s *Spec) clusterExternalAddress() string {
8888 }
8989
9090 if cplb , ok := s .K0s .Config .Dig ("spec" , "network" , "controlPlaneLoadBalancing" ).(dig.Mapping ); ok {
91- if enabled , ok := cplb .Dig ("enabled" ).(bool ); ok && enabled {
92- vrrpAddresses := cplb .Dig ("virtualServers" ).([]string )
93- if len (vrrpAddresses ) > 0 {
94- return vrrpAddresses [0 ]
91+ if enabled , ok := cplb .Dig ("enabled" ).(bool ); ok && enabled && cplb .DigString ("type" ) == "Keepalived" {
92+ if vrrpAddresses , ok := cplb .Dig ("keepalived" , "virtualServers" ).([]dig.Mapping ); ok && len (vrrpAddresses ) > 0 {
93+ if addr , ok := vrrpAddresses [0 ]["ipAddress" ].(string ); ok && addr != "" {
94+ return addr
95+ }
9596 }
9697 }
9798 }
You can’t perform that action at this time.
0 commit comments