Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
This repository was archived by the owner on Nov 20, 2023. It is now read-only.

Support replacement tokens in environment variables #377

@davidfowl

Description

@davidfowl

This is a sample of an application that has an opiniated view of what env variables to use for ports. It wants to reference the tye's generated ports in the env variables (see below for an example).

name: cornflake
 
services:
  - name: cornflake
    replicas: 3
    project: cornflake/cornflake.csproj
    bindings:
    - name: gateway
      port: 11111
    - name: silo
      port: 30000
    - name: web
      port: 5000
    env:
     - name: ENV_SILO_PORT
       value: ${service:cornflake:silo:port}
     - name: ENV_GATEWAY_PORT
       value: ${service:cornflake:gateway:port}

This brings up one interesting challenge:

  • What happens if an env var references another env var? That brings environment variable resolution order into the problem space (with cycles etc). We should disallow this for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions