kyverno-policies(kube): exclude longhorn instance-manager pods from cpu stripping

The longhorn instance-manager and engine-image pods carry
longhorn.io/component labels, not app, so the exclusions never matched.
Kyverno stripped their cpu requests at admission, longhorn-manager saw a
spec mismatch and deleted the pod in a loop, and after any node reboot
all longhorn volumes stayed detached with every workload stuck in
ContainerCreating. Match the real labels instead.
This commit is contained in:
2026-10-14 17:43:14 +02:00
parent 7ac3b46b3c
commit bb443f3311
@@ -80,13 +80,13 @@ spec:
- longhorn-system
selector:
matchLabels:
app: instance-manager
longhorn.io/component: instance-manager
- resources:
namespaces:
- longhorn-system
selector:
matchLabels:
app: engine-image
longhorn.io/component: engine-image
mutate:
# `request.object` is available in BOTH admission and background modes:
# the backgroundController synthesizes an admission-like request for