best-practices+karpenter+other: Enhance policies by iterating over all container types

Related Issue(s)

Closes #1012

Description

Enhance policies by iterating over all container types i.e ephemeralContainers, initContainers, and containers.

Context

This is my first PR to Kyverno Org! I would love to receive any feedback, thanks! 🙏

Checklist

  • I have read the policy contribution guidelines.
  • [] I have added test manifests and resources covering both positive and negative tests that prove this policy works as intended.
  • I have added the artifacthub-pkg.yml file and have verified it is complete and correct.

Merge request reports

Loading