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
With best practice policy disallow-default-namespace, kyverno will add the autogen rule on pod controllers, there would be a problem for this. According to the error message, such as Deployment, in its .spec.template.metadata, there’s no namespace field specified - namespace would only be specified in .metadata . And Kyverno takes it as default namespace and then generate PolicyViolation for the resource.
'Validation error: Using ''default'' namespace is not allowed; Validation rule ''autogen-validate-namespace'' failed at path ''/spec/template/metadata/namespace/'''
We should disable the autogen feature on this policy, but update the policy with the additional rules which applies to pod controllers.
The text was updated successfully, but these errors were encountered:
Describe the bug
With best practice policy disallow-default-namespace, kyverno will add the autogen rule on pod controllers, there would be a problem for this. According to the error message, such as Deployment, in its
.spec.template.metadata
, there’s no namespace field specified - namespace would only be specified in.metadata
. And Kyverno takes it as default namespace and then generate PolicyViolation for the resource.We should disable the autogen feature on this policy, but update the policy with the additional rules which applies to pod controllers.
The text was updated successfully, but these errors were encountered: