Placement Rules
A Package may have zero or more placement rules defined in it. The rules comprise of selectors that apply to all the applications bundled in the Package during the Deployment planning stage.
Understand how selector operators work on OGC.
Understanding Selector Operators
A selector operator defines the rules to be used when matching an associated selector with Application Labels during deployment.
Value | Multiplicity | Description |
---|---|---|
Exists | 0 | A Label with matching key property must exist, irrespective of its value. |
NotExists | 0 | A Label with matching key property must not exist, irrespective of its value. |
Equals | 1 | A Label with matching key property must have a value property that matches the associated Selector values property. |
NotEquals | 1 | A Label with matching key property must not have a value property that matches the associated Selector values property. |
In | > 0 | A Label with matching key property must have a value property that matches one of the associated Selector values property. |
NotIn | > 0 | A Label with matching key property must not have a value property that matches one of the associated Selectors values property. |
MinOf | 0 | A Label with matching key property must exist, and if multiple nodes have the same label this one has the lowest integer value. |
MaxOf | 0 | A Label with matching key property must exist, and if multiple nodes have the same label this one has the highest integer value. |
For MinOf
and MaxOf
operations, the Label value must be formatted as an integer value comprising only digits (i.e. no decimal or thousands separators). If the value does not conform to this specification, the label is treated as not existing.
Add Placement Rules
The rules are added in key-value
pairs that match to the labels on Nodes. Each selector uses a Operator defining the Node's matching criteria. To add selectors:
- Navigate to the Package Details page.
- Click on
+ Add
in the Placement Rules tab.
Edit Rules
When needed, you can update the rules. To make changes:
- Go to the Placement Rules tab.
- Click on
Edit
to make changes. - Then click on
Save
.
Placement rules at Application level
An Application may have zero or more placement rules assigned to it. These rules are limited to the Application they are associated with. The placement policies determine where the Application can be deployed during the Deployment planning stage.
The placement rules at an Application level override the rules at all Applications at Package level.