8000 [Bug] Nonsense log `applying background rule` · Issue #12069 · kyverno/kyverno · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Bug] Nonsense log applying background rule #12069

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

Open
2 tasks done
anbrsap opened this issue Feb 3, 2025 · 3 comments
Open
2 tasks done

[Bug] Nonsense log applying background rule #12069

anbrsap opened this issue Feb 3, 2025 · 3 comments
Labels
bug Something isn't working triage Default label assigned to all new issues indicating label curation is needed to fully organize. validation Issues pertaining to the validate ability.

Comments

@anbrsap
Copy link
Contributor
anbrsap commented Feb 3, 2025

Kyverno Version

1.13.2

Kubernetes Version

1.30.x

Kubernetes Platform

Other (specify in description)

Kyverno Rule Type

Validate

Description

I have a cluster policy containing mutate, validate and generate rules.

For all these rules the admission controller logs applying background rule although the request is not coming from the background controller:

{
    "level": "-3",
    "gvk": "/v1, Kind=Pod",
    "gvr": {
        "group": "",
        "version": "v1",
        "resource": "pods"
    },
    "namespace": "test-ns",
    "name": "test-pod-jwwdt",
    "operation": "UPDATE",
    "user": {
        "username": "system:serviceaccount:kube-system:calico-cni-plugin"
    },
    "URLParams": "",
    "v": 4,
    "logger": "webhooks/resource/validate",
    "rule": "validate-rule-1",
    "skipBackgroundRequests": true,
    "backgroundSaDesired": "system:serviceaccount:kyverno:kyverno-background-controller",
    "backgroundSaActual": "system:serviceaccount:kube-system:calico-cni-plugin",
    "time": "2025-02-03T14:00:24Z",
    "message": "applying background rule"
}

Steps to reproduce

  1. Create a policy which has a generate rule or mutate-existing rule, plus at least another type of rule (validate, mutate)
  2. Set admission controller log verbosity level >= 4
  3. Create a K8s API request that results in a webhook to Kyverno which matches the generate rule or mutate-existing rule.
  4. See the above-mentionen log entry for all rules in the policy.

Expected behavior

applying background rule should only be logged if the K8s API request has been created by the Kyverno background controller.

Also see the respective lines of code.

Screenshots

No response

Kyverno logs

Slack discussion

No response

Troubleshooting

  • I have read and followed the documentation AND the troubleshooting guide.
  • I have searched other issues in this repository and mine is not recorded.
@anbrsap anbrsap added bug Something isn't working triage Default label assigned to all new issues indicating label curation is needed to fully organize. labels Feb 3, 2025
@dosubot dosubot bot added the validation Issues pertaining to the validate ability. label Feb 3, 2025
Copy link
dosubot bot commented May 5, 2025

Hi, @anbrsap. I'm Dosu, and I'm helping the kyverno team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • Reported bug in Kyverno version 1.13.2.
  • Admission controller logs "applying background rule" for all rules.
  • Expected behavior: log should appear only for requests from the background controller.
  • Includes steps to reproduce and a link to relevant code.
  • No comments or updates have been made on this issue.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of Kyverno.
  • If no further activity occurs, this issue will be automatically closed in 60 days.

Thank you for your understanding and contribution!

@dosubot dosubot bot added the stale Stale issue, may be closed in the near future if nothing happens label May 5, 2025
@anbrsap
Copy link
Contributor Author
anbrsap commented May 6, 2025

Of course this is still relevant.

@dosubot dosubot bot removed the stale Stale issue, may be closed in the near future if nothing happens label May 6, 2025
Copy link
dosubot bot commented May 6, 2025

@realshuting, the user @anbrsap has confirmed that this issue is still relevant. Could you please assist them with the reported bug in Kyverno version 1.13.2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Default label assigned to all new issues indicating label curation is needed to fully organize. validation Issues pertaining to the validate ability.
Projects
None yet
Development

No branches or pull requests

1 participant
0