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
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.
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
running service (config re-pulls via
POST /actuator/refresh).testinggroups the instance correctly in the ops console andlets the server serve environment-specific overlays.
Done when
spring-cloud-starter-configon the classpath; the app boots as a config client viaspring.config.import=optional:configserver:<server>. Resolve the server's in-clusteraddress by its service name / an injected env var — don't hardcode a hostname.
testing(e.g.SPRING_PROFILES_ACTIVE=testing) so theserver serves
<app-name>-testingand the instance reports its environment as testing.<app-name>.yml(+ an<app-name>-testing.ymloverlay). Secrets do NOT go in the config repo — keep themin the app's own k8s Secret and inject via env (same split the other services use).
GET /actuator/envshows aconfigserver:<app-name>.ymlproperty source — proves theclient is pulling from the server.
Discovery / notes
or the platform team rather than pinning a host here.
spring.config.importprefixedoptional:so local runs and a brief server outagedon't block startup.