When you configure a setting in more than one place, Omni Gateway uses the first value that is set, in this order of precedence:
-
Policy: A policy applied to the API instance.
-
Runtime Manager runtime configuration or Configuration resource: Used if no policy value is set.
-
Environment variable: Used if no Runtime Manager or Configuration resource value is set.
-
Built-in default: Used if none of the other values is set.
A policy value overrides the gateway-level value for the API instance it’s applied to. API instances without the policy use the gateway-level value.
Runtime Manager runtime configurations and environment variables don’t synchronize. Changing a value in Runtime Manager doesn’t update the corresponding FLEX_* environment variable on the gateway. Because the Runtime Manager value takes precedence, the environment variable has no effect on that setting while the Runtime Manager value is set. For how to verify the effective value, see Environment Variable Synchronization.
Runtime Manager Runtime Configuration and Configuration Resource Priority
To make the Configuration resource value take precedence, add the flex.mulesoft.com/resource-priority label to the Configuration resource with a value of 2 or higher:
apiVersion: gateway.mulesoft.com/v1alpha1
kind: Configuration
metadata:
name: <configuration-name>
labels:
flex.mulesoft.com/resource-priority: "2"
spec:
# configuration values
Omni Gateway assigns these priorities:
-
Runtime Manager runtime configuration: 1
-
Configuration resource without the label, or with a label value that isn’t an integer: 0
-
Configuration resource with the label: the label value
A Configuration resource with a priority of 2 or higher overrides the Runtime Manager runtime configuration values. If you set the Configuration priority to 1, the Runtime Manager runtime configuration values take precedence.