Skip to content

Order of LAGOON_ROUTE variable precedence with active/standby switch ignores API values. #4052

Description

@GROwen

Describe the bug

Active/standby switch sets the value the environment variable LAGOON_ROUTE to the auto-generated route even when the value has been set for a projects environment in the API.

To Reproduce

  1. enable active/standby for a project
  2. set LAGOON_ROUTE for the production and standby environments via the CLI/API
  3. trigger an active/standby switch
  4. deploy the production environment
  5. trigger an active/standby switch

Expected behavior

If a project has the LAGOON_ROUTE variable set for an environment in Lagoon’s API that value is set in the lagoon-env secrets for the namespace and consequently injected into the containers as part of build-deploy.

Actual behaviour

The auto-gen route is set in the lagoon-env secrets object.

Additional context

When an active/standby switch occurs the production ingress object defined in .lagoon.yml is moved to the standby environment.

We utilise this feature to then execute a deployment of the production environment that includes post-deployment steps which rely on the value before triggering the active/standby switch again to return the ingress object back to the production environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions