add name to Service in OpenShift template#36
add name to Service in OpenShift template#36eranco74 merged 1 commit intoopenshift-assisted:masterfrom
Conversation
WalkthroughA Changes
Estimated code review effort1 (<10 minutes) Suggested labels
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
template.yaml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Red Hat Konflux / assisted-service-mcp-saas-main-on-pull-request
| - protocol: TCP | ||
| name: assisted-service-mcp | ||
| port: ${{SERVICE_PORT}} | ||
| targetPort: ${{SERVICE_PORT}} |
There was a problem hiding this comment.
Port name exceeds the Kubernetes 15-character limit – monitoring may still fail
assisted-service-mcp is 20 characters long, but ServicePort.name must be an IANA SVC_NAME (lower-case alphanumerics + ‘-’) of ≤ 15 characters. Many clusters will reject or silently trim this, breaking both monitoring and DNS-based service discovery.
Proposed fix – keep it short (e.g. http or api):
- - protocol: TCP
- name: assisted-service-mcp
+ - name: http
+ protocol: TCPPlease also update any Prometheus scrape configs / consumers that reference the port name.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - protocol: TCP | |
| name: assisted-service-mcp | |
| port: ${{SERVICE_PORT}} | |
| targetPort: ${{SERVICE_PORT}} | |
| - name: http | |
| protocol: TCP | |
| port: ${{SERVICE_PORT}} | |
| targetPort: ${{SERVICE_PORT}} |
🤖 Prompt for AI Agents
In template.yaml around lines 100 to 103, the port name 'assisted-service-mcp'
exceeds Kubernetes' 15-character limit for ServicePort names, which can cause
monitoring and service discovery failures. Rename the port to a shorter valid
name such as 'http' or 'api' that is lowercase alphanumeric with hyphens and no
longer than 15 characters. Also, update any Prometheus scrape configurations or
other consumers that reference this port name to use the new shorter name.
|
@jhernand: changing LGTM is restricted to collaborators 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 kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jhernand, maorfr 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 |
part of https://issues.redhat.com/browse/MGMT-21159
without the
nameproperty we can't monitor.follow up on #35
Summary by CodeRabbit