You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
WorkflowRun creates a job that is labeled with workflowrun.oam.dev/name and the underlying pod is labeled with workflow.oam.dev/name this difference means clean-jobs is not deleting the jobs when there aren't any matchingLabels provided.
To Reproduce
Steps to reproduce the behavior:
Apply an WorkflowRun, in this example is an addon but should behave the same way with any
Then the clean-jobs runs and that tries for filter both the job and the pod a single parameter for matchingLabels which results in only the pods being cleaned up
if parameter.labelselector == _|_ {
matchingLabels: "workflow.oam.dev/name": context.name
}
Expected behavior
It should cleanup both pods and jobs
Additional context
A couple of options when it comes to the fix:
should the pod have the workflowrun annotation?
or should the clean-jobs delete if is workflow or workflowrun which is a trivial fix
The text was updated successfully, but these errors were encountered:
I can update this definition or you can also add another clean-jobs step. By default clean-jobs will clean the job and pod with "workflow.oam.dev/name", you can add another step like:
Describe the bug
WorkflowRun creates a job that is labeled with
workflowrun.oam.dev/name
and the underlying pod is labeled withworkflow.oam.dev/name
this difference means clean-jobs is not deleting the jobs when there aren't any matchingLabels provided.To Reproduce
Steps to reproduce the behavior:
matchingLabels
which results in only the pods being cleaned upExpected behavior
It should cleanup both pods and jobs
Additional context
A couple of options when it comes to the fix:
The text was updated successfully, but these errors were encountered: