1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-31 04:04:51 +00:00
node-feature-discovery/pkg/apis/nfd/v1alpha1
Markus Lehtonen 8a4d3161cf pkg/apis/nfd: stricter format checking for template labels
Require that the expanded LabelsTemplate has values. That is, the
(expanded) template must consist of key=value pairs separated by
newlines. No default value will be assigned and we now return an error
if a (non-empty) line not conforming with the key=value format is
encountered.

Commit c8d73666d described that the value defaults to "true" if not
specified. That was not the case and we defaulted to an empty string,
instead.

An example:

  - name: "my rule"
    labelsTemplate: |
      my.label.1=foo
      my.label.2=

Would create these labels:

  "my.label.1": "foo"
  "my.label.2": ""

Further, the following:

  - name: "my failing rule"
    labelsTemplate: |
      my.label.3

will cause an error in the rule processing.
2021-11-24 21:31:35 +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: stricter format checking for template labels 2021-11-24 21:31:35 +02:00
rule_test.go pkg/apis/nfd: stricter format checking for template labels 2021-11-24 21:31:35 +02:00
types.go pkg/apis/nfd: support label name templating 2021-11-23 21:03:22 +02:00
zz_generated.deepcopy.go pkg/apis/nfd: support label name templating 2021-11-23 21:03:22 +02:00