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
What steps did you take and what happened:
Set operator.scanJobTTL: "5m" in the helm chart values in order to retain the Job and Pod for 5 minutes after completion.
Instead of retaining the Job and Pod, the scan job was immediately deleted.
What did you expect to happen:
The Scanjob and corresponding Pod to remain 5 minutes after reaching the status Completed
Anything else you would like to add:
The vulnerability controller does not honour job.Spec.TTLSecondsAfterFinished. Although the generated job manifest does contain ttlSecondsAfterFinished with the correct value, it nevertheless directly deletes completed jobs. See code here
I alter the code with the following lines before the deletion which solved the problem:
What steps did you take and what happened:
Set
operator.scanJobTTL: "5m"
in the helm chart values in order to retain the Job and Pod for 5 minutes after completion.Instead of retaining the Job and Pod, the scan job was immediately deleted.
What did you expect to happen:
The Scanjob and corresponding Pod to remain 5 minutes after reaching the status
Completed
Anything else you would like to add:
The vulnerability controller does not honour
job.Spec.TTLSecondsAfterFinished
. Although the generated job manifest does containttlSecondsAfterFinished
with the correct value, it nevertheless directly deletes completed jobs. See code hereI alter the code with the following lines before the deletion which solved the problem:
I can open a PR to fix this issue.
Environment:
Client Version: v1.31.0
,Server Version: v1.30.0
The text was updated successfully, but these errors were encountered: