-
Notifications
You must be signed in to change notification settings - Fork 53
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
Provide a Service Port Name #379
Conversation
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Maysun J Faisal <[email protected]>
// because name is required if there is more than one port | ||
portName := strconv.Itoa(int(port.Port)) | ||
if portNameMap[portName] { | ||
portName = fmt.Sprintf("%s-%s", portName, util.GetRandomString(4, true)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering what is the purpose of having multiple service ports with different names but same port number? I know it's not blocked by kube api, but it's just exposing the same port to be accessible, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question.. I was having the exact same questions when i was writing this 😆
but I was thinking, we cant control what ppl name their ports, if someone is bring in a service with port 8080 and naming it "1234", we cant do anything about it.
However, if they enter 1234 as port on RHTAP HAC, then we cant use "1234" as name anymore. This is more for avoiding name clashes. Any other better suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense.
/retest |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #379 +/- ##
==========================================
- Coverage 84.61% 83.92% -0.70%
==========================================
Files 27 31 +4
Lines 3530 4248 +718
==========================================
+ Hits 2987 3565 +578
- Misses 402 516 +114
- Partials 141 167 +26
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally looks good to me, just a small question as commented.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maysunfaisal, yangcao77 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What does this PR do?:
Provides a Service Port name if there is more than one Service Port. The API says Name is mandatory is there is more than 1.
Which issue(s)/story(ies) does this PR fixes:
https://issues.redhat.com/browse/RHTAPBUGS-433
PR acceptance criteria:
Unit/Functional tests
Documentation
Client Impact
How to test changes / Special notes to the reviewer:
Create a Component, SEB, Snapshot, Environment. Ensure the Gitops Repo service.yaml has two service ports and both of them have names. Apply it in your OpenShift project and access the route.
Example of the Gitops Repo for providing Service Port Name https://github.com/maysunfaisal/application-sample-lK5Sb-borrow-place/blob/main/components/component-sample/base/service.yaml#L13-L20