1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
node-feature-discovery/deployment
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
..
base pkg/apis/nfd: support templating of "vars" 2021-11-25 12:50:47 +02:00
components pkg/apis/nfd: add variables to rule spec and support backreferences 2021-11-25 12:50:47 +02:00
helm/node-feature-discovery pkg/apis/nfd: support templating of "vars" 2021-11-25 12:50:47 +02:00
overlays pkg/apis/nfd: specify CRD for custom labeling rules 2021-11-17 13:40:23 +02:00