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

[FEATURE_REQUEST] validate that probe port match a existing port #455

Open
jouve opened this issue Nov 25, 2022 · 0 comments
Open

[FEATURE_REQUEST] validate that probe port match a existing port #455

jouve opened this issue Nov 25, 2022 · 0 comments
Labels
enhancement New feature or request new-check

Comments

@jouve
Copy link
Contributor

jouve commented Nov 25, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new-check
Projects
None yet
Development

No branches or pull requests

2 participants