What are the best practices for deploying different configurations per environment in Kubernetes / OpenShift?

Kubernetes provides a very elegant mechanism for managing the configuration of pods using ConfigMaps. The documentation does not clearly indicate what is the recommended practice for using ConfigMaps to manage different configurations for different environments and to deploy configuration changes as they occur.

Suppose I use a ConfigMap for my pod to set various environment variables or inject cofiguration files into my container. It is obvious that some (or all) of these variables or files must be different depending on the environment in which the pod is deployed.

In an ideal world, I can make configuration changes and deploy them to the pod without rebuilding or redeploying the container image. This implies that these configuration parameters, as well as ConfigMap, should probably be stored in a separate source code repository (otherwise, an image build would be triggered whenever the configuration is changed).

What are the recommended practices for:

  1. the management of different configuration parameters by environment (for example,
    branch separated by environment)

  2. automatically deploy configuration changes when they change under source control, but only in the respective environment