6
6
"time"
7
7
8
8
configv1client "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1"
9
- tunedv1alpha1 "github.com/openshift/cluster-node-tuning-operator/pkg/apis/tuned/v1alpha1 "
9
+ tunedv1 "github.com/openshift/cluster-node-tuning-operator/pkg/apis/tuned/v1 "
10
10
ntoconfig "github.com/openshift/cluster-node-tuning-operator/pkg/config"
11
11
"github.com/openshift/cluster-node-tuning-operator/pkg/manifests"
12
12
@@ -50,15 +50,15 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
50
50
}
51
51
52
52
// Watch for changes to primary resource Tuned
53
- err = c .Watch (& source.Kind {Type : & tunedv1alpha1 .Tuned {}}, & handler.EnqueueRequestForObject {})
53
+ err = c .Watch (& source.Kind {Type : & tunedv1 .Tuned {}}, & handler.EnqueueRequestForObject {})
54
54
if err != nil {
55
55
return err
56
56
}
57
57
58
58
// Watch for changes to secondary resource DaemonSet and requeue the owner Tuned
59
59
err = c .Watch (& source.Kind {Type : & appsv1.DaemonSet {}}, & handler.EnqueueRequestForOwner {
60
60
IsController : true ,
61
- OwnerType : & tunedv1alpha1 .Tuned {},
61
+ OwnerType : & tunedv1 .Tuned {},
62
62
})
63
63
if err != nil {
64
64
return err
@@ -85,7 +85,7 @@ type ReconcileTuned struct {
85
85
cfgv1client * configv1client.ConfigV1Client
86
86
}
87
87
88
- func (r * ReconcileTuned ) syncServiceAccount (tuned * tunedv1alpha1 .Tuned ) error {
88
+ func (r * ReconcileTuned ) syncServiceAccount (tuned * tunedv1 .Tuned ) error {
89
89
glog .V (1 ).Infof ("syncServiceAccount()" )
90
90
saManifest , err := r .manifestFactory .TunedServiceAccount ()
91
91
if err != nil {
@@ -116,7 +116,7 @@ func (r *ReconcileTuned) syncServiceAccount(tuned *tunedv1alpha1.Tuned) error {
116
116
return nil
117
117
}
118
118
119
- func (r * ReconcileTuned ) syncClusterRole (tuned * tunedv1alpha1 .Tuned ) error {
119
+ func (r * ReconcileTuned ) syncClusterRole (tuned * tunedv1 .Tuned ) error {
120
120
glog .V (1 ).Infof ("syncClusterRole()" )
121
121
crManifest , err := r .manifestFactory .TunedClusterRole ()
122
122
if err != nil {
@@ -147,7 +147,7 @@ func (r *ReconcileTuned) syncClusterRole(tuned *tunedv1alpha1.Tuned) error {
147
147
return nil
148
148
}
149
149
150
- func (r * ReconcileTuned ) syncClusterRoleBinding (tuned * tunedv1alpha1 .Tuned ) error {
150
+ func (r * ReconcileTuned ) syncClusterRoleBinding (tuned * tunedv1 .Tuned ) error {
151
151
glog .V (1 ).Infof ("syncClusterRoleBinding()" )
152
152
crbManifest , err := r .manifestFactory .TunedClusterRoleBinding ()
153
153
if err != nil {
@@ -178,9 +178,9 @@ func (r *ReconcileTuned) syncClusterRoleBinding(tuned *tunedv1alpha1.Tuned) erro
178
178
return nil
179
179
}
180
180
181
- func (r * ReconcileTuned ) syncClusterConfigMap (f func (tuned []tunedv1alpha1 .Tuned ) (* corev1.ConfigMap , error ), tuned * tunedv1alpha1 .Tuned ) error {
181
+ func (r * ReconcileTuned ) syncClusterConfigMap (f func (tuned []tunedv1 .Tuned ) (* corev1.ConfigMap , error ), tuned * tunedv1 .Tuned ) error {
182
182
glog .V (1 ).Infof ("syncClusterConfigMap()" )
183
- tunedList := & tunedv1alpha1 .TunedList {}
183
+ tunedList := & tunedv1 .TunedList {}
184
184
listOps := & client.ListOptions {Namespace : tuned .Namespace }
185
185
err := r .client .List (context .TODO (), listOps , tunedList )
186
186
if err != nil {
@@ -216,7 +216,7 @@ func (r *ReconcileTuned) syncClusterConfigMap(f func(tuned []tunedv1alpha1.Tuned
216
216
return nil
217
217
}
218
218
219
- func (r * ReconcileTuned ) syncDaemonSet (tuned * tunedv1alpha1 .Tuned ) error {
219
+ func (r * ReconcileTuned ) syncDaemonSet (tuned * tunedv1 .Tuned ) error {
220
220
glog .V (1 ).Infof ("syncDaemonSet()" )
221
221
dsManifest , err := r .manifestFactory .TunedDaemonSet ()
222
222
if err != nil {
@@ -267,7 +267,7 @@ func createCustomResource(mgr manager.Manager) error {
267
267
return nil
268
268
}
269
269
270
- func addOwnerReference (meta * metav1.ObjectMeta , tuned * tunedv1alpha1 .Tuned ) []metav1.OwnerReference {
270
+ func addOwnerReference (meta * metav1.ObjectMeta , tuned * tunedv1 .Tuned ) []metav1.OwnerReference {
271
271
var isController bool
272
272
if tuned .Name == "default" {
273
273
isController = true
@@ -285,7 +285,7 @@ func addOwnerReference(meta *metav1.ObjectMeta, tuned *tunedv1alpha1.Tuned) []me
285
285
}
286
286
287
287
ownerReference := metav1.OwnerReference {
288
- APIVersion : tunedv1alpha1 .SchemeGroupVersion .String (),
288
+ APIVersion : tunedv1 .SchemeGroupVersion .String (),
289
289
Kind : "Tuned" ,
290
290
Name : tuned .Name ,
291
291
UID : tuned .UID ,
@@ -309,7 +309,7 @@ func (r *ReconcileTuned) Reconcile(request reconcile.Request) (reconcile.Result,
309
309
reconcileResult := reconcile.Result {RequeueAfter : reconcilePeriod }
310
310
311
311
// Fetch the Tuned instance
312
- tunedInstance := & tunedv1alpha1 .Tuned {}
312
+ tunedInstance := & tunedv1 .Tuned {}
313
313
err := r .client .Get (context .TODO (), request .NamespacedName , tunedInstance )
314
314
if err != nil {
315
315
glog .Errorf ("Couldn't get tunedInstance(): %v" , err )
0 commit comments