Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

OSAC-1628: Add required externalHostname and internalHostname to umbrella chart - #295

Merged
openshift-merge-bot[bot] merged 1 commit into
osac-project:mainfrom
jhernand:add_required_hostname_parameters_to_umbrella_chart
Jun 18, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
osac-project:mainfrom
jhernand:add_required_hostname_parameters_to_umbrella_chart

Conversation

@jhernand

@jhernand jhernand commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add externalHostname and internalHostname as required parameters in the umbrella chart's
    values, schema, and CI values files. These are needed because the fulfillment-service subchart
    is making them mandatory (see OSAC-1628: Make externalHostname and internalHostname mandatory fulfillment-service#727) since TLS certificates
    must include the correct hostnames.
  • Update the helm-lint and helm-integration CI workflows to supply the hostnames when templating
    with environment values files.
  • Update the deployment guide with instructions on how to determine and set these parameters.

Test plan

  • Verify helm template passes with the updated CI values files.
  • Verify the JSON schema is valid.
  • Verify the deployment guide renders correctly.

Related: https://redhat.atlassian.net/browse/OSAC-1628
Ref: osac-project/fulfillment-service#727

Summary by CodeRabbit

  • New Features

    • Added required externalHostname and internalHostname configuration fields for API service endpoints.
  • Documentation

    • Updated Helm deployment guide with instructions for determining and configuring API hostnames using cluster ingress domains.
  • Chores

    • Updated CI/CD workflows to pass hostname configuration during Helm templating and deployment steps.

…umbrella chart

The fulfillment-service subchart is making `externalHostname` and
`internalHostname` mandatory because TLS certificates must include the
correct hostnames and OpenShift cannot auto-generate Route hosts when
certificates are pre-provisioned. These values cannot be auto-calculated
at template time since the cluster's ingress domain is not available
without cluster access.

Add both parameters to the umbrella chart's default values, example
values, and JSON schema (marked as required with `minLength: 1`).
Populate all CI values files with example hostnames so that linting and
integration workflows continue to pass. Update the helm-lint and
helm-integration workflows to supply dummy hostnames when templating
with environment values files, which intentionally leave the fields
empty for operators to fill at deploy time.

Related: https://redhat.atlassian.net/browse/OSAC-1628
Ref: osac-project/fulfillment-service#727
Assisted-by: Cursor
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
@openshift-ci-robot

openshift-ci-robot commented Jun 18, 2026

Copy link
Copy Markdown

@jhernand: This pull request references OSAC-1628 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add externalHostname and internalHostname as required parameters in the umbrella chart's
    values, schema, and CI values files. These are needed because the fulfillment-service subchart
    is making them mandatory (see OSAC-1628: Make externalHostname and internalHostname mandatory fulfillment-service#727) since TLS certificates
    must include the correct hostnames.
  • Update the helm-lint and helm-integration CI workflows to supply the hostnames when templating
    with environment values files.
  • Update the deployment guide with instructions on how to determine and set these parameters.

Test plan

  • Verify helm template passes with the updated CI values files.
  • Verify the JSON schema is valid.
  • Verify the deployment guide renders correctly.

Related: https://redhat.atlassian.net/browse/OSAC-1628
Ref: osac-project/fulfillment-service#727

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.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Two new required Helm values — service.externalHostname and service.internalHostname — are introduced across the OSAC chart schema, default/example/CI fixture values files, umbrella environment values files, GitHub Actions workflow commands, and the Helm deployment guide.

Changes

Hostname Fields: Schema, Values, CI Fixtures, Workflows, and Docs

Layer / File(s) Summary
Chart schema and values contract
charts/osac/values.schema.json, charts/osac/values.yaml, charts/osac/values-example.yaml
values.schema.json adds externalHostname and internalHostname to service.required with minLength: 1. values.yaml and values-example.yaml declare both fields with empty-string defaults and [REQUIRED] annotations.
CI fixture values files
charts/osac/ci/default-values.yaml, charts/osac/ci/full-values.yaml, charts/osac/ci/no-aap-values.yaml, charts/osac/ci/bundled-postgres-values.yaml
All four CI fixture files receive example hostname values (fulfillment-api.example.com, fulfillment-internal-api.example.com) to satisfy the new required schema fields during chart rendering.
Umbrella environment values files
values/development.yaml, values/caas-ci.yaml, values/vmaas-ci.yaml
Each environment values file gets empty-string placeholder entries for both hostname fields with inline comments describing the expected FQDN patterns.
GitHub Actions workflow commands
.github/workflows/helm-lint.yaml, .github/workflows/helm-integration.yaml
helm template, helm install, and helm upgrade invocations in both workflows are extended with --set service.externalHostname and --set service.internalHostname to satisfy the new required fields in CI.
Deployment guide updates
docs/helm-deployment-guide.md
Marks both hostname fields as required in the settings table, adds a "Determine API Hostnames" subsection with oc commands, and updates all helm template/helm upgrade --install examples (generic, VMaaS, CaaS, Both) to pass hostnames via --set.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • osac-project/osac-installer#98: Established the Helm CI/lint workflows that this PR directly extends with the new --set service.externalHostname and --set service.internalHostname flags.
  • osac-project/osac-installer#229: Modified charts/osac/ci/*-values.yaml and the helm-lint.yaml helm template step in the same area this PR extends with the new hostname fields.
  • osac-project/osac-installer#254: Modified charts/osac/values-example.yaml where this PR adds the service.externalHostname and service.internalHostname documented fields.

Suggested reviewers

  • trewest

Poem

Two hostnames, external and in,
Required fields — the schema wins.
--set them here, --set them there,
The cluster ingress fills the air.
🔗 Routes resolved, no more empty string!

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding required externalHostname and internalHostname parameters to the umbrella chart, which is the core objective reflected across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed No hardcoded secrets detected. PR only adds hostname configuration fields (externalHostname, internalHostname) set to example.com domains and empty defaults, plus workflow updates to pass dummy hos...
No-Weak-Crypto ✅ Passed PR adds hostname configuration parameters to Helm chart via YAML/JSON/Markdown files only; no weak crypto algorithms, custom crypto implementations, or unsafe secret comparisons detected.
No-Injection-Vectors ✅ Passed PR contains no injection vectors: all hostname values are hardcoded strings, Python code uses yaml.safe_load(), no shell=True/eval/exec/pickle/os.system patterns detected.
Container-Privileges ✅ Passed PR adds Helm chart hostname parameters only; no container privilege escalation configurations (privileged, hostPID/Network/IPC, SYS_ADMIN, allowPrivilegeEscalation, or runAsUser: 0) found in any mo...
No-Sensitive-Data-In-Logs ✅ Passed No logging or output in the PR exposes sensitive data. Hostnames are configuration parameters only, not logged; templates don't reference them; workflows suppress output.
Ai-Attribution ✅ Passed Commit includes proper AI attribution with "Assisted-by: Cursor" trailer following Red Hat conventions, correctly crediting AI assistance without misusing Co-Authored-By.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/osac/values.schema.json`:
- Around line 97-108: The externalHostname and internalHostname fields in the
schema only validate minLength: 1, which allows syntactically invalid hostnames
to pass validation and fail later during Route or certificate creation. Add a
pattern property to both externalHostname and internalHostname fields with a
valid hostname regex pattern (RFC-compliant FQDN pattern), and also add a
maxLength property to enforce reasonable hostname length limits. This will catch
invalid hostnames early at schema validation time rather than at deployment
time.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 441dae1c-e47b-4f0c-947c-222ef379b0a0

📥 Commits

Reviewing files that changed from the base of the PR and between 9b711b3 and d681664.

📒 Files selected for processing (13)
  • .github/workflows/helm-integration.yaml
  • .github/workflows/helm-lint.yaml
  • charts/osac/ci/bundled-postgres-values.yaml
  • charts/osac/ci/default-values.yaml
  • charts/osac/ci/full-values.yaml
  • charts/osac/ci/no-aap-values.yaml
  • charts/osac/values-example.yaml
  • charts/osac/values.schema.json
  • charts/osac/values.yaml
  • docs/helm-deployment-guide.md
  • values/caas-ci.yaml
  • values/development.yaml
  • values/vmaas-ci.yaml

Comment on lines +97 to +108
"required": ["externalHostname", "internalHostname", "auth", "certs"],
"properties": {
"externalHostname": {
"type": "string",
"minLength": 1,
"description": "Hostname for the external API Route"
},
"internalHostname": {
"type": "string",
"minLength": 1,
"description": "Hostname for the internal API Route"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Strengthen hostname validation in schema.

minLength: 1 only checks non-empty values, so syntactically invalid hostnames can pass validation and then fail later at Route/certificate creation. Add a hostname pattern (and preferably max length) for both fields.

Proposed fix
         "externalHostname": {
           "type": "string",
           "minLength": 1,
+          "maxLength": 253,
+          "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?)(\\.([a-z0-9]([-a-z0-9]*[a-z0-9])?))*$",
           "description": "Hostname for the external API Route"
         },
         "internalHostname": {
           "type": "string",
           "minLength": 1,
+          "maxLength": 253,
+          "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?)(\\.([a-z0-9]([-a-z0-9]*[a-z0-9])?))*$",
           "description": "Hostname for the internal API Route"
         },
📝 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.

Suggested change
"required": ["externalHostname", "internalHostname", "auth", "certs"],
"properties": {
"externalHostname": {
"type": "string",
"minLength": 1,
"description": "Hostname for the external API Route"
},
"internalHostname": {
"type": "string",
"minLength": 1,
"description": "Hostname for the internal API Route"
},
"required": ["externalHostname", "internalHostname", "auth", "certs"],
"properties": {
"externalHostname": {
"type": "string",
"minLength": 1,
"maxLength": 253,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?)(\\.([a-z0-9]([-a-z0-9]*[a-z0-9])?))*$",
"description": "Hostname for the external API Route"
},
"internalHostname": {
"type": "string",
"minLength": 1,
"maxLength": 253,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?)(\\.([a-z0-9]([-a-z0-9]*[a-z0-9])?))*$",
"description": "Hostname for the internal API Route"
},
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/osac/values.schema.json` around lines 97 - 108, The externalHostname
and internalHostname fields in the schema only validate minLength: 1, which
allows syntactically invalid hostnames to pass validation and fail later during
Route or certificate creation. Add a pattern property to both externalHostname
and internalHostname fields with a valid hostname regex pattern (RFC-compliant
FQDN pattern), and also add a maxLength property to enforce reasonable hostname
length limits. This will catch invalid hostnames early at schema validation time
rather than at deployment time.

@openshift-ci

openshift-ci Bot commented Jun 18, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adriengentil, jhernand

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [adriengentil,jhernand]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 7c7ad9e into osac-project:main Jun 18, 2026
9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants