okteto / remote-kubernetes

Remote Kubernetes Development in VS Code with Okteto
Apache License 2.0
74 stars 15 forks source link

Environment variables are not being honored by extension #236

Open pisymbol opened 11 months ago

pisymbol commented 11 months ago

Describe the bug I have defined a .env file with name=value pairs that should be interpolated before up, down, operations. They work under okteto CLI but not through the vscode extension.

To Reproduce Steps to reproduce the behavior:

  1. Create a .env file with OKTETO_NAMESPACE=foobar
  2. Create an okteto 2.0 manitest and use the namespace: "${OKTETO_NAMESPACE}
  3. Try to do an env up or down via vscode (okteto up and okteto down work on the command line)
  4. See error with something like Okteto down failed: Using ${OKTETO_NAMESPACE} ... and complains about permissions errors because it is trying to deploy to the wrong namespace (the string literal).

Expected behavior The .env file should be evaluated BEFORE okteto actions.

Desktop (please complete the following information):

Additional context More issues, if I try to use an interpolated string in a command block it looks like it doesn't get evaluated either which is unfortunate becausae I have an entrypoint.sh file that does some post up setup (the Docker image is fixed and can not be changed).