Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics: Fix NodeSelector with boolean values #770

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

zeeke
Copy link
Member

@zeeke zeeke commented Aug 29, 2024

When using a node selector with boolean values, e.g.:

apiVersion: sriovnetwork.openshift.io/v1
kind: SriovOperatorConfig
metadata:
  name: default
spec:
  configDaemonNodeSelector:
    feature.node.kubernetes.io/network-sriov.capable: "true"

the value needs to be quoted before forwarding it to the metrics-exporter node selector field.

Fixes #766

Copy link

Thanks for your PR,
To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@zeeke zeeke force-pushed the metrics-exporter-bool-bug branch from d9d2fd2 to 9100592 Compare August 29, 2024 10:26
When using a node selector with boolean values, e.g.:
```
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovOperatorConfig
metadata:
  name: default
spec:
  configDaemonNodeSelector:
    feature.node.kubernetes.io/network-sriov.capable: "true"
```

the value needs to be quoted before forwarding it to the metrics-exporter
node selector field.

Fixes k8snetworkplumbingwg#766

Signed-off-by: Andrea Panattoni <[email protected]>
@zeeke zeeke force-pushed the metrics-exporter-bool-bug branch from 9100592 to c4572d7 Compare August 29, 2024 10:30
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10613343058

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.04%) to 44.981%

Files with Coverage Reduction New Missed Lines %
controllers/drain_controller.go 1 68.06%
controllers/generic_network_controller.go 5 74.53%
Totals Coverage Status
Change from base Build 10594418576: -0.04%
Covered Lines: 6600
Relevant Lines: 14673

💛 - Coveralls

Copy link
Collaborator

@SchSeba SchSeba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

LGTM

Copy link
Collaborator

@Eoghan1232 Eoghan1232 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! lgtm :)

@zeeke
Copy link
Member Author

zeeke commented Sep 6, 2024

got approval from different sides. Merging

@zeeke zeeke merged commit 3e93cfb into k8snetworkplumbingwg:master Sep 6, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sriov-network-metrics-exporter fails to deploy
4 participants