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

debug should use existing containerPort definitions in selecting debug port #4463

Open
briandealwis opened this issue Jul 13, 2020 · 0 comments
Labels
area/debug kind/feature-request priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence.

Comments

@briandealwis
Copy link
Member

briandealwis commented Jul 13, 2020

debug currently selects a port that is as close to the default used by each language runtime's debugger. We should examine the container's containerPorts for an existing definition and use that port if found.

. The Kubernetes API defines the containerPort.name as being IANA_SVC_NAME, and must be unique within the pod. A service name is defined in RFC 6335 as:

Valid service names are hereby normatively defined as follows:

  • MUST be at least 1 character and no more than 15 characters long
  • MUST contain only US-ASCII [ANSI.X3.4-1986] letters 'A' - 'Z' and 'a' - 'z', digits '0' - '9', and hyphens ('-', ASCII 0x2D or decimal 45)
  • MUST contain at least one letter ('A' - 'Z' or 'a' - 'z')
  • MUST NOT begin or end with a hyphen
  • hyphens MUST NOT be adjacent to other hyphens

As containers within a pod must have unique port names, we should use the debug protocol as a prefix (e.g., look for something matching jdwp(-.+)?).

Motivated by discsussion in #4419.

@nkubala nkubala added this to the Icebox [P2+] milestone Sep 1, 2020
@briandealwis briandealwis added priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence. and removed priority/p2 May take a couple of releases labels Dec 14, 2020
@nkubala nkubala removed this from the Icebox [P2+] milestone May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/debug kind/feature-request priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence.
Projects
None yet
Development

No branches or pull requests

2 participants