-
Notifications
You must be signed in to change notification settings - Fork 154
Closed
Description
Greetings!
Love this project, been adding it to our build out of kubernetes manifest.
It seems like this tool is not finding any DNS-1035 as defined here [a-z]([-a-z0-9]*[a-z0-9] validation errors.
Example invalid manifest
apiVersion: v1
kind: Service
metadata:
name: foo_bar
labels:
app: foo
spec:
ports:
- port: 10000
targetPort: 6379
selector:
app: fooWhile it can't apply to the cluster (currently 1.19 for this example)
gerald@gerald-laptop:~/playground/manifests$ kubectl apply -f service.yml
The Service "foo_bar" is invalid: metadata.name: Invalid value: "foo_bar": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')
gerald@gerald-laptop:~/playground/manifests$ ~/Downloads/kubeconform -summary -strict -output json -verbose service.yml
{
"resources": [
{
"filename": "service.yml",
"kind": "Service",
"name": "foo_bar",
"version": "v1",
"status": "statusValid",
"msg": ""
}
],
"summary": {
"valid": 1,
"invalid": 0,
"errors": 0,
"skipped": 0
}Metadata
Metadata
Assignees
Labels
No labels