kubeval icon indicating copy to clipboard operation
kubeval copied to clipboard

Validation passes when multiple ServicePorts are specified and unnamed

Open watkinsmike opened this issue 2 years ago • 0 comments

apiVersion: v1
kind: Service
metadata:
  name: foo-app
spec:
  ports:
    - port: 80
    - port: 443
  selector:
    app: foo-app
foo@bar:~$ kubectl apply -f service.yaml
The Service "foo-app" is invalid:
* spec.ports[0].name: Required value
* spec.ports[1].name: Required value
foo@bar:~$ kubeval service.yaml --strict

PASS - service.yaml contains a valid Service (foo-app)

```console
foo@bar:~$ kubeval --version
Version: 0.16.1
Commit: f5dba6b486fa18b9179b91e15eb6f2b0f7a5a69e
Date: 2021-03-30T15:17:06Z

watkinsmike avatar Sep 09 '21 21:09 watkinsmike