Skip to content

feat(deploy-ocpp-gateway): allow overriding infra-portal host and path prefix - #329

Merged
tobias0106 merged 1 commit into
mainfrom
feat/deploy-ocpp-gateway-portal-overrides
Aug 21, 2026
Merged

feat(deploy-ocpp-gateway): allow overriding infra-portal host and path prefix#329
tobias0106 merged 1 commit into
mainfrom
feat/deploy-ocpp-gateway-portal-overrides

Conversation

@tobias0106

@tobias0106 tobias0106 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What

Two new optional inputs on the deploy-ocpp-gateway composite action, both defaulting to '':

input default behaviour when empty
infra-portal-hostname infra-portal.internal.monta.app for dev/staging, infra-portal.monta.app otherwise
infra-portal-path-prefix /api/public for dev/staging, empty otherwise

Empty = today's stage-derived logic, unchanged.

Why

Today host and path prefix are both derived from stage, and stage cannot be changed — it also builds the namespace segment of the URL (${service-identifier}-${stage} must equal the k8s namespace) and feeds the manifest paths. So a production-stage release is hard-wired to:

https://infra-portal.monta.app/<context>/<ns>/create-gateway-release

which is the legacy releaser. That one only speaks ALB Ingress — getTrafficWeightsFromIngress does a plain Ingresses(ns).Get() with no IsNotFound fallback (api/legacy/internal/ocpp-gateway-rollout/Helper.go:481-489). The gateway on main-production runs ingress.enabled: false behind Envoy Gateway API, so the release aborts.

The v2 releaser handles HTTPRoute weights, but it lives only on the internal portal and registers at /api/public/... (api/core/internal/ocppgatewayreleaser/routes.go:25). Reaching it from a production stage needs both a different host and a different prefix — hence two inputs rather than one.

Compatibility

gh api "search/code?q=org:monta-app+deploy-ocpp-gateway" returns three hits: service-ocpp's deploy-gateway-staging.yml and deploy-gateway-production.yml, plus this action's own README. Neither caller passes the new inputs, so both keep their exact current URLs.

Consumer PR: monta-app/service-ocpp#3077

Follow-ups, deliberately not in this PR

  • The README still claims the staging host is infra-portal.staging.monta.app and doesn't document infra-portal-context.
  • infra-portal-token is interpolated straight into the curl argv. It is masked in logs but lands in the process argument list. Moving it (and github.sha) into an env: block would be a cheap hardening win.

…h prefix

Adds optional `infra-portal-hostname` and `infra-portal-path-prefix`
inputs. Both default to empty, which keeps the existing stage-derived
behaviour byte-for-byte for every current caller.

Needed so a production-stage release can target the v2 releaser on the
internal portal, which is the only one that speaks HTTPRoute.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tobias0106
tobias0106 requested a review from a team as a code owner August 20, 2026 14:28
@tobias0106
tobias0106 requested review from chandrashekar-dhar and removed request for a team August 20, 2026 14:28
@tobias0106
tobias0106 merged commit 2990883 into main Aug 21, 2026
2 checks passed
@tobias0106
tobias0106 deleted the feat/deploy-ocpp-gateway-portal-overrides branch August 21, 2026 09:21
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