Skip to content

Update common chart templates to pass config as CLI flags instead of env vars #1243

@nexus49

Description

@nexus49

Context

platform-mesh/golang-commons#164 replaces the viper-based config system with explicit pflag registration. This removes AutomaticEnv() support, meaning environment variables are no longer automatically mapped to config fields.

Problem

The common chart templates currently inject configuration via environment variables that operators previously consumed through viper:

  • _deploymentHelpers.tpl — injects COLLECTOR_SERVICE_NAME, COLLECTOR_SERVICE_VERSION, COLLECTOR_ENDPOINT

After the golang-commons change, these env vars will be silently ignored, breaking tracing collector config in all deployed operators.

Required Changes

Update the common chart templates to pass these values as CLI args:

args:
  - --tracing-config-service-name=$(COLLECTOR_SERVICE_NAME)
  - --tracing-config-service-version=$(COLLECTOR_SERVICE_VERSION)
  - --tracing-config-collector-endpoint=$(COLLECTOR_ENDPOINT)

Sentry DSN will be handled via explicit env var fallback in golang-commons (secrets should not be passed as CLI args).

Related

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