MCPcopy
hub / github.com/argoproj/argo-workflows / printPodSpecLog

Method printPodSpecLog

workflow/controller/operator.go:1383–1398  ·  view source on GitHub ↗
(ctx context.Context, pod *apiv1.Pod, wfName string)

Source from the content-addressed store, hash-verified

1381}
1382
1383func (woc *wfOperationCtx) printPodSpecLog(ctx context.Context, pod *apiv1.Pod, wfName string) {
1384 podSpecByte, err := json.Marshal(pod)
1385 log := woc.log.WithField("workflow", wfName).
1386 WithField("podName", pod.Name).
1387 WithField("nodeID", pod.Annotations[common.AnnotationKeyNodeID]).
1388 WithField("namespace", pod.Namespace)
1389 if err != nil {
1390 log.
1391 WithError(err).
1392 Warn(ctx, "Unable to marshal pod spec.")
1393 } else {
1394 log.
1395 WithField("spec", string(podSpecByte)).
1396 Info(ctx, "Pod Spec")
1397 }
1398}
1399
1400// assessNodeStatus compares the current state of a pod with its corresponding node
1401// and returns the new node status if something changed

Callers 1

podReconciliationMethod · 0.95

Calls 5

WithFieldMethod · 0.65
WarnMethod · 0.65
WithErrorMethod · 0.65
InfoMethod · 0.65
MarshalMethod · 0.45

Tested by

no test coverage detected