Override a Service Configuration in an Environment
In a Harness Environment's Service Configuration Overrides section, you can override the settings of the Services that are deployed to that Environment.
This enables a Service to keep its settings but have them changed when deployed to an Environment.
You can also create an Environment variable or file that can be used by any Workflow but is not related to a Service-level setting. See Create Environment-level Variables and Files for All Services.
Before You Begin
Limitations
- You cannot use an empty string in an override.
Review: Override Type Options
- From the Environment, go to the Service Configuration Overrides section, and click Add Configuration Overrides. The Service Configuration Override settings appear.
- In Service, select the Service you want to override.
- Select one of the Override Type options:
File Override
Variable Override
Values YAML
Option 1: File Override
In Override Type, select File Override.
In Relative File Path, select the file to overwrite from the Service's Config Files.
Select the Encrypt File checkbox, to overwrite the Service's Config File using an existing encrypted file from Harness Secrets Management.
You can select the encrypted file from the drop-down menu or Add New Encrypt File. For more information on adding new encrypt file, see Use Encrypted File Secrets.
If you do not select the Encrypt File option, then choose the File to overwrite the Service's Config Files and click Submit.
Make sure you have the update permission on the Environment before you try to add the Service Config File. See Managing Users and Groups (RBAC) for more information about assigning permissions.
Option 2: Variable Override
In Override Type, select Variable Override. The Variable Override options appear.
In Configuration Variable, select the variable from the Service's Config Variables to overwrite.
In Type, select Text or Encrypted Text.
In Override Value, enter the value to overwrite the variable value in the Service. If you selected Encrypted Text in Type, you can select an Encrypted Text values defined in Secrets Management and click Submit.
Platform-Specific Options
- For Kubernetes, Helm charts, and OpenShift, see Override Harness Kubernetes Service Settings.
- For PCF, see PCF Manifests Override.