1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-15 17:50:49 +00:00
node-feature-discovery/pkg/apis/nfd/v1alpha1
Markus Lehtonen b648d005e1 pkg/apis/nfd: support templating of "vars"
Support templating of var names in a similar manner as labels. Add
support for a new 'varsTemplate' field to the feature rule spec which is
treated similarly to the 'labelsTemplate' field. The value of the field
is processed through the golang "text/template" template engine and the
expanded value must contain variables in <key>=<value> format, separated
by newlines i.e.:

  - name: <rule-name>
    varsTemplate: |
      <label-1>=<value-1>
      <label-2>=<value-2>
      ...

Similar rules as for 'labelsTemplate' apply, i.e.

1. In case of matchAny is specified, the template is executed separately
   against each individual matchFeatures matcher.
2. 'vars' field has priority over 'varsTemplate'
2021-11-25 12:50:47 +02:00
..
doc.go pkg/apis/nfd: specify CRD for custom labeling rules 2021-11-17 13:40:23 +02:00
expression.go pkg/apis/nfd: support label name templating 2021-11-23 21:03:22 +02:00
expression_test.go pkg/apis/nfd: support label name templating 2021-11-23 21:03:22 +02:00
register.go pkg/generated: add code for interacting with CRD API 2021-11-17 18:51:34 +02:00
rule.go pkg/apis/nfd: support templating of "vars" 2021-11-25 12:50:47 +02:00
rule_test.go pkg/apis/nfd: support templating of "vars" 2021-11-25 12:50:47 +02:00
types.go pkg/apis/nfd: support templating of "vars" 2021-11-25 12:50:47 +02:00
zz_generated.deepcopy.go pkg/apis/nfd: add variables to rule spec and support backreferences 2021-11-25 12:50:47 +02:00