Skip to main content

Placement rule

It can be tedious to edit all the placement files to specify their configuration, especially when they are much the same. It can be just as tedious to check all the files.

A placement rule specifies how a placement should look. Typically it is defined by labels. The workspace can place warnings on deployments that do not match the rules. It can also automatically edit those objects through a wizard (if on a branch.)

The following rule states that placement with label sales equal to M or L should have three nodes of type edgecell.io/aa1.

apiVersion: edgecell.io/v1
kind: PlacementRule
metadata:
name: sizing-rule-medium
namespace: mcdougals.com
spec:
selector:
matchExpressions:
- { key: sales, operator: In, values: [M, L] }
nodes:
- type: edgecell.io/aa1
- type: edgecell.io/aa1
- type: edgecell.io/aa1
localnetwork:
type: dhcp