Say you have a service S. This service generates an RPM as part of it's build process. The RPM is then used during the spinnaker Bake step to create an AMI suitable for deployment into AWS.
What is the best practice for providing service S with tier specific configuration? (db passwords, db urls etc)
In docker this is solved by injecting environment variables at runtime that the service then reads. Is there an similar process in Spinnaker?
We do this by injecting UserData at launch that lets the instance know what tier it is in.
Our apps use a profile aware configuration library, either Archaius or Spring ConfigurableEnvironment so we bake all the configuration into the package that gets baked, and the app bootstraps itself with the correct configuration on startup based on the injected environment variables.