Skip to content

Node.js EurekaClient: interval configuration never read from process.env #4774

Description

@balhar-jakub

Description

The Node.js onboarding enabler EurekaClient merges configuration from four sources:

// EurekaClient.js:116
this.config = merge({}, defaultConfig, defaultYml, envYml, config);
Layer Source
1 defaultConfig.js (hardcoded defaults)
2 eureka-client.yml
3 eureka-client-{env}.yml
4 Constructor config parameter

There is no layer that reads individual properties from process.env. The only process.env access in the entire module is at line 107, used exclusively to select the YAML file suffix:

const env = process.env.EUREKA_ENV || process.env.NODE_ENV || "development";

Impact

Properties like EUREKA_CLIENT_REGISTRYFETCHINTERVALSECONDS and EUREKA_CLIENT_INSTANCEINFOREPLICATIONINTERVALSECONDS are never consumed. This means the Node.js enabler cannot be configured via the standard Zowe pattern of zowe.yaml → environment variable translation. Configuration can only be supplied through YAML files or the programmatic constructor parameter.

Expected behavior

After the YAML layers and before the constructor parameter, a step should read relevant Eureka configuration properties from process.env to allow runtime overrides via environment variables.

Files

  • onboarding-enabler-nodejs/src/EurekaClient.js:116
  • onboarding-enabler-nodejs/src/defaultConfig.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status
    Planned In Future

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions