Skip to content

chore: Cherry pick pr #620 to release 2.1 - #625

Merged
rm3l merged 2 commits into
redhat-developer:release-2.1from
OpinionatedHeron:cherry-pick-620-to-release-2.1
Oct 12, 2026
Merged

rm3l merged 2 commits into
redhat-developer:release-2.1from
OpinionatedHeron:cherry-pick-620-to-release-2.1

Conversation

@OpinionatedHeron

Copy link
Copy Markdown
Member

Description of the change

The rhdh Helm chart's Ingress and HTTPRoute templates hardcode the backend service port with no way for users to override it per path or per rule. Updated templates to allow per-path/rule port overrides while keeping full backward compatibility.

Which issue(s) does this PR fix or relate to

Checklist

  • For each Chart updated, version bumped in the corresponding Chart.yaml according to Semantic Versioning.
  • For each Chart updated, variables are documented in the values.yaml and added to the corresponding README.md. The pre-commit utility can be used to generate the necessary content. Run pre-commit run --all-files to run the hooks and then push any resulting changes. The pre-commit Workflow will enforce this and warn you if needed.
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook.
  • Tests pass using the Chart Testing tool and the ct lint command.
  • If you updated the orchestrator-infra chart, make sure the versions of the Knative CRDs are aligned with the versions of the CRDs installed by the OpenShift Serverless operators declared in the values.yaml file. See Installing Knative Eventing and Knative Serving CRDs for more details.

