@@ -41,7 +41,7 @@ import (
41
41
"k8s.io/client-go/rest"
42
42
configv1alpha1 "k8s.io/component-base/config/v1alpha1"
43
43
"k8s.io/klog/v2"
44
- "k8s.io/utils/pointer "
44
+ "k8s.io/utils/ptr "
45
45
ctrl "sigs.k8s.io/controller-runtime"
46
46
"sigs.k8s.io/controller-runtime/pkg/healthz"
47
47
"sigs.k8s.io/controller-runtime/pkg/log/zap"
@@ -102,8 +102,8 @@ func main() {
102
102
103
103
cfg := & config.CodeFlareOperatorConfiguration {
104
104
ClientConnection : & config.ClientConnection {
105
- QPS : pointer . Float32 ( 50 ),
106
- Burst : pointer . Int32 ( 100 ),
105
+ QPS : ptr . To ( float32 ( 50 ) ),
106
+ Burst : ptr . To ( int32 ( 100 ) ),
107
107
},
108
108
ControllerManager : config.ControllerManager {
109
109
Metrics : config.MetricsConfiguration {
@@ -117,7 +117,7 @@ func main() {
117
117
LeaderElection : & configv1alpha1.LeaderElectionConfiguration {},
118
118
},
119
119
KubeRay : & config.KubeRayConfiguration {
120
- RayDashboardOAuthEnabled : pointer . Bool (true ),
120
+ RayDashboardOAuthEnabled : ptr . To (true ),
121
121
},
122
122
}
123
123
@@ -131,15 +131,15 @@ func main() {
131
131
132
132
exitOnError (loadIntoOrCreate (ctx , kubeClient , namespaceOrDie (), configMapName , cfg ), "unable to initialise configuration" )
133
133
134
- kubeConfig .Burst = int (pointer . Int32Deref (cfg .ClientConnection .Burst , int32 (rest .DefaultBurst )))
135
- kubeConfig .QPS = pointer . Float32Deref (cfg .ClientConnection .QPS , rest .DefaultQPS )
134
+ kubeConfig .Burst = int (ptr . Deref (cfg .ClientConnection .Burst , int32 (rest .DefaultBurst )))
135
+ kubeConfig .QPS = ptr . Deref (cfg .ClientConnection .QPS , rest .DefaultQPS )
136
136
setupLog .V (2 ).Info ("REST client" , "qps" , kubeConfig .QPS , "burst" , kubeConfig .Burst )
137
137
138
138
mgr , err := ctrl .NewManager (kubeConfig , ctrl.Options {
139
139
Scheme : scheme ,
140
140
MetricsBindAddress : cfg .Metrics .BindAddress ,
141
141
HealthProbeBindAddress : cfg .Health .BindAddress ,
142
- LeaderElection : pointer . BoolDeref (cfg .LeaderElection .LeaderElect , false ),
142
+ LeaderElection : ptr . Deref (cfg .LeaderElection .LeaderElect , false ),
143
143
LeaderElectionID : cfg .LeaderElection .ResourceName ,
144
144
LeaderElectionNamespace : cfg .LeaderElection .ResourceNamespace ,
145
145
LeaderElectionResourceLock : cfg .LeaderElection .ResourceLock ,
0 commit comments