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
Describe the bug
Kyverno is unable to create resources due to an invalid OwnerRef:
E1110 20:18:06.802944 1 registration.go:291] Register "msg"="failed to create resource mutating webhook configuration" "error"="MutatingWebhookConfiguration.admissionregistration.k8s.io \"kyverno-resource-mutating-webhook-cfg\" is invalid: [metadata.ownerReferences.apiVersion: Invalid value: \"\": version must not be empty, metadata.ownerReferences.kind: Invalid value: \"\": kind must not be empty, metadata.ownerReferences.name: Invalid value: \"\": name must not be empty, metadata.ownerReferences.uid: Invalid value: \"\": uid must not be empty]" "kind"="MutatingWebhookConfiguration" "name"="kyverno-resource-mutating-webhook-cfg"
I1110 20:18:06.864740 1 registration.go:641] Register "msg"="Endpoint ready" "name"="kyverno-cpusdr1mm3-svc" "ns"="kyverno-cpusdr1mm3"
E1110 20:18:07.399447 1 common.go:65] Register "msg"="failed to construct OwnerReference" "error"="clusterroles.rbac.authorization.k8s.io \"kyverno:webhook\" not found"
E1110 20:18:07.703296 1 common.go:65] Register "msg"="failed to construct OwnerReference" "error"="clusterroles.rbac.authorization.k8s.io \"kyverno:webhook\" not found"
E1110 20:18:08.073875 1 common.go:65] Register "msg"="failed to construct OwnerReference" "error"="clusterroles.rbac.authorization.k8s.io \"kyverno:webhook\" not found"
E1110 20:18:08.466831 1 common.go:65] Register "msg"="failed to construct OwnerReference" "error"="clusterroles.rbac.authorization.k8s.io \"kyverno:webhook\" not found"
E1110 20:18:08.666886 1 registration.go:317] Register "msg"="failed to create resource" "error"="ValidatingWebhookConfiguration.admissionregistration.k8s.io \"kyverno-resource-validating-webhook-cfg\" is invalid: [metadata.ownerReferences.apiVersion: Invalid value: \"\": version must not be empty, metadata.ownerReferences.kind: Invalid value: \"\": kind must not be empty, metadata.ownerReferences.name: Invalid value: \"\": name must not be empty, metadata.ownerReferences.uid: Invalid value: \"\": uid must not be empty]" "kind"="ValidatingWebhookConfiguration" "name"="kyverno-resource-validating-webhook-cfg"
E1110 20:18:08.870873 1 common.go:65] Register "msg"="failed to construct OwnerReference" "error"="clusterroles.rbac.authorization.k8s.io \"kyverno:webhook\" not found"
E1110 20:18:09.050093 1 registration.go:291] Register "msg"="failed to create resource mutating webhook configuration" "error"="MutatingWebhookConfiguration.admissionregistration.k8s.io \"kyverno-resource-mutating-webhook-cfg\" is invalid: [metadata.ownerReferences.apiVersion: Invalid value: \"\": version must not be empty, metadata.ownerReferences.kind: Invalid value: \"\": kind must not be empty, metadata.ownerReferences.name: Invalid value: \"\": name must not be empty, metadata.ownerReferences.uid: Invalid value: \"\": uid must not be empty]" "kind"="MutatingWebhookConfiguration" "name"="kyverno-resource-mutating-webhook-cfg"
I1110 20:18:09.547246 1 registration.go:641] Register "msg"="Endpoint ready" "name"="kyverno-cpusdr1mm3-svc" "ns"="kyverno-cpusdr1mm3"
E1110 20:18:09.897391 1 common.go:65] Register "msg"="failed to construct OwnerReference" "error"="clusterroles.rbac.authorization.k8s.io \"kyverno:webhook\" not found"
E1110 20:18:10.306844 1 common.go:65] Register "msg"="failed to construct OwnerReference" "error"="clusterroles.rbac.authorization.k8s.io \"kyverno:webhook\" not found"
E1110 20:18:10.718846 1 common.go:65] Register "msg"="failed to construct OwnerReference" "error"="clusterroles.rbac.authorization.k8s.io \"kyverno:webhook\" not found"
E1110 20:18:11.023996 1 common.go:65] Register "msg"="failed to construct OwnerReference" "error"="clusterroles.rbac.authorization.k8s.io \"kyverno:webhook\" not found"
E1110 20:18:11.221195 1 registration.go:317] Register "msg"="failed to create resource" "error"="ValidatingWebhookConfiguration.admissionregistration.k8s.io \"kyverno-resource-validating-webhook-cfg\" is invalid: [metadata.ownerReferences.apiVersion: Invalid value: \"\": version must not be empty, metadata.ownerReferences.kind: Invalid value: \"\": kind must not be empty, metadata.ownerReferences.name: Invalid value: \"\": name must not be empty, metadata.ownerReferences.uid: Invalid value: \"\": uid must not be empty]" "kind"="ValidatingWebhookConfiguration" "name"="kyverno-resource-validating-webhook-cfg"
@diranged We are planning to add extra Label to ClusterRole and will get ClusterRole from that instead of hardcoding it fix this issue. Will this solution works for you?
Software version numbers
Describe the bug
Kyverno is unable to create resources due to an invalid OwnerRef:
The issue is that #2659 hard-codes the expected name of the ClusterRole, while at https://github.com/kyverno/kyverno/blob/main/charts/kyverno/templates/clusterrole.yaml#L20-L24 it is dynamic.
The text was updated successfully, but these errors were encountered: