Azure/Bridge-To-Kubernetes

Use kubectl.kubernetes.io/default-container to identify main container

dominikjeske opened this issue · 3 comments

When POD has additional containers bridge to kubernetes has problems to identify main container. I wonder if this label https://kubernetes.io/docs/reference/labels-annotations-taints/#kubectl-kubernetes-io-default-container could be used in container identification logic?

@dominikjeske thanks for raising this issue. There is an option to provide the container name if you are using the CLI directly with option --container . If you are using vscode extension we are working on enhancing this. Here is the PR for it. Please let me know if you want to give a try.

@dominikjeske Bridge identifies the container based on the following approaches

  1. if container name is provided by the user
  2. bridge selects the service based on the port/targetPort, code is here.
  3. Also we are enhancing this logic if you are using vscode extension and will be released soon. PR is here.

if you still think we need this enhancement please let us know. Thanks.

@dominikjeske Please feel free to reopen this issue if you have more questions or issues. Thank you.