@@ -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
IngressDomain : "" ,
122
122
},
123
123
}
@@ -132,15 +132,15 @@ func main() {
132
132
133
133
exitOnError (loadIntoOrCreate (ctx , kubeClient , namespaceOrDie (), configMapName , cfg ), "unable to initialise configuration" )
134
134
135
- kubeConfig .Burst = int (pointer . Int32Deref (cfg .ClientConnection .Burst , int32 (rest .DefaultBurst )))
136
- kubeConfig .QPS = pointer . Float32Deref (cfg .ClientConnection .QPS , rest .DefaultQPS )
135
+ kubeConfig .Burst = int (ptr . Deref (cfg .ClientConnection .Burst , int32 (rest .DefaultBurst )))
136
+ kubeConfig .QPS = ptr . Deref (cfg .ClientConnection .QPS , rest .DefaultQPS )
137
137
setupLog .V (2 ).Info ("REST client" , "qps" , kubeConfig .QPS , "burst" , kubeConfig .Burst )
138
138
139
139
mgr , err := ctrl .NewManager (kubeConfig , ctrl.Options {
140
140
Scheme : scheme ,
141
141
MetricsBindAddress : cfg .Metrics .BindAddress ,
142
142
HealthProbeBindAddress : cfg .Health .BindAddress ,
143
- LeaderElection : pointer . BoolDeref (cfg .LeaderElection .LeaderElect , false ),
143
+ LeaderElection : ptr . Deref (cfg .LeaderElection .LeaderElect , false ),
144
144
LeaderElectionID : cfg .LeaderElection .ResourceName ,
145
145
LeaderElectionNamespace : cfg .LeaderElection .ResourceNamespace ,
146
146
LeaderElectionResourceLock : cfg .LeaderElection .ResourceLock ,
0 commit comments