File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
pkg/handlers/generic/mutation/controlplanevirtualip/providers Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -42,22 +42,14 @@ func templateValues(
4242
4343 // If specified, use the virtual IP address and/or port,
4444 // otherwise fall back to the control plane endpoint host and port.
45- address := controlPlaneEndpoint .Host
46- port := controlPlaneEndpoint .Port
45+ var virtualIPConfig v1alpha1.ControlPlaneVirtualIPConfiguration
4746 if controlPlaneEndpoint .VirtualIPSpec != nil &&
4847 controlPlaneEndpoint .VirtualIPSpec .Configuration != nil {
49- address = cmp .Or (
50- controlPlaneEndpoint .VirtualIPSpec .Configuration .Address ,
51- controlPlaneEndpoint .Host ,
52- )
53- port = cmp .Or (
54- controlPlaneEndpoint .VirtualIPSpec .Configuration .Port ,
55- controlPlaneEndpoint .Port ,
56- )
48+ virtualIPConfig = * controlPlaneEndpoint .VirtualIPSpec .Configuration
5749 }
5850 templateInput := input {
59- Address : address ,
60- Port : port ,
51+ Address : cmp . Or ( virtualIPConfig . Address , controlPlaneEndpoint . Host ) ,
52+ Port : cmp . Or ( virtualIPConfig . Port , controlPlaneEndpoint . Port ) ,
6153 }
6254
6355 var b bytes.Buffer
You can’t perform that action at this time.
0 commit comments