Add or override environment variables

Oftentimes, while developing a service, you might need to add an environment variable or update an existing one.

Velocity enables you to add or update environment variables for services running in Kubernetes directly from your IDE. This saves you the effort of having to update your Kubernetes Deployment definition and redeploy manually.

With Velocity you can:

  • add environment variables into the configuration directly, or

  • create and manage an env file

Add env vars

  1. Navigate to Edit Configurations... ; for the relevant configuration, click the Target tab.

  2. Click + to add the relevant variable to the Environment variables table, similar to the following:

  3. Click Apply to save your changes.

Use an .env file

Following is the structure for an .env file for Velocity:

# Application Configuration

# Database Configuration

To add an env file to your configuration:

  1. Navigate to Edit Configurations... and for the relevant configuration, choose the Target tab.

  2. Choose Use .env file and then click to navigate and add the relevant file:

  3. Click Apply to save your changes.

Whenever you update the environment file, restart your Velocity session to ensure the changes are applied.

Last updated