OpinionatedHeron and others added 2 commits October 12, 2026 17:37
…e templates (redhat-developer#620)

cherry-picking to release 2.1

Signed-off-by: Leanne Ahern <lahern@redhat.com>
(cherry picked from commit 3ca205e)
Keep release-2.1 chart versioning (3.4.7 / appVersion 2.1.0) and
next-2.1 image tag while retaining the port-override README docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@OpinionatedHeron
OpinionatedHeron requested a review from rm3l October 12, 2026 16:48
@OpinionatedHeron
OpinionatedHeron requested a review from a team as a code owner October 12, 2026 16:48
@openshift-ci
openshift-ci Bot requested a review from zdrapela October 12, 2026 16:48
@sonarqubecloud

Copy link
Copy Markdown

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Allow per-path and per-rule backend port overrides in RHDH routes

🐞 Bug fix ✨ Enhancement 🕐 20-40 Minutes

Grey Divider

AI Description

• Allow Ingress paths and HTTPRoute rules to select a backend service port.
• Preserve existing routing by defaulting omitted overrides to service.port.
• Document and validate the options, and bump the release 2.1 chart to 3.4.7.
Diagram

graph TD
  Schema["Values schema"] --> Values["Chart values"] --> IngressTpl["Ingress template"] --> Ingress["Ingress resource"] --> Service["Backend Service"]
  Values --> RouteTpl["HTTPRoute template"] --> Route["HTTPRoute resource"] --> Service
Loading
High-Level Assessment

Per-path and per-rule overrides address mixed routing needs without changing existing configurations. A global service-port override would not provide that granularity; the localized template changes are appropriate.

Files changed (7) +84 / -7

Bug fix (2) +2 / -2
httproute.yamlSelect backend port per HTTPRoute rule +1/-1

Select backend port per HTTPRoute rule

• Uses a rule's optional port for its backend reference, falling back to 'service.port' when omitted.

charts/rhdh/templates/httproute.yaml

ingress.yamlSelect backend port per Ingress path +1/-1

Select backend port per Ingress path

• Uses a path's optional port for its service backend, falling back to 'service.port' when omitted.

charts/rhdh/templates/ingress.yaml

Documentation (2) +9 / -2
README.mdDocument port overrides and chart version +4/-2

Document port overrides and chart version

• Updates the version badge and install command to 3.4.7. Describes optional backend port settings for Ingress paths and HTTPRoute rules, including their fallback.

charts/rhdh/README.md

values.yamlExplain optional routing ports in chart defaults +5/-0

Explain optional routing ports in chart defaults

• Documents the per-path and per-rule overrides and their 'service.port' fallback. Adds a commented Ingress example without changing default routing.

charts/rhdh/values.yaml

Other (3) +73 / -3
Chart.yamlBump release 2.1 chart version to 3.4.7 +1/-1

Bump release 2.1 chart version to 3.4.7

• Increments the chart version from 3.4.6 to 3.4.7 while retaining appVersion 2.1.0.

charts/rhdh/Chart.yaml

values.schema.jsonValidate port overrides in the generated schema +35/-0

Validate port overrides in the generated schema

• Adds integer port properties to HTTPRoute rule items and Ingress host path items.

charts/rhdh/values.schema.json

values.schema.tmpl.jsonDefine per-rule and per-path ports in the schema template +37/-2

Define per-rule and per-path ports in the schema template

• Defines item structures for HTTPRoute rules and Ingress hosts and paths, including optional integer port overrides.

charts/rhdh/values.schema.tmpl.json

@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. The sidecar example routes to a missing port 🐞 Bug ≡ Correctness
Description
The new ingress example suggests port: 4180, but the Service template does not expose that port
unless service.extraPorts also defines it. A user following the example with an oauth2-proxy
sidecar and the default Service configuration gets an Ingress backend that cannot reach the sidecar.
Code

charts/rhdh/values.yaml[430]

+          # port: 4180
Relevance

●●● Strong

Recent migration-documentation precedent accepts correcting misleading examples and documenting
required service port mappings.

PR-#516
PR-#542

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The example names port 4180, while the Ingress targets the chart's Service and that Service exposes
only its main port and explicitly configured extra ports. The default extra port is 9464, not 4180.

charts/rhdh/values.yaml[398-405]
charts/rhdh/values.yaml[423-430]
charts/rhdh/templates/ingress.yaml[41-45]
charts/rhdh/templates/service.yaml[43-55]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The ingress sidecar example sets backend port 4180 without showing the Service port required to reach it.
## Fix Focus Areas
- charts/rhdh/values.yaml[423-430]
- charts/rhdh/README.md[250-252]
## Recommended Fix
Document that the override must match `service.port` or a `service.extraPorts` entry, and show a 4180 `service.extraPorts` example alongside the oauth2-proxy example.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


2. Invalid port overrides reach Kubernetes 🐞 Bug ≡ Correctness
Description
The new ingress-path and HTTPRoute-rule port schemas accept every integer, including negative
numbers and numbers above 65535. When either route is enabled with one of those values, its template
emits an invalid backend port instead of rejecting the values during chart validation.
Code

charts/rhdh/values.schema.tmpl.json[R333-335]

+                            "port": {
+                                "title": "Optional backend service port override for this rule.",
+                                "type": "integer"
Relevance

●●● Strong

Recent precedent accepts schema hardening that prevents invalid rendered resources, including
numeric bounds and configuration validation.

PR-#407
PR-#500

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Both added schema definitions specify integer type without bounds, and both changed templates
interpolate the supplied override as a backend port.

charts/rhdh/values.schema.tmpl.json[279-282]
charts/rhdh/values.schema.tmpl.json[333-336]
charts/rhdh/templates/ingress.yaml[41-45]
charts/rhdh/templates/httproute.yaml[48-51]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Both new backend-port schema fields accept integers outside the valid port range, which the templates emit into Kubernetes resources.
## Fix Focus Areas
- charts/rhdh/values.schema.tmpl.json[279-282]
- charts/rhdh/values.schema.tmpl.json[333-336]
- charts/rhdh/values.schema.json[692-695]
- charts/rhdh/values.schema.json[800-803]
## Recommended Fix
Add `minimum: 1` and `maximum: 65535` to both override fields in the template schema and regenerate the published schema.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Grey Divider

Context sources
⚠️ Tickets: not configured — ticket URL found in PR but could not be fetched — check ticket provider credentials
✅ Cross-repo context — repo relationships
Review mode: Auto: ⚖️ Balanced: Localized template behavior change with schema and backward-compatibility risks.

Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@rhdh-qodo-merge

Copy link
Copy Markdown

Important

The /generate_labels command by Qodo was deprecated on the 1st of October 2026 and is no longer available. We recommend switching to the latest Qodo review capabilities. Learn more

@openshift-ci openshift-ci Bot added the lgtm label Oct 12, 2026
@rm3l
rm3l merged commit e80b88d into redhat-developer:release-2.1 Oct 12, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants