mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 19:28:16 +00:00
pkg/proxy: Replace deprecated func usage from the k8s.io/utils/pointer pkg
This commit is contained in:
@@ -34,7 +34,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/proxy"
|
||||
"k8s.io/kubernetes/pkg/proxy/healthcheck"
|
||||
netutils "k8s.io/utils/net"
|
||||
utilpointer "k8s.io/utils/pointer"
|
||||
"k8s.io/utils/pointer"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -251,8 +251,8 @@ func TestCreateRemoteEndpointOverlay(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.StringPtr(svcPortName.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort)),
|
||||
Name: pointer.String(svcPortName.Port),
|
||||
Port: pointer.Int32(int32(svcPort)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}),
|
||||
@@ -316,8 +316,8 @@ func TestCreateRemoteEndpointL2Bridge(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.String(svcPortName.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort)),
|
||||
Name: pointer.String(svcPortName.Port),
|
||||
Port: pointer.Int32(int32(svcPort)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}),
|
||||
@@ -398,8 +398,8 @@ func TestSharedRemoteEndpointDelete(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.StringPtr(svcPortName1.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort1)),
|
||||
Name: pointer.String(svcPortName1.Port),
|
||||
Port: pointer.Int32(int32(svcPort1)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}),
|
||||
@@ -409,8 +409,8 @@ func TestSharedRemoteEndpointDelete(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.StringPtr(svcPortName2.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort2)),
|
||||
Name: pointer.String(svcPortName2.Port),
|
||||
Port: pointer.Int32(int32(svcPort2)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}),
|
||||
@@ -457,8 +457,8 @@ func TestSharedRemoteEndpointDelete(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.StringPtr(svcPortName2.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort2)),
|
||||
Name: pointer.String(svcPortName2.Port),
|
||||
Port: pointer.Int32(int32(svcPort2)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}),
|
||||
@@ -542,8 +542,8 @@ func TestSharedRemoteEndpointUpdate(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.StringPtr(svcPortName1.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort1)),
|
||||
Name: pointer.String(svcPortName1.Port),
|
||||
Port: pointer.Int32(int32(svcPort1)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}),
|
||||
@@ -553,8 +553,8 @@ func TestSharedRemoteEndpointUpdate(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.StringPtr(svcPortName2.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort2)),
|
||||
Name: pointer.String(svcPortName2.Port),
|
||||
Port: pointer.Int32(int32(svcPort2)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}),
|
||||
@@ -611,8 +611,8 @@ func TestSharedRemoteEndpointUpdate(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.StringPtr(svcPortName1.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort1)),
|
||||
Name: pointer.String(svcPortName1.Port),
|
||||
Port: pointer.Int32(int32(svcPort1)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}),
|
||||
@@ -622,13 +622,13 @@ func TestSharedRemoteEndpointUpdate(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.StringPtr(svcPortName1.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort1)),
|
||||
Name: pointer.String(svcPortName1.Port),
|
||||
Port: pointer.Int32(int32(svcPort1)),
|
||||
Protocol: &tcpProtocol,
|
||||
},
|
||||
{
|
||||
Name: utilpointer.StringPtr("p443"),
|
||||
Port: utilpointer.Int32(int32(443)),
|
||||
Name: pointer.String("p443"),
|
||||
Port: pointer.Int32(int32(443)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}))
|
||||
@@ -696,8 +696,8 @@ func TestCreateLoadBalancer(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.StringPtr(svcPortName.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort)),
|
||||
Name: pointer.String(svcPortName.Port),
|
||||
Port: pointer.Int32(int32(svcPort)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}),
|
||||
@@ -759,8 +759,8 @@ func TestCreateDsrLoadBalancer(t *testing.T) {
|
||||
Addresses: []string{epIpAddressRemote},
|
||||
}}
|
||||
eps.Ports = []discovery.EndpointPort{{
|
||||
Name: utilpointer.StringPtr(svcPortName.Port),
|
||||
Port: utilpointer.Int32(int32(svcPort)),
|
||||
Name: pointer.String(svcPortName.Port),
|
||||
Port: pointer.Int32(int32(svcPort)),
|
||||
Protocol: &tcpProtocol,
|
||||
}}
|
||||
}),
|
||||
@@ -824,14 +824,14 @@ func TestEndpointSlice(t *testing.T) {
|
||||
},
|
||||
Ports: []discovery.EndpointPort{{
|
||||
Name: &svcPortName.Port,
|
||||
Port: utilpointer.Int32Ptr(80),
|
||||
Port: pointer.Int32(80),
|
||||
Protocol: &tcpProtocol,
|
||||
}},
|
||||
AddressType: discovery.AddressTypeIPv4,
|
||||
Endpoints: []discovery.Endpoint{{
|
||||
Addresses: []string{"192.168.2.3"},
|
||||
Conditions: discovery.EndpointConditions{Ready: utilpointer.BoolPtr(true)},
|
||||
NodeName: utilpointer.StringPtr("testhost2"),
|
||||
Conditions: discovery.EndpointConditions{Ready: pointer.Bool(true)},
|
||||
NodeName: pointer.String("testhost2"),
|
||||
}},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user