-
Notifications
You must be signed in to change notification settings - Fork 427
WIP: OCPBUGS-74543: expose: Fix labels not being added to route #2189
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
base: main
Are you sure you want to change the base?
Conversation
|
@tchap: This pull request references Jira Issue OCPBUGS-74543, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
WalkthroughExpose command now parses user-provided labels for services, merges them into the created UnsecuredRoute's metadata labels, and returns an error if label parsing fails. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Comment |
|
/jira refresh |
|
@tchap: This pull request references Jira Issue OCPBUGS-74543, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tchap The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@pkg/cli/expose/expose.go`:
- Around line 188-205: The code unconditionally overwrites
route.ObjectMeta.Labels with the local variable labels (which is nil when
o.ExposeServiceOptions.Labels is omitted), discarding labels copied by
route.UnsecuredRoute; change the code to only assign route.ObjectMeta.Labels
when o.ExposeServiceOptions.Labels is non-empty (i.e., after parsing via
generate.ParseLabels or by checking len(o.ExposeServiceOptions.Labels) > 0) so
existing service labels from route.UnsecuredRoute are preserved when --labels is
not provided.
b02b779 to
d49d3a9
Compare
|
I don't mind adding an e2e test for this once the OTE tests are merged. |
The --labels option was being ignored when exposing a service. This is now fixed and .metadata.labels is set to the desired value.
d49d3a9 to
d5afaa8
Compare
|
@tchap: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
The
--labelsoption was being ignored when exposing a service.This is now fixed and .metadata.labels is set to the desired value.