@@ -104,7 +104,7 @@ var _ directbase.Adapter = &contactAdapter{}
104
104
// Return a non-nil error requeues the requests.
105
105
func (a * contactAdapter ) Find (ctx context.Context ) (bool , error ) {
106
106
log := klog .FromContext (ctx )
107
- log .V ( 2 ). Info ("getting essential contact" , "name" , a .id )
107
+ log .Info ("getting essential contact" , "name" , a .id )
108
108
109
109
// Use the calculated name if available (from status), otherwise construct from ID
110
110
name := direct .ValueOf (a .desired .Status .ExternalRef )
@@ -128,7 +128,7 @@ func (a *contactAdapter) Find(ctx context.Context) (bool, error) {
128
128
// Create creates the resource in GCP based on `spec` and update the Config Connector object `status` based on the GCP response.
129
129
func (a * contactAdapter ) Create (ctx context.Context , createOp * directbase.CreateOperation ) error {
130
130
log := klog .FromContext (ctx )
131
- log .V ( 2 ). Info ("creating essential contact" , "name" , a .id )
131
+ log .Info ("creating essential contact" , "name" , a .id )
132
132
mapCtx := & direct.MapContext {}
133
133
134
134
desired := a .desired .DeepCopy ()
@@ -145,7 +145,7 @@ func (a *contactAdapter) Create(ctx context.Context, createOp *directbase.Create
145
145
if err != nil {
146
146
return fmt .Errorf ("creating essential contact %s: %w" , a .id , err )
147
147
}
148
- log .V ( 2 ). Info ("successfully created essential contact" , "name" , a .id )
148
+ log .Info ("successfully created essential contact" , "name" , a .id )
149
149
150
150
status := & krm.EssentialContactsContactStatus {}
151
151
status .ObservedState = EssentialContactsContactObservedState_FromProto (mapCtx , created )
@@ -159,7 +159,7 @@ func (a *contactAdapter) Create(ctx context.Context, createOp *directbase.Create
159
159
// Update updates the resource in GCP based on `spec` and update the Config Connector object `status` based on the GCP response.
160
160
func (a * contactAdapter ) Update (ctx context.Context , updateOp * directbase.UpdateOperation ) error {
161
161
log := klog .FromContext (ctx )
162
- log .V ( 2 ). Info ("updating essential contact" , "name" , a .id )
162
+ log .Info ("updating essential contact" , "name" , a .id )
163
163
mapCtx := & direct.MapContext {}
164
164
165
165
desired := a .desired .DeepCopy ()
@@ -179,7 +179,7 @@ func (a *contactAdapter) Update(ctx context.Context, updateOp *directbase.Update
179
179
180
180
var updated * pb.Contact
181
181
if len (paths ) == 0 {
182
- log .V ( 2 ). Info ("no field needs update" , "name" , a .id )
182
+ log .Info ("no field needs update" , "name" , a .id )
183
183
updated = a .actual
184
184
} else {
185
185
req := & pb.UpdateContactRequest {
@@ -191,7 +191,7 @@ func (a *contactAdapter) Update(ctx context.Context, updateOp *directbase.Update
191
191
if err != nil {
192
192
return fmt .Errorf ("updating essential contact %s: %w" , a .id , err )
193
193
}
194
- log .V ( 2 ). Info ("successfully updated essential contact" , "name" , a .id )
194
+ log .Info ("successfully updated essential contact" , "name" , a .id )
195
195
}
196
196
197
197
status := & krm.EssentialContactsContactStatus {}
@@ -259,19 +259,19 @@ func (a *contactAdapter) Export(ctx context.Context) (*unstructured.Unstructured
259
259
// Delete the resource from GCP service when the corresponding Config Connector resource is deleted.
260
260
func (a * contactAdapter ) Delete (ctx context.Context , deleteOp * directbase.DeleteOperation ) (bool , error ) {
261
261
log := klog .FromContext (ctx )
262
- log .V ( 2 ). Info ("deleting essential contact" , "name" , a .actual .Name )
262
+ log .Info ("deleting essential contact" , "name" , a .actual .Name )
263
263
264
264
req := & pb.DeleteContactRequest {Name : a .actual .Name }
265
265
err := a .gcpClient .DeleteContact (ctx , req )
266
266
if err != nil {
267
267
if direct .IsNotFound (err ) {
268
268
// Return success if not found (assume it was already deleted).
269
- log .V ( 2 ). Info ("skipping delete for non-existent essential contact, assuming it was already deleted" , "name" , a .actual .Name )
269
+ log .Info ("skipping delete for non-existent essential contact, assuming it was already deleted" , "name" , a .actual .Name )
270
270
return true , nil
271
271
}
272
272
return false , fmt .Errorf ("deleting essential contact %s: %w" , a .actual .Name , err )
273
273
}
274
- log .V ( 2 ). Info ("successfully deleted essential contact" , "name" , a .actual .Name )
274
+ log .Info ("successfully deleted essential contact" , "name" , a .actual .Name )
275
275
276
276
return true , nil
277
277
}
0 commit comments