Environment Overrides
Last updated
Last updated
You will see all your environments associated with an application under the Environment Overrides
section.
You can customize your Deployment template, ConfigMap, Secrets
in Environment Overrides section to add separate customizations for different environments such as dev, test, integration, prod, etc.
If you want to deploy an application in a non-production environment and then in production environment, once testing is done in the non-production environment, then you do not need to create a new application for production environment. Your existing pipeline(non-production env) will work for both the environments with little customization in your deployment template under Environment overrides
.
In a Non-production environment, you may have specified 100m CPU resources in the deployment template but in the Production environment, you may want to have 500m CPU resources as the traffic on Pods will be higher than traffic on non-production env.
Configuring the Deployment template inside Environment Overrides
for a specific environment will not affect the other environments because Environment Overrides
will configure deployment templates on environment basis. And at the time of deployment, it will always pick the overridden deployment template if any.
If there are no overrides specified for an environment in the Environment Overrides
section, the deployment template will be the one you specified in the deployment template section
of the app creation.
(Note: This example is meant only for a representational purpose. You can choose to add any customizations you want in your deployment templates in the Environment Overrides
tab)
Any changes in the configuration will not be added to the template, instead, it will make a copy of the template and lets you customize it for each particular environment. And now this overridden template will be used only for the specified Environment.
This will save you the trouble to manually create deployment files separately for each environment. Instead, all you have to do is to change the required variables in the deployment template.
Users need to have Admin role or above (along with access to the environment and applications) to change perform environment override.
Go to App Configuration → Environment Overrides. For each environment you can override the following configurations:
Users who are not super-admins will land on Basic (GUI) section when they visit the Deployment Template page; whereas super-admins will land on Advanced (YAML) section. This is just a default behavior, they can still navigate to the other section if needed.
If you have a base deployment configuration set up at application level, the environment(s) you define for your application will also inherit those values.
However, you have the flexibility to use different values at the environment level by overriding the base configurations as shown below.
Refer basic configuration to know more about each field within Basic (GUI)
section.
Refer Customize Basic GUI to know the process of adding, removing, and customizing the Basic (GUI) section.
Similarly, if you are an advanced user intending to tweak more values in deployment template, you may go to Advanced (YAML)
section and edit them.
Click here to know more about each key-value pair within the Advanced (YAML)
section.
Delete Override will discard the current overrides and the base deployment configuration will be applicable again to the environment.
The same goes for ConfigMap
and Secrets
. You can also create an environment-specific configmap and Secrets inside the Environment override
section.
If you want to configure your ConfigMap and secrets at the application level then you can provide them in ConfigMaps and Secrets, but if you want to have environment-specific ConfigMap and secrets then provide them under the Environment override Section. At the time of deployment, it will pick both of them and provide them inside your cluster.
To update a ConfigMap, follow the steps below:
In your environment, click ConfigMaps.
Click the ConfigMap you wish to update.
Click Allow Override.
Edit your ConfigMap.
Click Save Changes.
Similarly, you can update Secrets too as shown below.