Corrected how some parameters were passed to log the right ressources
This commit is contained in:
@@ -106,7 +106,7 @@ func NewArgoPodLog(name string, step string, msg string) ArgoPodLog {
|
||||
}
|
||||
}
|
||||
|
||||
func LogKubernetesArgo(wfName string, executionID string, watcher watch.Interface) {
|
||||
func LogKubernetesArgo(wfName string, namespace string, watcher watch.Interface) {
|
||||
var argoWatcher *ArgoWatch
|
||||
var pods []string
|
||||
var node wfv1.NodeStatus
|
||||
@@ -139,7 +139,7 @@ func LogKubernetesArgo(wfName string, executionID string, watcher watch.Interfac
|
||||
|
||||
newWatcher := ArgoWatch{
|
||||
Name: node.Name,
|
||||
Namespace: executionID,
|
||||
Namespace: namespace,
|
||||
Status: string(node.Phase),
|
||||
Created: node.StartedAt.String(),
|
||||
Started: node.StartedAt.String(),
|
||||
@@ -164,7 +164,7 @@ func LogKubernetesArgo(wfName string, executionID string, watcher watch.Interfac
|
||||
if !slices.Contains(pods,pod.Name){
|
||||
pl := wfl.With().Str("pod", pod.Name).Logger()
|
||||
if wfName == pod.Name { pods = append(pods, pod.Name); continue } // One of the node is the Workflow, the others are the pods so don't try to log on the wf name
|
||||
go logKubernetesPods(executionID, wfName, pod.Name, pl)
|
||||
go logKubernetesPods(namespace, wfName, pod.Name, pl)
|
||||
pods = append(pods, pod.Name)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user