Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

misleading comments in container.Ports #108255

Copy link
Copy link
@j4m3s-s

Description

@j4m3s-s
Issue body actions

What happened?

The comments in

// List of ports to expose from the container. Exposing a port here gives
says that :

Exposing a port here gives
the system additional information about the network connections a
container uses, but is primarily informational.

However there are several cases where this is false :

  • When using a Service with a targetPort that references a name in the ports arrays of the pod.
  • Some software (ab)uses this API to get which ports are used (See Patching ports in PodSpec leads to empty diff #108131 Although unfixable, my goal is to fix the documentation so other people don't have the same problem). The Azure Load Balancer implementation does this for instance.
  • Some other network/security software might use this information.

Also, is it possible to document/reference the above issue in the comment ?

What did you expect to happen?

Since it is described as informational I expected for the network to work without this information. But it's definitely not the case.

How can we reproduce it (as minimally and precisely as possible)?

Not needed since it's mostly a doc issue.

Anything else we need to know?

I'm interested in contributing this patch but would like some feedbacks before doing it. :)

Kubernetes version

$ kubectl version
# paste output here

Cloud provider

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.sig/networkCategorizes an issue or PR as relevant to SIG Network.Categorizes an issue or PR as relevant to SIG Network.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.