mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
pkg/controller: Replace deprecated func usage from the k8s.io/utils/pointer pkg
This commit is contained in:
@@ -18,7 +18,7 @@ package v1alpha1
|
||||
|
||||
import (
|
||||
kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
|
||||
utilpointer "k8s.io/utils/pointer"
|
||||
"k8s.io/utils/pointer"
|
||||
)
|
||||
|
||||
// RecommendedDefaultGarbageCollectorControllerConfiguration defaults a pointer to a
|
||||
@@ -32,7 +32,7 @@ import (
|
||||
// run it in your wrapper struct of this type in its `SetDefaults_` method.
|
||||
func RecommendedDefaultGarbageCollectorControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.GarbageCollectorControllerConfiguration) {
|
||||
if obj.EnableGarbageCollector == nil {
|
||||
obj.EnableGarbageCollector = utilpointer.BoolPtr(true)
|
||||
obj.EnableGarbageCollector = pointer.Bool(true)
|
||||
}
|
||||
if obj.ConcurrentGCSyncs == 0 {
|
||||
obj.ConcurrentGCSyncs = 20
|
||||
|
||||
@@ -489,7 +489,7 @@ func TestAbsentOwnerCache(t *testing.T) {
|
||||
Name: "rc1",
|
||||
UID: "1",
|
||||
APIVersion: "v1",
|
||||
Controller: pointer.BoolPtr(true),
|
||||
Controller: pointer.Bool(true),
|
||||
},
|
||||
})
|
||||
rc1Pod2 := getPod("rc1Pod2", []metav1.OwnerReference{
|
||||
@@ -498,7 +498,7 @@ func TestAbsentOwnerCache(t *testing.T) {
|
||||
Name: "rc1",
|
||||
UID: "1",
|
||||
APIVersion: "v1",
|
||||
Controller: pointer.BoolPtr(false),
|
||||
Controller: pointer.Bool(false),
|
||||
},
|
||||
})
|
||||
rc2Pod1 := getPod("rc2Pod1", []metav1.OwnerReference{
|
||||
|
||||
Reference in New Issue
Block a user