Skip to content

Commit 209eee8

Browse files
committed
Added more values in the log message for better debugging
Signed-off-by: Anand Francis Joseph <[email protected]>
1 parent 208a954 commit 209eee8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/utils/kube/resource_ops.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,12 @@ func (k *kubectlResourceOperations) ApplyResource(ctx context.Context, obj *unst
229229
span.SetBaggageItem("kind", obj.GetKind())
230230
span.SetBaggageItem("name", obj.GetName())
231231
defer span.Finish()
232-
k.log.Info(fmt.Sprintf("Applying resource %s/%s in cluster: %s, namespace: %s", obj.GetKind(), obj.GetName(), k.config.Host, obj.GetNamespace()))
232+
k.log.WithValues(
233+
"dry-run", dryRunStrategy,
234+
"manager", manager,
235+
"serverSideApply", serverSideApply,
236+
"serverSideDiff", serverSideDiff
237+
).Info(fmt.Sprintf("Applying resource %s/%s in cluster: %s, namespace: %s", obj.GetKind(), obj.GetName(), k.config.Host, obj.GetNamespace()))
233238
return k.runResourceCommand(ctx, obj, dryRunStrategy, func(f cmdutil.Factory, ioStreams genericclioptions.IOStreams, fileName string) error {
234239
cleanup, err := k.processKubectlRun("apply")
235240
if err != nil {

0 commit comments

Comments
 (0)