@@ -93,39 +93,34 @@ var _ reconcile.Reconciler = &OperatorConditionReconciler{}
93
93
94
94
func (r * OperatorConditionReconciler ) Reconcile (ctx context.Context , req ctrl.Request ) (ctrl.Result , error ) {
95
95
// Set up a convenient log object so we don't have to type request over and over again
96
- log := r .log .WithValues ("request" , req )
97
- log .V ( 2 ). Info ("reconciling operatorcondition " )
96
+ log := r .log .WithValues ("request" , req ). V ( 1 )
97
+ log .Info ("reconciling" )
98
98
metrics .EmitOperatorConditionReconcile (req .Namespace , req .Name )
99
99
100
100
operatorCondition := & operatorsv2.OperatorCondition {}
101
- err := r .Client .Get (context .TODO (), req .NamespacedName , operatorCondition )
102
- if err != nil {
103
- log .V (1 ).Error (err , "Unable to find operatorcondition" )
104
- return ctrl.Result {}, err
101
+ if err := r .Client .Get (ctx , req .NamespacedName , operatorCondition ); err != nil {
102
+ log .Info ("Unable to find OperatorCondition" )
103
+ return ctrl.Result {}, client .IgnoreNotFound (err )
105
104
}
106
105
107
- err = r .ensureOperatorConditionRole (operatorCondition )
108
- if err != nil {
109
- log .V (1 ).Error (err , "Error ensuring OperatorCondition Role" )
110
- return ctrl.Result {Requeue : true }, err
106
+ if err := r .ensureOperatorConditionRole (operatorCondition ); err != nil {
107
+ log .Info ("Error ensuring OperatorCondition Role" )
108
+ return ctrl.Result {}, err
111
109
}
112
110
113
- err = r .ensureOperatorConditionRoleBinding (operatorCondition )
114
- if err != nil {
115
- log .V (1 ).Error (err , "Error ensuring OperatorCondition RoleBinding" )
116
- return ctrl.Result {Requeue : true }, err
111
+ if err := r .ensureOperatorConditionRoleBinding (operatorCondition ); err != nil {
112
+ log .Info ("Error ensuring OperatorCondition RoleBinding" )
113
+ return ctrl.Result {}, err
117
114
}
118
115
119
- err = r .ensureDeploymentEnvVars (operatorCondition )
120
- if err != nil {
121
- log .V (1 ).Error (err , "Error ensuring OperatorCondition Deployment EnvVars" )
122
- return ctrl.Result {Requeue : true }, err
116
+ if err := r .ensureDeploymentEnvVars (operatorCondition ); err != nil {
117
+ log .Info ("Error ensuring OperatorCondition Deployment EnvVars" )
118
+ return ctrl.Result {}, err
123
119
}
124
120
125
- err = r .syncOperatorConditionStatus (operatorCondition )
126
- if err != nil {
127
- log .V (1 ).Error (err , "Error syncing OperatorCondition Status" )
128
- return ctrl.Result {Requeue : true }, err
121
+ if err := r .syncOperatorConditionStatus (operatorCondition ); err != nil {
122
+ log .Info ("Error syncing OperatorCondition Status" )
123
+ return ctrl.Result {}, err
129
124
}
130
125
131
126
return ctrl.Result {}, nil
0 commit comments