Closed jtslear closed 6 years ago
Testing this out kubeval correctly reports this as a valid Service.
Name that names on ports are are "Optional if only one ServicePort is defined on this service."
Unfortunately this distinction isn't describable in JSON Schema in the OpenAPI specs, on which kubeval relies.
Given the following example:
The spec requires that
spec.ports[0].name
be provided. Kubernetes makes this nice, but in the context of throwing kubeval inside of CI/CD, it's best if this is caught prior to trying to perform an apply.Ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#serviceport-v1-core
Log info: