Open
Description
Description of the problem/feature request
when defining probes (liveness, readiness, startup) , the port can be specified as either an int or a string.
In that case, the string must match the name of a port defined in ports.
I suggest a check to validate that when the probe port is a string, it matches one the port by name.
Additional context
in case of mismatch, the yaml is accepted by the kubernetes, but the probe will fail latter : Liveness probe errored: strconv.Atoi: parsing "xxx": invalid syntax
would be ok:
containers:
- ports:
- containerPort: 1234
name: probe
livenessProbe:
httpGet:
port: probe
would be an error:
containers:
- ports:
- containerPort: 1234
name: probe
livenessProbe:
httpGet:
port: foo