• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Mellanox / network-operator / 46430667007
68%

Build:
DEFAULT BRANCH: master
Ran 30 Nov 2026 01:44PM UTC
Jobs 1
Files 63
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Nov 2026 01:39PM UTC coverage: 67.704% (+0.04%) from 67.668%
46430667007

push

github

web-flow
fix(ib-kubernetes): grant patch on network-attachment-definitions (#3774)

## What
Add the `patch` verb on `network-attachment-definitions` to the
`ib-kubernetes` ClusterRole
(`manifests/state-ib-kubernetes/0030-cluster_role.yaml`).

## Why
ib-kubernetes (the controller-runtime based daemon) patches NADs:
- it records the `mellanox.infiniband.configured-pkeys` annotation on
every ib-sriov NAD it serves (`pkg/controllers/binding/retained.go`),
and
- for plugins that manage IB partitions it adds/removes the partition
finalizer and writes the pkey annotation
(`pkg/controllers/nad/reconciler.go`).

The dedicated `ib-kubernetes` ClusterRole only grants `get/list/watch`
on NADs. The code only calls `Patch`, never `Update`, so only `patch` is
added. The operator's own role already holds `patch` on NADs, so it can
grant it.

## When this matters (verified vs. not)
- Verified on a cluster: a service account bound **only** to the
generated `ib-kubernetes` ClusterRole gets `patch NAD: no`, `get NAD:
yes`, `patch pods: yes` (checked with `kubectl auth can-i --as=...`).
- On the cluster I tested (Helm release network-operator-26.10.1-rc.1)
the ib-kubernetes service account still **could** patch NADs, because
that release's `ClusterRoleBinding network-operator` binds the
operator's broad role to the whole group
`system:serviceaccounts:<namespace>`. So the gap was masked there and
the daemon worked without this change.
- As I read `deployment/network-operator/templates/role_binding.yaml` on
`master`, the binding now lists only the operator's own service account.
If that is what ships, ib-kubernetes would no longer get NAD `patch`
from it and would depend on its dedicated role, which is what this PR
fixes. I did not run the daemon with only the dedicated role.

## Testing
Deployed ib-kubernetes
`harbor.mellanox.com/cloud-orchestration-dev/ib-kubernetes:refactor-finalizers`
through the `NicClusterPolicy` on a 3-node RKE2 cluster with a real UFM
and ran 17 functional s... (continued)

5589 of 8255 relevant lines covered (67.7%)

104.95 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
80.0
-0.95% pkg/state/state_skel.go
1
75.35
-0.35% pkg/drain/drain_requestor.go
Jobs
ID Job ID Ran Files Coverage
1 46430667007.1 30 Nov 2026 01:44PM UTC 63
67.7
GitHub Action Run
Source Files on build 46430667007
  • Tree
  • List 63
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #46430667007
  • b34810ad on github
  • Prev Build on master (#46418012861)
  • Next Build on master (#46475935920)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc