Skip to content

feat(deploy-ocpp-gateway): add optional infra-portal-context input#296

Draft
tobias0106 wants to merge 1 commit into
mainfrom
chore/deploy-ocpp-gateway-context-input
Draft

feat(deploy-ocpp-gateway): add optional infra-portal-context input#296
tobias0106 wants to merge 1 commit into
mainfrom
chore/deploy-ocpp-gateway-context-input

Conversation

@tobias0106

Copy link
Copy Markdown
Contributor

Summary

The deploy-ocpp-gateway composite action builds the infra-portal releaser URL with a hardcoded context segment:

{host}{path_prefix}/ocpp-${cluster}/{service-identifier}-{stage}/create-gateway-release

OCPP gateway staging has moved to the main-staging cluster (image + ArgoCD already migrated via service-ocpp#2978), but the blue/green releaser call still drives the old ocpp-staging context.

This adds an optional infra-portal-context input:

  • when provided → used as the context segment
  • when omitted → falls back to ocpp-${cluster} (existing behavior, so production and any other caller are unchanged)

Also echoes the final URL in the job log for verification.

URL rendering (tested)

Caller URL
staging + infra-portal-context: main-staging https://infra-portal.internal.monta.app/api/public/main-staging/ocpp-gateway-staging/create-gateway-release
staging, no input (today) https://infra-portal.internal.monta.app/api/public/ocpp-staging/ocpp-gateway-staging/create-gateway-release
production, no input https://infra-portal.monta.app/ocpp-production/ocpp-gateway-production/create-gateway-release

The /api/public/:context/:namespace/create-gateway-release route in infra-portal authenticates with a static token (context-independent) and resolves :context to a kubeconfig — main-staging is already a known context there.

Follow-up

service-ocpp deploy-gateway-staging.yml will pass infra-portal-context: "main-staging" and bump its pinned action SHA (separate PR, depends on this one's merge SHA). Production workflow stays untouched.

Part of the ocpp-staging cluster decommission.

🤖 Generated with Claude Code

The releaser URL hardcodes the context segment as ocpp-${cluster}, which
breaks when a gateway moves to a different cluster: OCPP gateway staging
now runs on main-staging, but the blue/green releaser call still targets
the ocpp-staging context.

Adds an optional infra-portal-context input used as the context segment
when provided, falling back to the existing ocpp-${cluster} derivation —
behavior for all current callers (including production) is unchanged.
Also logs the final URL for easier verification.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant