Skip to content

Adopt the lab central config server (config client) + set environment=testing #463

Description

@alexmond

What

Move this app's runtime configuration out of the image/chart into the lab's central
Spring Cloud Config Server — i.e. make the app a config client — and set its
active environment/profile to testing.

Why

  • One place to retune every lab Boot app; no rebuild/redeploy to change a value on a
    running service (config re-pulls via POST /actuator/refresh).
  • Consistent with the other lab services, which already source their config centrally.
  • Marking the environment testing groups the instance correctly in the ops console and
    lets the server serve environment-specific overlays.

Done when

  • spring-cloud-starter-config on the classpath; the app boots as a config client via
    spring.config.import=optional:configserver:<server>. Resolve the server's in-cluster
    address by its service name / an injected env var — don't hardcode a hostname.
  • Active profile/environment is testing (e.g. SPRING_PROFILES_ACTIVE=testing) so the
    server serves <app-name>-testing and the instance reports its environment as testing.
  • App config lives in the central config repo as <app-name>.yml (+ an
    <app-name>-testing.yml overlay). Secrets do NOT go in the config repo — keep them
    in the app's own k8s Secret and inject via env (same split the other services use).
  • GET /actuator/env shows a configserver:<app-name>.yml property source — proves the
    client is pulling from the server.

Discovery / notes

  • The config server already runs in the cluster; find its coordinates via service discovery
    or the platform team rather than pinning a host here.
  • Keep spring.config.import prefixed optional: so local runs and a brief server outage
    don't block startup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions