From 4c64981dbe0dc712cf4fe6ae5fdc3e2cb83d6823 Mon Sep 17 00:00:00 2001 From: Adrian Aneci Date: Mon, 7 Aug 2023 10:55:34 +0300 Subject: [PATCH] k8s.io/utils/pointer is deprecated --- controllers/asosecret_controller.go | 4 ++-- controllers/asosecret_controller_test.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/controllers/asosecret_controller.go b/controllers/asosecret_controller.go index bad3476f799..c646bca1079 100644 --- a/controllers/asosecret_controller.go +++ b/controllers/asosecret_controller.go @@ -27,7 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" "sigs.k8s.io/cluster-api-provider-azure/azure/scope" "sigs.k8s.io/cluster-api-provider-azure/util/aso" @@ -226,7 +226,7 @@ func (asos *ASOSecretReconciler) Reconcile(ctx context.Context, req ctrl.Request Kind: gvk.Kind, Name: cluster.GetName(), UID: cluster.GetUID(), - Controller: pointer.Bool(true), + Controller: ptr.To(true), } newASOSecret.OwnerReferences = []metav1.OwnerReference{owner} diff --git a/controllers/asosecret_controller_test.go b/controllers/asosecret_controller_test.go index 9f2c5547c1b..d2cb8061d80 100644 --- a/controllers/asosecret_controller_test.go +++ b/controllers/asosecret_controller_test.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/types" clientgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/record" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" @@ -349,7 +349,7 @@ func getASOSecret(cluster *clusterv1.Cluster, changes ...func(secret *corev1.Sec Kind: cluster.GetObjectKind().GroupVersionKind().Kind, Name: cluster.GetName(), UID: cluster.GetUID(), - Controller: pointer.Bool(true), + Controller: ptr.To(true), }, }, }, diff --git a/go.mod b/go.mod index 9b51779cfd7..f9a882fb975 100644 --- a/go.mod +++ b/go.mod @@ -43,7 +43,7 @@ require ( k8s.io/component-base v0.26.2 k8s.io/klog/v2 v2.90.1 k8s.io/kubectl v0.26.1 - k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 + k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/cloud-provider-azure v1.26.7 sigs.k8s.io/cluster-api v1.4.5 sigs.k8s.io/cluster-api/test v1.4.5 diff --git a/go.sum b/go.sum index a2e8e6d0bd5..870055c7bf5 100644 --- a/go.sum +++ b/go.sum @@ -1074,8 +1074,8 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/kubectl v0.26.1 h1:K8A0Jjlwg8GqrxOXxAbjY5xtmXYeYjLU96cHp2WMQ7s= k8s.io/kubectl v0.26.1/go.mod h1:miYFVzldVbdIiXMrHZYmL/EDWwJKM+F0sSsdxsATFPo= -k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk= -k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=