Environment Overrides

You can view all environments associated with an application under the Environment Overrides section.

Figure 1: Environment Overrides Section

The Environment Overrides section allows you to customize the Deployment Template, ConfigMaps, and Secrets for different environments such as development, testing, staging, and production.

How it works

  • When you add a deployment pipeline to an application's workflow, each environment configuration initially inherits the Deployment Template, ConfigMap and Secret from the Base Configurations of the application.

  • The Environment Overrides section lets you customize those Deployment Template, ConfigMap and Secret per environment without affecting those of other environments. For example, in a non-production environment, you might allocate 100m CPU, while in production, you may increase it to 500m to handle higher traffic.


Environment Configurations Page

Who Can Perform This Action?

  1. In your application, go to ConfigurationsEnvironment Overrides.

    Figure 2: Accessing Environment Overrides
  2. Select an environment whose configurations you wish to modify.

    Figure 3: Selecting Environment
  3. You will get the following options (similar to the Base Configurations page):

    Figure 4: Configuration Options

Let's visit each of the configuration files and see how to override their values for the selected environment (say banking-final).


Override Deployment Template

As you can see, the Deployment Template for the banking-final environment shows 3 tabs:

  • Inherited

  • No override or Override

  • Dry run

  1. Go to the Inherited tab. This will show the inherited configuration in a read-only YAML editor. You cannot edit any values here.

    Figure 5: Inherited Deployment Template
  2. Clicking No override to override the inherited configuration (if not done already).

    Figure 6: No Override Tab
  3. Click the Create Override button.

    Figure 7: Creat Override Button
  4. In the same tab (now labelled as Override), you can choose any one mode for changing the configuration values:

    • YAML - This mode has a YAML based editor intended for advanced users. Click here to know more about each key-value pair within the YAML section.

    • GUI - This mode has a user-friendly interface intended for beginner to advanced users. Click here to know more about each field within the GUI section.

Note

Users who are not super-admins will land on GUI mode when they override; whereas super-admins will land on YAML mode. This is just the default behavior, users can still toggle the mode if needed.

Let's choose YAML mode for now and proceed. If you prefer GUI mode, go to Override Deployment Template using GUI section.

  1. You can override the values using any merge strategy:

Using Patch Strategy

Suppose you want to update only one field (e.g., "username" = "johndoe") in a deployment template. Using the patch strategy, you can just update the field to "username" = "mathew". All other fields in the deployment template will remain unchanged.

  • Only the fields you explicitly specify are updated.

  • The patched template will continue to depend on the base configuration, so all other inherited fields remain unchanged and will continue to inherit in future.

  • Best for minor edits.

Field
Inherited Configuration
Input (with Patch)
Final Configuration

cpu

100m

500m

500m

memory

256Mi

(Not specified)

256Mi (Unchanged)

replicas

2

(Not specified)

2 (Unchanged)

logLevel

"info"

(Not specified)

"info" (Unchanged)

timeout

(Not specified)

30s

30s (Added)

If you know the fields you wish to change, simply enter the changed key-value fields along with indentation (if any).

Using Replace Strategy

Suppose you update your deployment chart version (e.g., from 4.0.0 to 4.0.1). Although the new chart version contains new features and key-value pairs, if you prefer to keep a few configurations unchanged regardless of the new key-value pairs added in the new chart version, you can use the replace strategy.

  • The entire configuration is replaced with your new environment-specific settings.

  • The replaced template will no longer depend or inherit from base configuration anymore.

  • Best for a complete override.

Field
Inherited Configuration
Input (with Replace)
Final Configuration

cpu

100m

500m

500m

memory

256Mi

512Mi

512Mi

replicas

2

(Not specified)

(Removed)

logLevel

"info"

(Not specified)

(Removed)

timeout

(Not specified)

30s

30s (Added)

What if some keys are locked from editing?

You cannot modify locked keys in an environment's deployment template unless you are a super-admin. Refer Lock Deployment Configuration to know more.

Override Deployment Template using GUI

Want to customize the deployment template values displayed on GUI?

The GUI mode shows limited number of fields as specified by the super-admin in the GUI schema. Refer Customize GUI to know more.


Override ConfigMap & Secret

If you want to configure your ConfigMap and Secret at the application-level then you can provide them in ConfigMaps and Secrets, but if you want to have environment-specific ConfigMap and Secret, use Environment Override to create them. At the time of deployment, it will pick both of them and pass them to your cluster.

The process to override both ConfigMaps and Secrets is similar to Override Deployment Template. Refer the tutorials below to know the process in YAML mode. In case you wish to use GUI mode, skip to Overriding in GUI mode.

Patch Strategy

Impact of Patch strategy on Base Configuration's CM/Secret?

You cannot delete a ConfigMap or Secret in Base Configurations if you have used 'Patch' strategy for overridding ConfigMap or Secret at your environment-level. This happens because they are still dependent and inheriting their values from Base Configurations.

Replace Strategy

Override ConfigMaps and Secrets using GUI


Delete Override

This action will discard the current overrides and the base configuration file (in this example, deployment template) will be restored back for the environment.

  1. On the right side, click the kebab menu (3 vertical dots).

  2. Click Delete Override.

  3. Confirm the deletion in the dialogbox.

Figure 8: Delete Override Option

Protected Environment Configurations

Any changes made to the protected environment configurations (Deployment Template, ConfigMap, Secret) will require approval if an approval policy is enforced. When you want to edit a protected configuration, you can do it in the following ways:

  • Normal Edit - Where changes to the protected configuration are made only after getting approval from the approver(s).

  • Express Edit - Where you bypass the approval process and directly make changes to the protected configuration.

Normal Edit

Who Can Perform This Action?

Follow the below steps to edit a protected configuration:

  1. Navigate to the Applications page and click on your preferred application.

  2. Go to the ConfigurationsBase Configurations.

  3. Click on your preferred configuration (e.g., ConfigMaps) and select the ConfigMap you'd like to edit.

  4. Modify the values either by using GUI or YAML editor.

  5. Click Save Changes. The Base Configurations pop-up page will be displayed.

    • Save as draft - Select this option if you want to continue making your changes later but save your changes as a draft for now.

    • Propose changes - Select this option if you want to propose your changes to the approvers. You can then select the approvers to get notified regarding the change from the Select approvers to notify drop-down box.

  6. Enter your comments (reason for making the changes) in the Comment text box.

  7. Click Propose Changes. The corresponding approver will be notified via email regarding your request.

Express Edit

Who Can Perform This Action?

Express edits allow you to bypass the approval process and make direct edits to the configurations. Follow the below steps to make express edits:

  1. Navigate to the Applications page and click on your preferred application.

  2. Go to the ConfigurationsBase Configurations.

  3. Click on your preferred configuration (e.g., ConfigMaps) and select the ConfigMap you'd like to edit.

  4. Click on the Edit button.

Note

The Edit button will only be displayed if:

  • You are a Super-Admin and the Super admins toggle is enabled in the Approval Policy page

  • You are added as an exception in the Approval Policy page.

Refer to Approval Policy for more information.

  1. Modify the values either by using GUI or YAML editor.

  2. Click on Publish Changes to direcly publish your changes.

Figure 9: Express Edit

Last updated

Was this helpful?