question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Leverage Env Vars in YML Files

See original GitHub issue

The YML files are great for checking configuration into source control, but some information (like the Schema Registry URLs and bootstrap servers, for example) I’d rather keep out of source control and set with environment variables similar to Docker Compose.

default.yml

runners:
    default: "local"
    config:
        lambda:
            deploy: null
            credentials:
                type: "default"
            awsRegion: null
            enabled: false
        kubernetes:
            namespace: "default"
            context: null
            deletePodAfterCompletion: true
            cpu: "1"
            memory: "512M"
            timeoutMs: 300000
            image:
                registry: "docker.io"
                image: "adevinta/zoe-core"
                tag: null
        local:
            enabled: true
storage: null
secrets: null
expressions: {}
clusters:
    default:
        registry: ${SCHEMA_REGISTRY}
        props:
            bootstrap.servers: ${BOOTSTRAP_SERVERS}
            key.deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
            value.deserializer: "io.confluent.kafka.serializers.KafkaAvroDeserializer"
            key.serializer: "org.apache.kafka.common.serialization.StringSerializer"
            value.serializer: "io.confluent.kafka.serializers.KafkaAvroSerializer"
        groups: {}
        topics:
            topic1:
                name: topic1-long-name

default.env

SCHEMA_REGISTRY=http://localhost:8081
BOOTSTRAP_SERVERS=localhost:9092

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wlezzarcommented, Aug 6, 2020

Hi @rsaltrelli : ) . Have you checked out this? https://adevinta.github.io/zoe/configuration/chain/ . You can use the ZOE_CONFIG_OVERRIDE environment variable to override part of zoe’s configuration. Does it suit your use case? If not can you explain me in a bit more detail your use case?

0reactions
wlezzarcommented, Aug 7, 2020

@rsaltrelli @G3zz The feature is now available on the latest version v0.26.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using both external and serverless.yml env vars · Issue #4571
I'm trying to use external variables from an external configuration file and internal variables from serverless.yml as environment variables.
Read more >
How to use a YAML file or environment variables to populate ...
In most cases, we suggest using a config variables YAML file. YAML files make variables more visible, easily editable, and allow for modularization...
Read more >
Launching GitHub Actions Environment Variables and Secrets
If you are new to GitHub Actions environmental variables, you may have yet to learn how to store them. But is it possible?...
Read more >
Env File (2022): The Only Guide You'll Need - Onboardbase
As we explained, an env file defines environment variables. Like system environment variables, you can access them from any process.
Read more >
GitLab environment variables demystified
CI/CD variables are useful (and flexible) tools to control jobs and pipelines. We unpack everything you need to know about GitLab ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found