I am trying to understand whats is the difference between BuildConfig and DeploymentConfig?
I need to set some environment vairiables (DB details) to the container and the values should be picked from ConfigMap. So, where should this piece go?
envFrom:
- configMapRef:
name: assetextraction
I suppose it should be in DeploymentConfig, let me know if otherwise and please direct me with sample example that uses Configmap to setup environment variables in DC. Also mention whats the relevant terms in Kubernetes for BC and DC?
First off BuildConfig and DeploymentConfig are OpenShift-specific resource types. DeploymentConfigs were created before Kubernetes Deployments but are similar concept. You would most likely set envVars in the DeploymentConfig. From my example, I have:
From the command line you can use
oc set envcommand and it will make the changes to an existing deployment for you.You can find further information on usage in the chapter 'Configuration and Secrets' of the free eBook Deploying to OpenShift.