Skip to content

fix(mozcloud): Allow frontendConfig redirect overrides (remove default hardcode http>https redirect)#290

Merged
steveprokopienko merged 5 commits into
mainfrom
MZCLD-3359
Jun 23, 2026
Merged

fix(mozcloud): Allow frontendConfig redirect overrides (remove default hardcode http>https redirect)#290
steveprokopienko merged 5 commits into
mainfrom
MZCLD-3359

Conversation

@steveprokopienko

@steveprokopienko steveprokopienko commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

What

Adds per-host frontendConfig overrides to mozcloud so tenants can set
redirectToHttps.enabled, redirectToHttps.responseCodeName, and sslPolicy
on individual hosts. Defaults are unchanged — tenants who don't specify these options see no behavior change.

Two bugs prevented the override capability the library already mentioned from
actually working:

  1. mozcloud-ingress-lib treats false as "unset" and returns the default. Any explicit "enabled: false" was silently coerced back to true. Fixed by detecting explicit values via hasKey.
  2. Parent chart never plumbed overrides — mozcloud-application hardcoded the redirect and SSL policy fields and passed them to the lib unconditionally. The user-facing hosts..frontendConfig field didn't exist in the schema. Fixed by reading the override from the host config and passing it through.

Surfaced while migrating bouncer prod (MZCLD-2307), which intentionally serves HTTP directly without an LB-side redirect and needs to maintain that legacy behavior.

When redirectToHttps.enabled: false, responseCodeName is omitted from the rendered spec (matches the legacy chart shape so migrations get a byte-identical FrontendConfig).

Also drops the deprecated --verify=false flag from the helm-unittest install in CI / Makefile (it was removed in helm 3.13+ and was breaking the unit-test job).

Related Tickets & Documents

@steveprokopienko steveprokopienko requested a review from a team as a code owner June 23, 2026 14:51
@mozcloud-release-bot mozcloud-release-bot Bot added the patch A bug fix or non-functional change. label Jun 23, 2026
@mozcloud-release-bot

mozcloud-release-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

Chart Version Preview

The following charts will be bumped when this PR is merged:

Chart Current Version New Version Release Type
mozcloud 3.4.0 3.4.1 patch
mozcloud-ingress 3.0.0 3.0.1 patch
mozcloud-ingress-lib 3.0.0 3.0.1 patch

Apply patch, minor, major, or no-release label to override the release type.

…t hardcode http>https redirect); remove deprecated flag from unit test
…t hardcode http>https redirect); bumping chart version
…t hardcode http>https redirect); bumping chart version in README files

@grahamalama grahamalama left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you provide:

  • a description for this PR -- what's changing and why?
  • some documentation for how to add this config. Don't know the best place for that at the moment. Perhaps commented out in a values.yaml file if there's no better place?

Comment thread .github/workflows/unit-tests.yaml
Comment thread Makefile
Comment thread mozcloud/application/README.md Outdated
# mozcloud

![Version: 3.4.0](https://img.shields.io/badge/Version-3.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 3.5.0](https://img.shields.io/badge/Version-3.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm pretty sure you want to remove these chart bump changes in the READMEs and charts themselves and let the automated release process handle that.

Addresses PR feedback:

- Reverts chart-version bumps and helm-docs README regenerations on
  the three touched charts (mozcloud, mozcloud-ingress-lib,
  mozcloud-ingress). The repo's automated release process handles
  version bumps and README regeneration; doing it manually conflicts
  with that flow.

- Adds a commented-out frontendConfig example block to
  mozcloud/application/values.yaml under the host configuration,
  between the existing tls and options blocks. Documents when to
  use the field (migration support, not new applications), the
  defaults that apply when unset, and the special case where
  responseCodeName is omitted from the render when redirect is
  disabled.

@grahamalama grahamalama left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚢

@steveprokopienko steveprokopienko added this pull request to the merge queue Jun 23, 2026
Merged via the queue into main with commit 276d4aa Jun 23, 2026
6 checks passed
@steveprokopienko steveprokopienko deleted the MZCLD-3359 branch June 23, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch A bug fix or non-functional change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants