Skip to content

GNMIC_* environment variables are not interpolated in collector mode #833

@amuntean-godaddy

Description

@amuntean-godaddy

Description

When running gnmic in collector mode, environment variables with the GNMIC_* prefix are not interpolated into the configuration.

For example, setting variables such as:
• GNMIC_CLUSTER_NAME
• GNMIC_CLUSTERING_LOCKER_ADDRESS

does not populate or override the corresponding fields in the clustering configuration.

Because of this, the clustering settings must be explicitly defined in the configuration file, as environment variables appear to be ignored in collector mode.

Example configuration:

# General Configuration
log: true

# API Server Configuration
api-server:
  address: :7890
  timeout: 10s
  enable-metrics: true

# Clustering HA Configuration
clustering:
  locker:
    type: consul

Expected behavior

GNMIC_* environment variables should be interpolated into the configuration when running in collector mode, similar to gnmic subscribe mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions