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
Setting a wrong annotations."io.kubewarden.policy.title" in metadata.yaml may result in a wrong metadata.name of the CRD after scaffolding. For example a name my policy is invalid as it contains spaces, while my-policy is valid. Valid k8s metadata.name must follow:
a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')
This is not necessarily true for raw policies as they don't need to be deployed via a CRD in the K8s api. But maybe is good to enforce it anyways.
Notice that a user can manually edit the metadata.yaml after scaffolding.
Acceptance criteria
Running E2E tests with kwctl (for example kwctl run, kwctl scaffold) should error and inform the user of incorrect metadata.
The text was updated successfully, but these errors were encountered:
Problem
Setting a wrong
annotations."io.kubewarden.policy.title"
inmetadata.yaml
may result in a wrongmetadata.name
of the CRD after scaffolding. For example a namemy policy
is invalid as it contains spaces, whilemy-policy
is valid. Valid k8smetadata.name
must follow:This is not necessarily true for raw policies as they don't need to be deployed via a CRD in the K8s api. But maybe is good to enforce it anyways.
Notice that a user can manually edit the metadata.yaml after scaffolding.
Acceptance criteria
kwctl run
,kwctl scaffold
) should error and inform the user of incorrect metadata.The text was updated successfully, but these errors were encountered: