pkg/controller: Replace deprecated func usage from the k8s.io/utils/pointer pkg
This commit is contained in:
@@ -44,7 +44,7 @@ import (
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
controllerpkg "k8s.io/kubernetes/pkg/controller"
|
||||
utilnet "k8s.io/utils/net"
|
||||
utilpointer "k8s.io/utils/pointer"
|
||||
"k8s.io/utils/pointer"
|
||||
)
|
||||
|
||||
var alwaysReady = func() bool { return true }
|
||||
@@ -1942,7 +1942,7 @@ func TestSyncServiceOverCapacity(t *testing.T) {
|
||||
expectedAnnotation: true,
|
||||
}, {
|
||||
name: "annotation removed below capacity",
|
||||
startingAnnotation: utilpointer.StringPtr("truncated"),
|
||||
startingAnnotation: pointer.String("truncated"),
|
||||
numExisting: maxCapacity - 1,
|
||||
numDesired: maxCapacity - 1,
|
||||
numDesiredNotReady: 0,
|
||||
@@ -1951,7 +1951,7 @@ func TestSyncServiceOverCapacity(t *testing.T) {
|
||||
expectedAnnotation: false,
|
||||
}, {
|
||||
name: "annotation was set to warning previously, annotation removed at capacity",
|
||||
startingAnnotation: utilpointer.StringPtr("warning"),
|
||||
startingAnnotation: pointer.String("warning"),
|
||||
numExisting: maxCapacity,
|
||||
numDesired: maxCapacity,
|
||||
numDesiredNotReady: 0,
|
||||
@@ -1960,7 +1960,7 @@ func TestSyncServiceOverCapacity(t *testing.T) {
|
||||
expectedAnnotation: false,
|
||||
}, {
|
||||
name: "annotation was set to warning previously but still over capacity",
|
||||
startingAnnotation: utilpointer.StringPtr("warning"),
|
||||
startingAnnotation: pointer.String("warning"),
|
||||
numExisting: maxCapacity + 1,
|
||||
numDesired: maxCapacity + 1,
|
||||
numDesiredNotReady: 0,
|
||||
@@ -1969,7 +1969,7 @@ func TestSyncServiceOverCapacity(t *testing.T) {
|
||||
expectedAnnotation: true,
|
||||
}, {
|
||||
name: "annotation removed at capacity",
|
||||
startingAnnotation: utilpointer.StringPtr("truncated"),
|
||||
startingAnnotation: pointer.String("truncated"),
|
||||
numExisting: maxCapacity,
|
||||
numDesired: maxCapacity,
|
||||
numDesiredNotReady: 0,
|
||||
@@ -1978,7 +1978,7 @@ func TestSyncServiceOverCapacity(t *testing.T) {
|
||||
expectedAnnotation: false,
|
||||
}, {
|
||||
name: "no endpoints change, annotation value corrected",
|
||||
startingAnnotation: utilpointer.StringPtr("invalid"),
|
||||
startingAnnotation: pointer.String("invalid"),
|
||||
numExisting: maxCapacity + 1,
|
||||
numDesired: maxCapacity + 1,
|
||||
numDesiredNotReady: 0,
|
||||
@@ -2133,7 +2133,7 @@ func TestTruncateEndpoints(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEndpointPortFromServicePort(t *testing.T) {
|
||||
http := utilpointer.StringPtr("http")
|
||||
http := pointer.String("http")
|
||||
testCases := map[string]struct {
|
||||
serviceAppProtocol *string
|
||||
expectedEndpointsAppProtocol *string
|
||||
|
||||
Reference in New Issue
Block a user