Skip to content

feat(charts/oma): support multiple ingress hosts - #352

Merged
duyetbot merged 1 commit into
mainfrom
feat/oma-multi-host-ingress
Aug 3, 2026
Merged

feat(charts/oma): support multiple ingress hosts#352
duyetbot merged 1 commit into
mainfrom
feat/oma-multi-host-ingress

Conversation

@duyetbot

@duyetbot duyetbot commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Adds ingress.hosts (a list) alongside ingress.host; when set, all hosts are served under one TLS cert. Enables a deploy to expose the app at multiple URLs (e.g. a primary host + a legacy/wildcard host) without a second Ingress. Backward compatible (single host still works). helm lint + helm template clean.

🤖 Generated with Claude Code

Summary by Sourcery

Support configuring multiple ingress hostnames for the OMA chart while preserving the existing single-host behavior.

New Features:

  • Allow deployments to specify multiple ingress hostnames via ingress.hosts, all served under a single TLS certificate.

Enhancements:

  • Clarify ingress configuration comments to document precedence between ingress.host and ingress.hosts and the multi-URL use case.

ingress.hosts (a list) takes precedence over the single ingress.host; all
listed hosts are covered by one TLS cert (ingress.tls.secretName). Lets a
deploy serve the app at more than one URL — e.g. a primary host plus a
legacy/wildcard one — without a second Ingress. helm lint + template clean.

Co-Authored-By: Claude <noreply@anthropic.com>
@duyetbot
duyetbot merged commit 2ed0b45 into main Aug 3, 2026
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@duyetbot
duyetbot deleted the feat/oma-multi-host-ingress branch August 3, 2026 19:24
@sourcery-ai

sourcery-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Add support for configuring multiple ingress hostnames via a new ingress.hosts list while keeping existing single-host behavior backward compatible, updating the ingress template logic and values documentation accordingly.

Flow diagram for ingress host selection logic

flowchart TD
  A[ingress.enabled true] --> B[Check ingress.hosts]
  B -->|non-empty| C[Use ingress.hosts list]
  B -->|empty or unset| D[Fallback to single ingress.host]
  C --> E[Render tls.hosts with all hosts]
  D --> E
  C --> F[Render rules for each host]
  D --> F
  E --> G[Kubernetes Ingress TLS config]
  F --> H[Kubernetes Ingress host rules]
Loading

File-Level Changes

Change Details Files
Allow Helm chart ingress to be configured with one or more hostnames via a unified hosts list while preserving existing single-host behavior.
  • Introduce a local $hosts variable that resolves to .Values.ingress.hosts or falls back to a single .Values.ingress.host when the list is empty
  • Update TLS hosts section to iterate over the unified hosts list so all configured hostnames share the same TLS secret
  • Update ingress rules to iterate over the unified hosts list, creating one rule per host
  • Adjust backend service name and port lookups to use root context ($ / $.Values) inside the range loop to avoid scoping issues
  • Extend values.yaml with a new ingress.hosts array and clarify comments on precedence between host and hosts and TLS behavior
charts/oma/templates/ingress.yaml
charts/oma/values.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@duyetbot, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d6ff962d-b128-4e15-b43d-592647821579

📥 Commits

Reviewing files that changed from the base of the PR and between ee36696 and 870ed11.

📒 Files selected for processing (2)
  • charts/oma/templates/ingress.yaml
  • charts/oma/values.yaml

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • Consider filtering out empty values from ingress.hosts and ingress.host (or erroring when none are provided) so the generated Ingress doesn’t end up with blank host entries if both are unset or misconfigured.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider filtering out empty values from `ingress.hosts` and `ingress.host` (or erroring when none are provided) so the generated Ingress doesn’t end up with blank host entries if both are unset or misconfigured.

## Individual Comments

### Comment 1
<location path="charts/oma/templates/ingress.yaml" line_range="10-13" />
<code_context>
+     multiple hosts (one TLS cert covering all of them); or leave it unset and
+     set `ingress.host` for a single host. */}}
 {{- if .Values.ingress.enabled }}
+{{- $hosts := (.Values.ingress.hosts | default (list .Values.ingress.host)) }}
 apiVersion: networking.k8s.io/v1
 kind: Ingress
</code_context>
<issue_to_address>
**issue:** Handle the case where both `ingress.hosts` and `ingress.host` are unset to avoid generating an invalid Ingress.

If `ingress.enabled` is true but both `ingress.hosts` and `ingress.host` are unset, `$hosts` becomes an empty list, so the `tls.hosts` and `rules` ranges render nothing and the Ingress is invalid and rejected by Kubernetes. Add a guard to ensure at least one host (e.g. `required` on `ingress.host` when `ingress.hosts` is empty) or fail fast with a template error when `$hosts` is empty.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +10 to 13
{{- $hosts := (.Values.ingress.hosts | default (list .Values.ingress.host)) }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue: Handle the case where both ingress.hosts and ingress.host are unset to avoid generating an invalid Ingress.

If ingress.enabled is true but both ingress.hosts and ingress.host are unset, $hosts becomes an empty list, so the tls.hosts and rules ranges render nothing and the Ingress is invalid and rejected by Kubernetes. Add a guard to ensure at least one host (e.g. required on ingress.host when ingress.hosts is empty) or fail fast with a template error when $hosts is empty.

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