Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation passes when multiple ServicePorts are specified and unnamed #316

Open
watkinsmike opened this issue Sep 9, 2021 · 0 comments

Comments

@watkinsmike
Copy link

watkinsmike commented Sep 9, 2021

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 watkinsmike changed the title Validation passes when ServicePorts are unnamed Validation passes when multiple ServicePorts are specified and unnamed Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant