Daniel Popowich
10/09/2025, 1:20 PMabctl for testing. I have runtime features I would like to turn on/off during testing without having to rebuild my image. How do I set (and later change) an arbitrary environment variable for my connector. For example, I can run a source connector image from my command-line like this:
docker run --rm $MYIMAGE spec
But if I want to turn on a custom feature I could do this:
docker run --rm -e MYCUSTOMENV=true $MYIMAGE spec
How do I do this while running in the abctl (kind) environment?kapa.ai
10/09/2025, 1:20 PMabctl (which uses a kind Kubernetes cluster), there is no built-in, out-of-the-box way to set arbitrary environment variables for a specific connector at runtime via the Airbyte UI or abctl commands, similar to how you would with docker run -e .... The official documentation and community discussions confirm this limitation. Current Workarounds: - Hardcoding in Dockerfile: The most common workaround is to hardcode environment variables in your connector's Dockerfile. This is not ideal for toggling features during testing, as it requires rebuilding the image for each change. This approach is mentioned as the best available method if the variable is constant for the source, but not if you want to change it frequently without rebuilding the image [Assigning Environment Variables to Custom Sources](https://discuss.airbyte.io/t/1861). - Spec Configuration: If the variable is meant to be user-configurable, you can add it to your connector's spec.json and pass it as part of the connector configuration. However, you mentioned you do not want this exposed to users, so this may not be suitable for your use case [Passing env variables / secrets into a custom connector](https://discuss.airbyte.io/t/986). - No Out-of-the-Box Solution: Both the documentation and forum posts confirm that there is currently no out-of-the-box solution for injecting arbitrary environment variables into connector containers at runtime in the `abctl`/kind environment. The recommended approach is to open a feature request if this is a critical need for your workflow [Assigning Environment Variables to Custom Sources](https://discuss.airbyte.io/t/1861), [Passing env variables / secrets into a custom connector](https://discuss.airbyte.io/t/986). Summary: You cannot dynamically set or change arbitrary environment variables for a connector at runtime in the `abctl`/kind environment without rebuilding your connector image or exposing the variable in the connector spec. If this is a critical feature for your development workflow, consider raising a feature request with the Airbyte team. If you are running connector acceptance tests, you can set custom environment variables in the test configuration, but this does not apply to normal Airbyte runtime operation—only to the test runner context [Acceptance Tests Reference](https://docs.airbyte.com/platform/connector-development/testing-connectors/connector-acceptance-tests-reference#custom-environment-variable). If you need more advanced control, you may need to modify the Airbyte deployment or connector orchestration logic, but this is not supported out of the box.kapa.ai
10/09/2025, 1:20 PMkapa.ai
10/09/2025, 1:21 PMabctl (kind) environment, similar to how you would with docker run -e .... The official documentation and community forum confirm this limitation. The main approaches available are: - Hardcoding in Dockerfile: The most common workaround is to hardcode environment variables in your connector's Dockerfile. This is not ideal for toggling features during testing, as it requires rebuilding the image for each change. This approach is acknowledged as the best available method if the variable is constant for the source, but not if you want to change it frequently without rebuilding the image [Assigning Environment Variables to Custom Sources](https://discuss.airbyte.io/t/1861). - Spec Configuration: If the variable is meant to be user-configurable, you can add it to your connector's spec.json and pass it as part of the connector configuration. However, you mentioned you do not want this exposed to users, so this may not be suitable for your use case [Passing env variables / secrets into a custom connector](https://discuss.airbyte.io/t/986). - Acceptance Tests Only: If you are running connector acceptance tests, you can set custom environment variables in the test configuration using the custom_environment_variables field, but this does not apply to normal Airbyte runtime operation—only to the test runner context: yaml connector_image: "airbyte/source-pokeapi" custom_environment_variables: MYCUSTOMENV: true [Acceptance Tests Reference](https://docs.airbyte.com/platform/connector-development/testing-connectors/connector-acceptance-tests-reference#custom-environment-variable) Summary: You cannot dynamically set or change arbitrary environment variables for a connector at runtime in the `abctl`/kind environment without rebuilding your connector image or exposing the variable in the connector spec. If this is a critical feature for your development workflow, consider raising a feature request with the Airbyte team. If you need more advanced control, you may need to modify the Airbyte deployment or connector orchestration logic, but this is not supported out of the box.