Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trivy Operator is not compatible with Kubernetes v1.31.0 #2251

Open
cnwaldron opened this issue Sep 5, 2024 · 12 comments · May be fixed by #2292
Open

Trivy Operator is not compatible with Kubernetes v1.31.0 #2251

cnwaldron opened this issue Sep 5, 2024 · 12 comments · May be fixed by #2292
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@cnwaldron
Copy link
Contributor

cnwaldron commented Sep 5, 2024

What steps did you take and what happened:
We had a Kubernetes cluster that was recently updated to Kubernetes v1.31.0 and had Trivy Operator v0.22 already running. After the upgrade, I noticed that the vulnerability reports were not being created anymore. Then I looked at the namespace and saw the scan jobs were not being cleaned up but they were all successful. I looked at the trivy-operator log and saw reconcile error stating: "unrecognized scan job condition: SuccessCriteriaMet". I have checked the Kubernetes documents and found the Job Success Policy is in beta for v1.31.0 and turned on by default .(https://kubernetes.io/docs/concepts/workloads/controllers/job/#success-policy)

What did you expect to happen:

After a successful job is complete, trivy-operator will clean up the jobs and create the reports as usual.

Anything else you would like to add:
To see new policy feature: https://kubernetes.io/docs/concepts/workloads/controllers/job/#success-policy
The Job status conditions now have 2 conditions on a success: the first one is the SuccessCriteriaMet type and the second is the Complete type.

Environment:

  • Trivy-Operator version (use trivy-operator version): 0.22.0 (also ran with 0.18.5 as well)
  • Kubernetes version (use kubectl version): 1.31.0
  • OS (macOS 10.15, Windows 10, Ubuntu 19.10 etc): RHEL 9.3
@cnwaldron cnwaldron added the kind/bug Categorizes issue or PR as related to a bug. label Sep 5, 2024
@FranAguiar
Copy link

Hello, any idea when a patch will be released?

@allanian
Copy link

+1

5 similar comments
@amrap030
Copy link

+1

@dpolpa
Copy link

dpolpa commented Oct 2, 2024

+1

@Jhonnyzeroones
Copy link

+1

@inikolovski
Copy link

+1

@Prates23
Copy link

Prates23 commented Oct 7, 2024

+1

@Hacks4Snacks
Copy link
Contributor

I haven't seen a response on whether or not this project is going to continue being supported and I don't really plan on maintaining a long-term fork, but if anyone needs 1.31.0 to work in the near-term you can take a look at the changes I've made to get it working (reference: https://github.com/Hacks4Snacks/trivy-operator).

@Jhonnyzeroones
Copy link

@Hacks4Snacks Do you have an image registry that I can pull? I noticed that https://ghcr.io/Hacks4Snacks/trivy-operator was not operational. Have you published images for this or should I build my own trivy-operator image.

@Hacks4Snacks
Copy link
Contributor

@Hacks4Snacks Do you have an image registry that I can pull? I noticed that https://ghcr.io/Hacks4Snacks/trivy-operator was not operational. Have you published images for this or should I build my own trivy-operator image.

@Jhonnyzeroones I am not publishing artifacts to an image registry, I recommend building your own image.

@FranAguiar
Copy link

@Hacks4Snacks can you submit a PR with the fix? Not sure if is an option

@badgerspoke badgerspoke linked a pull request Oct 21, 2024 that will close this issue
5 tasks
@badgerspoke
Copy link

I've had a crack at a PR which appears to be working in my clusters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants