serverless / serverless-kubeless

This plugin enables support for Kubeless within the Serverless Framework.
Apache License 2.0
303 stars 81 forks source link

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

Open ianserlin opened 6 years ago

ianserlin commented 6 years ago

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"
andresmgot commented 6 years ago

👍 thank you for working on that