serverless-kubeless icon indicating copy to clipboard operation
serverless-kubeless copied to clipboard

[WIP] Nodejs provider-level environment variables aren't propagated

Open ianserlin opened this issue 7 years ago • 1 comments

WIP while I work to fix the issue, but noting it here in case it's already in-progress somewhere else.

Versions serverless-kubeless: 0.4.2 kubeless: 1.0.0-alpha.3

Runtime minikube: 0.27.0

Expected: environment variables specified at either the provider or function level are available to the deployed function at runtime.

Actual: only environment variables specified at the function level are available to the deployed function at runtime.

For example...

TEST_FUNCTION_VARIABLE will be available to the deployed function at runtime. TEST_PROVIDER_VARIABLE will not be available to the deployed function at runtime.

service: gql

plugins:
  - serverless-kubeless

provider:
  name: kubeless
  runtime: nodejs8
  environment:
    TEST_PROVIDER_VARIABLE: "bluto"

functions:
  example:
    handler: handlers.example
    timeout: 300
    events:
      - http:
          path: example
    environment:
      TEST_FUNCTION_VARIABLE: "popeye"

ianserlin avatar May 29 '18 05:05 ianserlin

👍 thank you for working on that

andresmgot avatar May 29 '18 07:05 andresmgot