- Organization variables apply to every session in your organization. Only users with the admin role can manage them.
- Personal variables apply only to sessions you own.
Add a variable
- Go to Settings → User → Sessions for a personal variable. For an organization variable, go to Settings → Organization → Sessions.
- In the Environment Variables section, select Add Variable.
- Enter a Key and a Value.
- Toggle Secret on if the value is sensitive.
- Select Save.
Override an organization variable
Your personal Sessions page marks organization variables with a building icon. You can’t edit or remove them there, but you can replace them with your own value in your sessions.- To set your own value, select Create Override (pencil icon) next to the organization variable. Cake opens the variable for editing with the key already filled in. Enter your value and select Save.
- To set the variable to an empty string in your sessions, select Create empty override (eraser icon). Cake saves a personal variable with the same key and an empty value.
Import variables from a .env file
- In the Environment Variables section, select Import.
- Paste the contents of your
.envfile, then select Import. - Review the parsed keys and values. Remove any you don’t want, and mark sensitive values as Secret.
- Select Save.
.env
Secret variables
Cake hides secret values once you save them. You can’t view a secret value in the UI again, but you can replace it with a new value. Secret and non-secret variables reach the session the same way. Cake sends them to the session over an authenticated internal connection when the session container starts. Values aren’t stored in the Kubernetes pod spec or in any volume that outlives the pod.When changes take effect
Cake loads your variables each time a session container starts. New sessions get your current variables. A running session keeps the variables it started with until its container restarts.Reserved names
Cake sets the following variables itself and ignores any variable you add with these names:CAKE_SERVICE_ACCOUNT_TOKEN_FILECAKE_AUTH_PROXY_PORTCONTROL_PLANE_URLSESSION_IDCAKE_VOLUME_AUTOSCALING_ENABLED