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

Multi-Port Services: Named Port Environment Variables #173

Merged
merged 4 commits into from
Mar 2, 2023
Merged

Multi-Port Services: Named Port Environment Variables #173

merged 4 commits into from
Mar 2, 2023

Conversation

Strayfe
Copy link
Contributor

@Strayfe Strayfe commented Feb 22, 2023

Kubernetes used to have an environment variable of {serviceName}_SERVICE_PORT_{protocol}, however, this has since been replaced with a better mechanism for tracking services that contain multiple port mappings using name metadata to keep the ports unambiguous.

When using multiple ports for a Service, you must give all of your ports names so that these are unambiguous.
https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services

Issue: #165

…in keeping with changes to Kubernetes service specs
@Strayfe Strayfe requested review from a team, Tatsinnit and sabbour as code owners February 22, 2023 21:58
Copy link
Contributor

@elenavillamil elenavillamil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Strayfe thank you for your PR! It looks good, I just left some minor comments. Thank you for keeping UTs up to date as well!

Regarding end to end, did you test this locally yourself? It is okay if you didn't, i can do the basic test for you. I just want to have some end to end testing done before sending to our testing team.

src/library/Connect/LocalEnvironmentManager.cs Outdated Show resolved Hide resolved
@Strayfe
Copy link
Contributor Author

Strayfe commented Feb 25, 2023

Hi @elenavillamil,

Hi @Strayfe thank you for your PR! It looks good, I just left some minor comments. Thank you for keeping UTs up to date as well!

You are very welcome, I actually found this to be quite a fun challenge, the code is clean and easy to understand and I enjoyed working on the UTs!

Regarding end to end, did you test this locally yourself? It is okay if you didn't, i can do the basic test for you. I just want to have some end to end testing done before sending to our testing team.

Sadly, I was not able to figure out how to test this locally, however, I must admit I did not try very hard to look for resources to figure out how, past looking at the readme in the library project 😆, if you wouldn't mind pointing me in the direction of some materials to test this e2e I would be happy to give it a go, else I would appreciate it if you could see if it works!

P.S. I have pushed the requested changes.

@elenavillamil
Copy link
Contributor

elenavillamil commented Mar 1, 2023

Thanks @Strayfe! Since this does not have changes to the docker images, just the CLI (what code structure has it as dsc folder), it should be pretty straight forward if you want to give it a try. I have also tested locally myself and sent it off to our testing team since it worked well for the regular cases. Below steps as FYI in case you want to give it a try :)

  • build and publish the dsc folder. This readme has the details under building section
  • Then you set environment variable BRIDGE_BUILD_PATH to the path of the publish output.
  • Then open VSCode from that window where you set the environment variable and you will be running bridge using your code.

Let me know if you run into any issues. If it doesnt work and you need to debug, you can follow steps on Developing/Debugging on that section, you will be able to step through the code (you may need to update launch.json per your cluster namespace and service and computer architecture).

Copy link
Contributor

@elenavillamil elenavillamil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT! Code looks good and testing team approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants