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

kubevirt / containerized-data-importer / #5658
49%

Build:
DEFAULT BRANCH: main
Ran 06 Nov 2025 08:35PM UTC
Jobs 1
Files 157
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

06 Nov 2025 08:23PM UTC coverage: 58.751% (-0.3%) from 59.064%
#5658

push

travis-ci

web-flow
Add network policies to CDI (#3938)

* Add np.kubevirt.io/allow-access-cluster-services label to components

`np.kubevirt.io/allow-access-cluster-services` is a pod label to be set by
CDI components to indicate that they require access to cluster services otherwise
blocked by the strict network policy (NP).
This label will be applied to the following CDI pods:
- cdi-operator
- cdi-deployment
- cdi-apiserver
- cdi-uploadproxy
- poller (DataImportCron poller pods that run in the CDI namespace)
This label is then used as pod selector to create a NP to give the pods
access to cluster services (apiserver/dns).

Signed-off-by: Adi Aloni <aaloni@redhat.com>
Co-authored-by: fossedihelm <ffossemo@redhat.com>

* dataimportcron, poller: add identifier label to DIC poller

The DIC poller which is used to sample the digest of a container image
from a remote registry currently lacks an identifier labels which can be
used by NetworkPolicies to control its traffic patterns, this commit
adds one.

Signed-off-by: Adi Aloni <aaloni@redhat.com>

* namespaced, factory: add networkpolicies function

This commit adds an additional factory function that isn't included as
part of the standard create all resources to generate the network
policies required by CDI to function properly.

This new function will be used in following commits to generate network
policies as part of manifest-generator and csv-gen.

Signed-off-by: Adi Aloni <aaloni@redhat.com>

* manifest-generator: add network-policies generation support

A new environment variable CDI_DEPLOY_NP has been added with the
options of true and false (defaults to false) to control the deployment
of CDI's network policies.

The network policies deployed when CDI_DEPLOY_NP is set to true are the
ones generated by the createNetworkPolicies factory function as well as
static ones for denying all traffic in the namespace and allow traffic
to kube-apiserver and DNS for pods labeled with `np.kubevirt.io/allow-access-cluster-servic... (continued)

31 of 193 new or added lines in 7 files covered. (16.06%)

7 existing lines in 1 file now uncovered.

17264 of 29385 relevant lines covered (58.75%)

0.65 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
60.47
-2.39% pkg/operator/resources/namespaced/factory.go
5
61.9
-2.03% pkg/operator/resources/utils/common.go
153
0.0
pkg/operator/resources/namespaced/networkpolicies.go

Uncovered Existing Lines

Lines Coverage ∆ File
7
52.63
-9.21% pkg/util/prometheus/prometheus.go
Jobs
ID Job ID Ran Files Coverage
1 #5658.1 06 Nov 2025 08:35PM UTC 157
58.75
Source Files on build #5658
  • Tree
  • List 157
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 6de420bb on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc