Skip to content

Latest commit

 

History

History
77 lines (52 loc) · 1.76 KB

labels.md

File metadata and controls

77 lines (52 loc) · 1.76 KB

Labels

Labels are key=val pairs associated with Rules or Rulesets. They are specified on a Rule or a Ruleset under labels field as a list of strings in key=val format:

labels:
- "key1=val1"
- "key2=val2"

The key of a label can be subdomain-prefixed:

labels:
- "konveyor.io/key1=val1"

The value of a label can be empty:

labels:
- "konveyor.io/key="

The value of a label can be omitted, it will be treated as an empty value:

labels:
- "konveyor.io/key"

Reserved Labels

The analyzer defines some labels that have special meaning. Here is a list of all such labels:

  • konveyor.io/source: Identifies source technology a rule or a ruleset applies to.
  • konveyor.io/target: Identifies target technology a rule or a ruleset applies to.

Label Selector

The analyzer CLI takes --label-selector as an option. It is a string expression that supports logical AND, OR and NOT operations. It can be used to filter-in/filter-out rules based on labels.

To filter-in all rules that have a label with key konveyor.io/source and value eap6:

--label-selector="konveyor.io/source=eap6"

To filter-in all rules that have a label with key konveyor.io/source and any value:

--label-selector="konveyor.io/source"

To perform a logical AND on matches of multiple rules using && operator:

--label-selector="key1=val1 && key2"

To perform a logical OR on matches of multiple rules using || operator:

--label-selector="key1=val1 || key2"

To perform a NOT to filter-out rules that have key1=val1 label set using ! operator:

--label-selector="!key1=val1"

To group sub-expressions and control precedence using ( and ):

--label-selector="(key1=val1 || key2=val2) && !val3"